8000 [ErrorHandler] FatalError raise warning if Xdebug 3 is not in develop mode · Issue #40677 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content 10000
[ErrorHandler] FatalError raise warning if Xdebug 3 is not in develop mode #40677
Closed
@Jean85

Description

@Jean85

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

      0