magento / magento/magento2-functional-testing-framework

Errors via allure dependency

Open
#898 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
154
Forks
134
PR merge metrics
No merged PRs in 30d

Description

### 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"`.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with `vendor/bin/mftf run:group Fooman`, then inspect `vendor/allure-framework/allure-php-api/src/Yandex/Allure/Adapter/Annotation/AnnotationProvider.php` and this project's dependency declarations. Check the Doctrine and Allure compatibility described in the linked issue and pull request; done means the MFTF test suite starts successfully with the supported dependency set.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.