I am working with the Magento 2.3, and using the PHPStorm as a IDE. Recently I've configured the xdebug in my local for identify some process flow. But it does not helped me to checked the flow.
Then I hit the website in local, I am facing the Uncaught Error: Call to undefined function xdebug_disable() in vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php on line 73
I've checked with google bug I couldn't find any proper solution for this. Right now I am using the nginx with PHP7.2
I am looking forward to your support to fix the problem.
5 Answers 5
vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php
From :-
if (!(bool)$debugMode && extension_loaded('xdebug')) {
xdebug_disable();
}
To :-
if (!(bool)$debugMode && extension_loaded('xdebug')) {
if (function_exists('xdebug_disable')) {
xdebug_disable();
}
}
-
1This was a quick workaround that worked for me.Jiyaad.D– Jiyaad.D2021年01月11日 09:25:18 +00:00Commented Jan 11, 2021 at 9:25
You're using Xdebug 3, Magento 2.3 only supports Xdebug 2. You need to downgrade your locally installed Xdebug to the latest version in the 2.x release - pecl install -f xdebug-2.9.8 should work I believe, assuming you have pecl installed.
-
-
2it was still not working after downgrade xdebugZahirabbas– Zahirabbas2021年01月08日 12:44:32 +00:00Commented Jan 8, 2021 at 12:44
-
I tried the above mentioned command in my system, but it's not install the xdebug, do you any other command to install the particular xdebug versionsenthil– senthil2021年01月12日 05:31:44 +00:00Commented Jan 12, 2021 at 5:31
-
Its also not installing xdebug for me as well, any one had fixed it ?Hassan Ali Shahzad– Hassan Ali Shahzad2021年01月17日 11:22:39 +00:00Commented Jan 17, 2021 at 11:22
-
why is it not installing xdebug? what error are you getting?user50070– user500702021年01月19日 13:49:04 +00:00Commented Jan 19, 2021 at 13:49
This is a bug in magento2-functional-testing-framework which conflict with xdebug 3, bacause xdebug_disable() was removed in Xdebug 3.
The bug was fixed in the magento2-functional-testing-framework version 3.2.1.
Before the new version is merged in Magento, we could use the quick workaround which from the commit MQE-2391: [GitHub Issue] Magento fails with xdebug 3 due to mftf in version 3.2.1:
In the file dev/tests/functional/standalone_bootstrap.php remove the codes below
if (!(bool)$debug_mode && extension_loaded('xdebug')) {
xdebug_disable();
}
In the file src/Magento/FunctionalTestingFramework/_bootstrap.php remove the codes below
if (!(bool)$debugMode && extension_loaded('xdebug')) {
xdebug_disable();
}
I faced the same issue after updating and upgrading my Ubuntu server. I needed to downgrade xDebug version to fix this issue for Magento 2.4.1 and PHP7.4:
sudo pecl install -f xdebug-2.9.8
If you get "phpize: command not found" error, you can run pecl command again:
sudo apt-get install php7.4-dev
I use multiple PHP versions on my server. For older version like PHP7.3, you modified its php.ini file and add the path of xdebug-2.9.8. On ubuntu, I edited php.ini by running:
sudo vi /etc/php/7.3/fpm/conf.d/20-xdebug.ini
and added:
zend_extension=/usr/lib/php/20190902/xdebug.so
To add on to smstl's answer, which is correct, the problematic files comes from \Magento\FunctionalTestingFramework, which you can remove if not used by running: composer remove --dev magento/magento2-functional-testing-framework