Skip to content

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

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy