- Notifications
You must be signed in to change notification settings - Fork 9.4k
Fixes incorrect classes being referenced in Magento modules. #37784
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
Fixes incorrect classes being referenced in Magento modules. #37784
Conversation
Hi @hostep. Thank you for your contribution! Add the comment under your pull request to deploy test or vanilla Magento instance:
❗ Automated tests can be triggered manually with an appropriate comment:
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
f5663d3
to 09f3deb
Compare @magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues. |
Okay, everything seems to be stable again. Current failed tests don't look related to changes in this PR at first sight. Can be reviewed & tested now, let me know if something is not clear, thanks! 🙂 |
4a962f5
to 105ef98
Compare There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hostep,
Could you please fix the conflicts?
Okay, I'll attempt to solve them. I've already identified the commits that introduced the conflicts (all related to phpunit 10 compatibility): |
…GetActionInterface.
…of table names. This should both fix the static and the integration test failures.
105ef98
to 9aef3e7
Compare Rebased, solved conflicts and force pushed. Only 13 errors got fixed now instead of 16 before, because in the commits referenced earlier some fixes were already done, these are the 13 ones that are fixed now:
@magento run all tests |
Failed tests don't seem related to changes here, so can be reviewed again. |
…m-magento-modules
@magento run all tests |
@magento run Static Tests, Integration Tests |
Hello @hostep, Thank you for the collaboration and contribution! ✔️ QA PassedSteps to reproduce:
Before: ✖️ After: ✔️ Since there are build failures, moving this to Extended Testing. |
@magento run Functional Tests B2B, Functional Tests EE, Static Tests |
The repeating Functional Test EE failure is falky and known issue. Known issues: Hence moving this to Merge in progress. |
@magento create issue |
86074a0
into magento:2.4-develop
Description (*)
These were found by running phpstan with level 0 on all code in
app/code/Magento
The first commit deals with the description here, further commits are to fix failing tests.
Related Pull Requests
Similar fixes as in #37629 (but that was for code in
lib/internal/Magento/Framework
)Fixed Issues (if relevant)
Manual testing scenarios (*)
vendor/bin/phpstan clear-result-cache && bin/magento setup:di:compile && composer dump-autoload
vendor/bin/phpstan analyse --level=0 -c ./dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon app/code/Magento/
(if you don't use a very modern computer with a very good processor and enough memory, it might take a long time to run, or even crash)creditmemo{current-date}.pdf
Questions or comments
Changes include:
virtualType
(which phpstan doesn't know about)Magento\CatalogInventory\Model\Indexer\Stock\Action\FullAction
where if you inherit from the class, and call the parent constructor and do not provide a value for$batchSizeManagement
, it will try to load a non-existing class and crashMagento\Sales\Controller\Adminhtml\Creditmemo\AbstractCreditmemo\PrintAction
to fix the filename for creditmemo pdf files, it seems like this bug was accidentally introduced in d7ff74d#diff-b6974c4da004f8f764ba347774b2f3dbfeebab760c91f2f4c647dff63fcb6bfeHttpGetActionInterface
interfacePrintAction
class (revealed by failing static test in this PR)activeTableSwitcher->switchTable
line where the variables$indexer
aren't guaranteed to existThis fixes the following phpstan errors:
I won't be adding more automated tests, unless it's really expected, but I might need some help for that...
Contribution checklist (*)
Resolved issues: