-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[PHPDOC] Fix bad phpdoc \Magento\Sales\Model\Order\Email\Container\Template::$id property #39150
Conversation
Hi @dimitriBouteille. 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 |
@magento create issue |
Hi @dimitriBouteille! Is there some ongoing big effort at the moment to adopt PhpStan at certain level or something? Generally, everywhere in Magento |
Hi @orlangur Thanks for your feedback :) Today, if I want to set up PHPStan with level 5 (even worth testing a higher level) it is very complicated because the Magento code is not clean, a good part of the PHPDoc is not correct ... The best solution to implement PHPStan today is to go through bitExpert/phpstan-magento and add several ignores in PHPStan. Ignoring rules is stupid, especially when the goal is to ensure the quality of the code. I know that Magento has been around for a while and typing with PHP was complicated, but now with the arrival of PHP 8.x, we should still improve the typing. The idea is to improve PHPDoc because less cumbersome than modifying the code by adding the strict type (e.g : returns type, arguments type, ...). Decisions made some time ago are one thing, but knowing how to evolve with your time to improve the code is better ❤️ Finally, I’m not sure that adding |
@magento run all tests |
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.
@magento run all tests |
Hi @engcom-Hotel, I have fixed the static test failure. Requesting for review again. Thank you! |
Manual testing is not required here, as this PR is only updating the doc block. Since the build is failing, moving it to Extended Testing. |
@magento run all tests |
@magento run Functional Tests B2B, Functional Tests EE |
One of the Functional B2B test is not consistent in recent 2 builds. The other failing test is a known issue. The failure is neither related to PR nor part of this PR. Run 1: ![]() The Functional EE test failure is neither related to PR nor part of this PR. Its a known failure. Hence moving this PR to Merge in Progress. Run 1: ![]() Known Issue: |
e8388d6
into
magento:2.4-develop
Description (*)
This PR fix the bad phpdoc for
\Magento\Sales\Model\Order\Email\Container\Template::$id
, actually$id
is typeint
but in reality isstring
.For example, with PHPSTAN is very complicated to setup the project with level 5 or higher :(
Workaround
Add
@phpstan-ignore-next-line
before callsetTemplateId
:(Related Pull Requests
None
Fixed Issues (if relevant)
None
Manual testing scenarios (*)
Setup PHPSTAN with level 5 or higher and run check.
Contribution checklist (*)
Resolved issues: