-
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
Move additional dependencies from private getters to constructor - Magento_Catalog #26411
Move additional dependencies from private getters to constructor - Magento_Catalog #26411
Conversation
Hi @Bartlomiejsz. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
@@ -141,6 +143,7 @@ public function __construct( | |||
ProductLinks $productLinks, | |||
Js $jsHelper, | |||
Date $dateFilter, | |||
LinkResolver $linkResolver, | |||
CustomOptionFactory $customOptionFactory = null, |
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.
Please add all new dependencies in a backward-compatible manner - similar to other added in this class:
- new dependency is last
null
default value- initialized in constructor when it was not passed
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.
I was sure that it should be done this way but in few of my previous PRs it was mentioned that for 2.4 release proper way is without ObjectManager, and I had to change it for such like here. So which is correct version?
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.
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.
9018ad9
to
00ffc92
Compare
00ffc92
to
5c72fba
Compare
Closing this one to open new PR as draft, since Catalog requires serious amount of modifications |
Hi @Bartlomiejsz, thank you for your contribution! |
Description (*)
This PR moves additionally introduced dependencies from private getter methods into constructor in Magento_Catalog module.
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)