-
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
Allow only valid preferences during setup:di:compile #33161
Allow only valid preferences during setup:di:compile #33161
Conversation
Hi @fredden. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Hi @fredden, |
I can't think of a good reason to create a plugin for a class that should only be used in tests. Perhaps the change here should be to exclude Preferences that match these regular expressions as well. I'll investigate further to see if that's something we can include here. |
This reverts commit aa10200.
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
1 similar comment
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
I have edited the pull request description to remove the magic comment which links pull requests together in the Adobe testing system. |
@magento run all tests |
Hello @fredden, As per the comment below, it seems that PageBuilder is a prerequisite for this PR. Therefore, we are placing this PR on hold for now and will proceed with it once the PageBuilder PR is merged:
Thanks |
@engcom-Hotel the PageBuilder changes have been merged in. Please can you organise for magento/inventory#3315 to be merged in too? |
Yes @fredden, I am on it. I will update you soon regarding the inventory PR. |
@magento run all tests |
@magento run all tests |
It looks like the prerequisite changes have been applied now. @engcom-Hotel please can you remove the 'on hold' label here and progress this through the process. |
We are moving it to Thanks |
@magento run Functional Tests EE |
Moving this PR to extended testing since the copyright tag has not been updated in the mentioned files. |
@magento run all test |
Failed to run the builds. Please try to re-run them later. |
@magento run all tests |
8a4bbf9
into
magento:2.4-develop
@engcom-Dash |
Description
The
setup:di:compile
command has exclude lists to avoid loading / compiling dependency injection for 'test' classes. When preferences exist for these excluded classes, any plugins associated with the original classes are (potentially) rendered useless. This is because the child class (preference) can call the original class in a way which does not use Magento's plugin system (ie,parent::methodName()
). And it's impossible to plugin a class that does not go through Magento's compilation process (to have interceptors created, etc). See magento/security-package#296 for a real-world example of this problem in action.This pull request began as a change to the regular expressions used to exclude classes, and has grown into expanding the exclude list to cover preferences. Changes include:
setup:di:compile
-related classes.Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios
Test
.Before this pull request, these would silently fail; after this pull request, an error is shown.
Questions or comments
None
Contribution checklist
Resolved issues: