Skip to content

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

Open
@Nurgiel

Description

@Nurgiel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions