Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[ErrorHandler] FatalError raise warning if Xdebug 3 is not in develop mode #40677

Copy link
Copy link
Closed
@Jean85

Description

@Jean85
Issue body actions

Symfony version(s) affected: at least since 4.4.0

Description
When using Xdebug 3 with develop mode disabled (i.e. for coverage in CI), a warning is triggered inside Symfony\Component\ErrorHandler\Error\FatalError due to this like of code:

if (\function_exists('xdebug_get_function_stack')) {

How to reproduce

  • install Xdebug 3 and enable it WITHOUT develop mode
  • install the Error Handler and enable it
  • throw an exception and do NOT catch it
Warning: Function must be enabled in php.ini by setting 'xdebug.mode' to 'develop'

Example of failure: https://github.com/getsentry/sentry-symfony/pull/475/checks?check_run_id=2247826488#step:9:25

So, function_exists is no longer good enough for safeguarding such usage. Also, it seems that checking for xdebug.mode from the ini is not good enough too: https://xdebug.org/docs/develop#mode

You can also set the mode by setting the XDEBUG_MODE environment variable on the command-line; this will take precedence over the xdebug.mode setting, but will no change the value of the xdebug.mode setting.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.