View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001883 | Xdebug | Uncategorized | public | 2020-11-11 10:33 | 2020-11-14 16:15 |
Reporter | Sarunas | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 3.0.0beta1 | ||||
Target Version | 3.0.0RC1 | Fixed in Version | 3.0.0RC1 | ||
Summary | 0001883: Function xdebug_is_enabled has been removed | ||||
Description | XDebug 2.x used to have an (undocumented?) function `xdebug_is_enabled`, which is used by certain projects to detect XDebug. This function seems to be gone from the 3.0.0beta1 version. For example, Symfony DI uses this function ( https://github.com/symfony/symfony/blob/b285584e77e69ad9740711a12581c3fce46535ee/src/Symfony/Component/DependencyInjection/Exception/AutowiringFailedException.php#L26 ) to work around a different problem ( https://github.com/symfony/symfony/pull/30589 ). After upgrading XDebug to v3, I started hitting this Symfony problem, and eventually found that this missing function is the reason. | ||||
Steps To Reproduce | ; the PHP version I'm using > php73 -v PHP 7.3.14 (cli) (built: Jan 21 2020 13:15:39) ( NTS MSVC15 (Visual C++ 2017) x64 ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.14, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.14, Copyright (c) 1999-2018, by Zend Technologies ; xdebug 2.x > php73 -n -d'zend_extension="C:\Program Files\PHP\v7.3\ext\php_xdebug_2.dll"' -r'var_dump(phpversion("xdebug"), function_exists("xdebug_is_enabled"));' Command line code:1: string(5) "2.9.1" Command line code:1: bool(true) ; xdebug 3.x > php73 -n -d'zend_extension="C:\Program Files\PHP\v7.3\ext\php_xdebug_3.dll"' -r'var_dump(phpversion("xdebug"), function_exists("xdebug_is_enabled"));' Command line code:1: string(10) "3.0.0beta1" Command line code:1: bool(false) | ||||
Tags | No tags attached. | ||||
Operating System | Windows 10 | ||||
PHP Version | 7.3.10-7.3.14 | ||||
|
It was undocumented and hence it should not have been relied on. I have added its removal to the upgrade guide (https://3.xdebug.org/docs/upgrade_guide#Changes-to-Functions). If you want to talk about why that workaround was required and figure out a different one, please reach out through email. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-11 10:33 | Sarunas | New Issue | |
2020-11-11 12:43 | derick | Assigned To | => derick |
2020-11-11 12:43 | derick | Status | new => resolved |
2020-11-11 12:43 | derick | Resolution | open => no change required |
2020-11-11 12:43 | derick | Fixed in Version | => 3.0.0RC1 |
2020-11-11 12:43 | derick | Note Added: 0005516 | |
2020-11-11 12:43 | derick | Summary | Function xdebug_is_enabled is not defined => Function xdebug_is_enabled has been removed |
2020-11-14 16:15 | derick | Target Version | => 3.0.0RC1 |