magento / magento2-functional-testing-framework

Magento2 Functional Testing Framework
Other
155 stars 133 forks source link

Errors via allure dependency #898

Open fooman opened 1 year ago

fooman commented 1 year ago

Preconditions

  1. Magento CE 2.4.6-beta3
  2. PHP 8.2
  3. allure-framework/allure-php-api: 1.4.0
  4. jms/serializer: 3.19.0 or above
  5. doctrine/annotations: 2.0 or above (this was released 2 weeks ago and is what causes the issue)

Steps to reproduce

  1. vendor/bin/mftf run:group Fooman

Expected result

  1. MFTF testsuite runs

Actual result

1.

PHP Fatal error:  Uncaught Error: Call to undefined method Doctrine\Common\Annotations\AnnotationRegistry::registerUniqueLoader() in /var/www/vendor/allure-framework/allure-php-api/src/Yandex/Allure/Adapter/Annotation/AnnotationProvider.php:74
Stack trace:
#0 /var/www/vendor/allure-framework/allure-codeception/src/Yandex/Allure/Codeception/AllureCodeception.php(100): Yandex\Allure\Adapter\Annotation\AnnotationProvider::registerAnnotationNamespaces()
#1 /var/www/vendor/codeception/codeception/src/Codeception/Extension.php(32): Yandex\Allure\Codeception\AllureCodeception->_initialize()
#2 /var/www/vendor/codeception/codeception/src/Codeception/Subscriber/ExtensionLoader.php(90): Codeception\Extension->__construct()
#3 /var/www/vendor/codeception/codeception/src/Codeception/Subscriber/ExtensionLoader.php(40): Codeception\Subscriber\ExtensionLoader->bootExtensions()
#4 /var/www/vendor/codeception/codeception/src/Codeception/Codecept.php(87): Codeception\Subscriber\ExtensionLoader->bootGlobalExtensions()
#5 /var/www/vendor/codeception/codeception/src/Codeception/Command/Run.php(398): Codeception\Codecept->__construct()
#6 /var/www/vendor/symfony/console/Command/Command.php(298): Codeception\Command\Run->execute()
#7 /var/www/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#8 /var/www/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#9 /var/www/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#10 /var/www/vendor/codeception/codeception/src/Codeception/Application.php(117): Symfony\Component\Console\Application->run()
#11 /var/www/vendor/codeception/codeception/app.php(46): Codeception\Application->run()
#12 /var/www/vendor/codeception/codeception/app.php(47): {closure}()
#13 /var/www/vendor/codeception/codeception/codecept(7): require('...')
#14 /var/www/vendor/bin/codecept(120): include('...')
#15 {main}
  thrown in /var/www/vendor/allure-framework/allure-php-api/src/Yandex/Allure/Adapter/Annotation/AnnotationProvider.php on line 74

The actual issue is this one https://github.com/allure-framework/allure-php-api/issues/117 and there is a fix proposed here https://github.com/allure-framework/allure-php-api/pull/119

Unfortunately that repo hasn't seen a new release in a while. As such it might be worth investigating adding some extra guardrails in place in this project - for example by adding doctrine/annotations:"^1.13".

m2-assistant[bot] commented 1 year ago

Hi @fooman. 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


fooman commented 1 year ago

I have added jms/serializer:3.18.2 to my main Magento project and this worked better than doctrine/annotations:"^1.13" as that downgraded jms/serializer to 1.10.0 which errored elsewhere.

KevinBKozan commented 1 year ago

@fooman thank you for reporting this, this is a known issue that is currently being worked on internally. The .lock file for our 2.4.6-develop branch is locked peoperly to 3.18.2, but yes there is no entry in composer.json in Magento for some reason. Internal PR for that is going to be raised shortly to make it into the next beta 👍