magento / magento2-functional-testing-framework

Magento2 Functional Testing Framework
Other
155 stars 133 forks source link

symfony/console dependency mismatch in MFTF v4.7.2 Standalone and Magento v.2.4.7 #917

Open Nurgiel opened 4 months ago

Nurgiel commented 4 months ago

Preconditions

  1. PHP 8.2
  2. MFTF 4.7.2 Standalone
  3. Magento 2.4.7

Latest MFTF version from master branch (https://github.com/magento/magento2-functional-testing-framework/tree/master) doesn't work with Magento 2.4.7, because M2.4.7 uses:

┌──(kali㉿kali)-[~/magento2test]
└─$ composer show | grep -i symfony/console
symfony/console                                                   v6.4.6

and latest MFTF is locked to symfony/console ^5.0 due to brainmaestro/composer-git-hooks dependency:

┌──(kali㉿kali)-[~/mftf]
└─$ composer why-not symfony/console v6.4   
brainmaestro/composer-git-hooks v2.8.5 requires symfony/console (^3.2 || ^4.0 || ^5.0) 

symfony/console version mismatch between Magento2.4.7 and MFTF 4.7.2 Standalone produces the following error when I run bin/mftf run:test AdminLoginFailedTest -r -vvv:

PHP Fatal error: Declaration of Symfony\Component\Console\Input\ArrayInput::hasParameterOption(array|string $values, bool $onlyParams = false): bool must be compatible with Symfony\Component\Console\Input\InputInterface::hasParameterOption($values, bool $onlyParams = false) in /var/www/html/magento2test/vendor/symfony/console/Input/ArrayInput.php on line 50

QUICKFIX

Remove "require-dev": {"brainmaestro/composer-git-hooks": "^2.8.5" } dependency from composer.json and run composer update

m2-assistant[bot] commented 4 months ago

Hi @Nurgiel. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information. Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.