magento / magento/magento2-functional-testing-framework
symfony/console dependency mismatch in MFTF v4.7.2 Standalone and Magento v.2.4.7
- Dominant language
- PHP
- Stars
- 154
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Description
### 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
Contributor guide
Research direction
Start with composer.json and the dependency resolution shown by `composer why-not symfony/console v6.4`; then reproduce the failure with `bin/mftf run:test AdminLoginFailedTest -r -vvv` on Magento 2.4.7. Check how removing brainmaestro/composer-git-hooks affects installation and confirm that the MFTF command runs without the Symfony console type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- build-system, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100