= 3.0.1 – Workaround"/>
Magento 2.x – Incompatibility with PHP XDebug Version >= 3.0.1 – Workaround
After an upgrade of my php-xdebug library, i figured out that Magento, in particular the “magento2-functional-testing-framework” module, is not compatible with version >= 3.0.1. and i’m getting the following error message when doing a “php bin/magento”
1 |
PHP Fatal error: Uncaught Error: Call to undefined function xdebug_disable() in ROOT/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php |
To move forward, this tutorial will help you with a quickfix.
Change this file(will prevent the error as workaround):
<MAGE_ROOT>/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php lines 71-74 to:
1 2 3 4 5 6 7 8 |
$debugMode = $_ENV['MFTF_DEBUG'] ?? false; if (!(bool)$debugMode && extension_loaded('xdebug')) { if (version_compare(phpversion('xdebug'), '3.0.1', '<')) { xdebug_disable(); } else { // I don't know the method for version >= 3.0.1 } } |
Happy coding.!