magento / magento2-functional-testing-framework

Magento2 Functional Testing Framework
Other
155 stars 133 forks source link

Problem with dependency in 2.6.* & 2.7.* series #820

Closed esteban-serfe closed 3 years ago

esteban-serfe commented 3 years ago

The MFTF suite will not install thorugh composer as dependencies have conflicts on the versions.

Preconditions

Steps to reproduce

  1. Run compose require -dev magento/magento2-functional-testing-framework:2.6.*

Expected result

  1. Have MFTF installed

Actual result

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

  Problem 1
    - Installation request for doctrine/inflector (locked at 1.4.3) -> satisfiable by doctrine/inflector[1.4.3].
    - magento/magento2-functional-testing-framework 2.6.0 requires csharpru/vault-php ~3.5.3 -> satisfiable by csharpru/vault-php[3.5.3].
    - magento/magento2-functional-testing-framework 2.6.1 requires csharpru/vault-php ~3.5.3 -> satisfiable by csharpru/vault-php[3.5.3].
    - magento/magento2-functional-testing-framework 2.6.2 requires csharpru/vault-php ~3.5.3 -> satisfiable by csharpru/vault-php[3.5.3].
    - magento/magento2-functional-testing-framework 2.6.3 requires csharpru/vault-php ~3.5.3 -> satisfiable by csharpru/vault-php[3.5.3].
    - magento/magento2-functional-testing-framework 2.6.4 requires csharpru/vault-php ~3.5.3 -> satisfiable by csharpru/vault-php[3.5.3].
    - magento/magento2-functional-testing-framework 2.6.5 requires csharpru/vault-php ~3.5.3 -> satisfiable by csharpru/vault-php[3.5.3].
    - magento/magento2-functional-testing-framework 2.6.6 requires csharpru/vault-php ~3.5.3 -> satisfiable by csharpru/vault-php[3.5.3].
    - csharpru/vault-php 3.5.3 requires doctrine/inflector ~1.1.0 -> satisfiable by doctrine/inflector[v1.1.0].
    - Conclusion: don't install doctrine/inflector v1.1.0
    - Installation request for magento/magento2-functional-testing-framework 2.6.* -> satisfiable by magento/magento2-functional-testing-framework[2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.6.6].

Installation failed, reverting ./composer.json to its original content.

Same happens without requiring an specific version.

m2-assistant[bot] commented 3 years ago

Hi @EstebanSerfe. 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 commented 3 years ago

@EstebanSerfe We have been running/testing release packages in composer builds.

Can you try to update to latest MFTF 2.6.x for Magento 2.3.6? or latest MFTF 2.7.x for Magento 2.3.7?

esteban-serfe commented 3 years ago

Hi @jilu1 Thanks for your response.

We are not using Magento Commerce 2.3.7 with PHP 7.3 and Composer 1 Trying to install MFTF 2.7.1 manually gives me the following conflict:

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

  Problem 1
    - Can only install one of: doctrine/inflector[v1.1.0, 1.4.4].
    - Can only install one of: doctrine/inflector[v1.1.0, 1.4.4].
    - Can only install one of: doctrine/inflector[v1.1.0, 1.4.4].
    - csharpru/vault-php 3.5.3 requires doctrine/inflector ~1.1.0 -> satisfiable by doctrine/inflector[v1.1.0].
    - magento/magento2-functional-testing-framework 2.7.1 requires csharpru/vault-php ~3.5.3 -> satisfiable by csharpru/vault-php[3.5.3].
    - Installation request for magento/magento2-functional-testing-framework 2.7.1 -> satisfiable by magento/magento2-functional-testing-framework[2.7.1].
    - Installation request for doctrine/inflector (locked at 1.4.4) -> satisfiable by doctrine/inflector[1.4.4].

I see the following modules having doctrine/inflector as dependencies on my composer.lock file:

Is this an issue with some other package that have the dependency also to doctrine/inflector that is not been mentioned on the conflict listing?

Doing some research, on Version 4.0.1 of csharpru/vault-php the dependency is updated to 1.3 and on higher version is removed. See https://github.com/CSharpRU/vault-php/blob/4.0.1/composer.json & https://github.com/CSharpRU/vault-php/blob/develop/composer.json

esteban-serfe commented 3 years ago

found that the module elasticsearch/elasticsearch removed the dependency 13 days ago from require dev. See https://github.com/elastic/elasticsearch-php/commit/ff65e31e227ff257a73ac74759ffcb497efebd37

Trying updating the module to newest version. 🤞🏻

esteban-serfe commented 3 years ago

Finally solved my issue doing:

composer update elasticsearch/elasticsearch
compsoer require --dev doctrine/inflector:1.1.*
composer require --dev magento/magento2-functional-testing-framework:2.*

Seems that the elastic search version had doctrine/inflector locked into 1.4.4 and prevented the install that way. Adding the second command downgraded the vesrion to 1.1.* which allowed to install 2.7.1 into the environment.

Not the best solution but did the trick.