Skip to content

Incompatibility with PHP XDebug Version >= 3.0.1 #810

Closed
@Luc4G3r

Description

@Luc4G3r

Preconditions

  1. Have XDebug Version 3.0.1 or higher installed
  2. Have XDebug extension enabled in php.ini

Steps to reproduce

  1. Disable Magento debug mode
  2. Run any bin/magento command with magento2-functional-testing-framework enabled

Expected result

Command is executed

Actual result

   PHP Fatal error:  Uncaught Error: Call to undefined function xdebug_disable() in ROOT/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php

Possible solution (only to prevent error)

Change ROOT/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php lines 71-74 to:

   $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
      }
   }

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