-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MFTF >=4.3.1 uses a Yandex\Allure class that doesn't exist #37604
Comments
Hi @densen45. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-November. Thank you for working on this issue.
|
Hi @densen45 , |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-8996 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-November. Thank you for verifying the issue. |
The issue is getting worse. The composer.json from M 2.4.7 requires magento/magento2-functional-testing-framework ^4.7 and this has the same issue as described above. With Magento 2.4.7 it's no longer possible to explicitly downgrade Magento Functional Testing Framework to version 4.2.1, because this requires symfony/finder ^5.0, which requires symfony/string ^5.4, but M 2.4.7 requires symfony/string ^6.4. composer.json
Thus, I'm not able to execute any MFTF test in Magento 2.4.7. Has anyone else experienced this? |
Hey everyone, this issue is still a pain in my neck. Guys, I'm sorry for marking you directly but I don't know how else to make progress here. Maybe you can help me :)
Many thanks to all those who are willing to contribute to this issue. |
It looks like you are correct. This worked correctly in Magento 2.4.5 which comes with The namespace of that Part of the MFTF codebase was updated for the new namespace in magento/magento2-functional-testing-framework@32615bc, but not all of it. Strange that Adobe's automatic tests didn't pick this up... Just running phpstan myself locally in an 2.4.7 project on the MFTF vendor codebase reveals this error next to a bunch of others:
@KevinBKozan, @manjusha729: are you guys aware of this? Any plans on fixing this in a new version? |
Looks like it was already reported before many months ago in magento/magento2-functional-testing-framework#912 I have no experience with running custom MFTF tests myself, but does the comment from magento/magento2-functional-testing-framework#912 (comment) help @densen45? It sounds like maybe updating those yaml files might solve your issue? |
@hostep Hello! I was not directly aware of this issue, but I'm going to create an internal ticket to take a look at this ASAP. Surface level I understand that it's a namespacing issue, but given the complexity of the relationship between MFTF dependencies and M2 dependencies I want to understand the exact workflow that's leading to this. We run our MFTF suite when we create the M2 composer packages, and any issues like these would definitely be caught by the workflow of pulling composer magento and trying to run tests. |
@hostep an update on the above: We went through reproduction steps and yes, it seems like the only way to reproduce it is to:
The intended workflow for this usecase is to just run I also personally pulled Magento 2.4.7 (2.4.7-p2) and went through a normal workflow to install MFTF and I was able to run tests without any namespacing issues. Worth noting MFTF 4.7.2 is being pulled, so of course this would work. @densen45 may I ask why you're locking MFTF to an older version as opposed to just using whichever comes with the composer package? |
@KevinBKozan, thanks for the explanation, hopefully that will help @densen45 further. But, any reason why you keep old classes around in the MFTF package that reference classes that your dependencies are not pulling in? |
@hostep Honestly no, I don't think there is a reason to have kept them around. If I remember correctly, the Codeception version bump had to keep being delayed due to M2 dependency issues; I'm positive the cleanup portion was just missed in lieu of wanting to be 100% sure version bump was thoroughly compatible. I'm very motivated to perform that cleanup though - I'll create another internal task to take care of it. Good call out! 👍 |
@hostep Thank you very much for your investigation, fast response and involving @KevinBKozan. Really well done! @KevinBKozan I have executed That means, executing
I'm not sure if I get you @KevinBKozan right here: "may I ask why you're locking MFTF to an older version as opposed to just using whichever comes with the composer package?" |
Preconditions and environment
From
composer.json
:Steps to reproduce
or just visit the class
Magento\FunctionalTestingFramework\Allure\Adapter\MagentoAllureAdapter
and notice that the classYandex\Allure\Codeception\AllureCodeception
doesn't exist. This class is used and should serve as parent for theMagentoAllureAdapter
.Expected result
All used classes exist and MFTF tests can be executed.
Actual result
MFTF tests cannot be executed due to missing dependencies.
Additional information
Explicitly setting the MFTF version to
4.2.1
incomposer.json
and executecomposer update
solves this issue."magento/magento2-functional-testing-framework": "4.2.1"
(without the^
)Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: