Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Incompatibility with PHP XDebug Version >= 3.0.1 #810

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Luc4G3r opened this issue Dec 16, 2020 · 6 comments
Closed

Incompatibility with PHP XDebug Version >= 3.0.1 #810

Luc4G3r opened this issue Dec 16, 2020 · 6 comments

Comments

@Luc4G3r
Copy link

Luc4G3r commented Dec 16, 2020

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
      }
   }
@m2-assistant
Copy link

m2-assistant bot commented Dec 16, 2020

Hi @Luc4G3r. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


@jilu1
Copy link
Contributor

jilu1 commented Dec 16, 2020

@Luc4G3r
We have just fixed this issue in 3.2.1. Could you do composer update mftf and see if it works?

@rissajeanne
Copy link

@Luc4G3r
We have just fixed this issue in 3.2.1. Could you do composer update mftf and see if it works?

@jilu1 No luck updating mftf on magento/product-community-edition:2.3.5-p1:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for magento/magento2-functional-testing-framework ~3.2.1 -> satisfiable by magento/magento2-functional-testing-framework[3.2.1].
    - Conclusion: remove beberlei/assert v2.9.9
    - Conclusion: don't install beberlei/assert v2.9.9
    - magento/magento2-functional-testing-framework 3.2.1 requires spomky-labs/otphp ^10.0 -> satisfiable by spomky-labs/otphp[v10.0.0, v10.0.1].
    - spomky-labs/otphp v10.0.0 requires beberlei/assert ^3.0 -> satisfiable by beberlei/assert[v3.0.0, v3.0.1, v3.1.0, v3.2.0, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.3.0].
    - spomky-labs/otphp v10.0.1 requires beberlei/assert ^3.0 -> satisfiable by beberlei/assert[v3.0.0, v3.0.1, v3.1.0, v3.2.0, v3.2.1, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.3.0].
    - Can only install one of: beberlei/assert[v3.0.0, v2.9.9].
    - Can only install one of: beberlei/assert[v3.0.1, v2.9.9].
    - Can only install one of: beberlei/assert[v3.1.0, v2.9.9].
    - Can only install one of: beberlei/assert[v3.2.0, v2.9.9].
    - Can only install one of: beberlei/assert[v3.2.1, v2.9.9].
    - Can only install one of: beberlei/assert[v3.2.2, v2.9.9].
    - Can only install one of: beberlei/assert[v3.2.3, v2.9.9].
    - Can only install one of: beberlei/assert[v3.2.4, v2.9.9].
    - Can only install one of: beberlei/assert[v3.2.5, v2.9.9].
    - Can only install one of: beberlei/assert[v3.2.6, v2.9.9].
    - Can only install one of: beberlei/assert[v3.2.7, v2.9.9].
    - Can only install one of: beberlei/assert[v3.3.0, v2.9.9].
    - Installation request for beberlei/assert (locked at v2.9.9) -> satisfiable by beberlei/assert[v2.9.9].

@jilu1
Copy link
Contributor

jilu1 commented Dec 17, 2020

@Luc4G3r @rissajeanne
Ah, I see that you are using magento 2.3.5-p1 which uses mftf 2.x and it does not have the fix. I created an internal ticket https://jira.corp.magento.com/browse/MQE-2429 and we will port the fix over.

@Luc4G3r
Copy link
Author

Luc4G3r commented Dec 17, 2020

@jilu1
Yes, I can confirm the fix works on update, but also working with projects which were not yet updated, I would greatly appreciate a port of it.

@soumyau
Copy link
Contributor

soumyau commented Dec 21, 2020

Hello, @Luc4G3r @rissajeanne. This fix has been ported over to MFTF 2.x, you can version bump mftf to 2.6.6 in 2.3.x releases of magento.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants