-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Introducing dynamic generic type definitions in php docblocks, to imp… #40119
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
base: 2.4-develop
Are you sure you want to change the base?
Introducing dynamic generic type definitions in php docblocks, to imp… #40119
Conversation
Hi @hostep. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email [email protected]. |
2 similar comments
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email [email protected]. |
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email [email protected]. |
@magento run all tests |
@magento run Static Tests |
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email [email protected]. |
@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.
Hello @hostep,
Thanks for the contribution!
The changes looks good to me, but please fix the failed static tests. Functional test failures seems flaky to me, and for SVC failure, we will create a JIRA.
Thanks
…rove static analysis
d6d3a52
to
5e7d8a6
Compare
@magento run all tests The static test failures are false positives, but I just rebase and force pushed, so let's see if they keep failing with false positive result or not ... |
@engcom-Hotel, the 3 static test failures (one, two, three) all complain about missing copyright headers, but the headers are there and in the correct format, so I'm confused. Why do these test failures trigger? Also the Database Compare test fails, even though they are all green, why is that happening? |
Hello @hostep, I think it is due to case sensitive check. Let me check once. Thanks |
…s-for-improved-static-analysis
Copyright failure fixes
@magento run Static Tests |
…rove static analysis
Description (*)
When doing static analysis, the types defined as return type in certain methods in core Magento that have to do with creating or fetching blocks are not specific enough.
We can use generic type definitions to improve this significantly by having it interpreted as the exact class a method call returns.
More detailed information can be found in #40017
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
app/design/frontend/Magento/luma/Magento_LayeredNavigation/templates/layer/state.phtml
and fully remove its contents and replace it with the following:./vendor/bin/phpstan analyse --level=2 -c dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon app/design/frontend/Magento/luma/Magento_LayeredNavigation/templates/layer/state.phtml
Before:
After:
Questions or comments
Contribution checklist (*)