[Issue] Cleanup of some non-existing classes from some unit tests code in the… #37636
Closed
2 of 5 tasks
Labels
Area: Test framework
Component: TestFramework
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Priority: P2
A defect with this priority could have functionality issues which are not to expectations.
Progress: done
Reported on 2.4.x
Indicates original Magento version for the Issue report.
Reproduced on 2.4.x
The issue has been reproduced on latest 2.4-develop branch
Projects
This issue is automatically created based on existing pull request: #37629: Cleanup of some non-existing classes from some unit tests code in the…
… Magento framework.
Description (*)
In an attempt at slowly fixing phpstan reported issues in the entire Magento codebase, I took a look today at the Framework code and searched for classes used that don't exist (any more). I've only found some fixes for some unit tests in the Framework code. This fixes 7 errors out of 173 phpstan errors found in total when scanning on level 0 on the Framework code.
Errors fixed:
Related Pull Requests
None
Fixed Issues (if relevant)
None
Manual testing scenarios (*)
vendor/bin/phpstan clear-result-cache && bin/magento setup:di:compile && composer dump-autoload
vendor/bin/phpstan analyse --level=0 lib/
Questions or comments
It is my hope that it's Adobe's goal one day to have zero issues that phpstan finds on level 0, since those are the most important ones to fix usually. If we finally have level 0 tackled across the entire codebase, we can slowly go up one by one which would also allow the checks in pull requests here to be made against a higher level than only 0, which in the end should hopefully result in a lot more stable code then what we have right now.
Contribution checklist (*)
The text was updated successfully, but these errors were encountered: