Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Move additional dependencies from private getters to constructor - Magento_PageCache #26684
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_PageCache #26684
Changes from all commits
c1a8ead
a05803e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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, check my previous comment regarding the backward compatibility
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.
Hi @Bartlomiejsz. We can consider this change as backward incompatible. If some other class inherits the current class in some Magento based project, we will have an error upon calling
parent::construct(..)
in a child class because the child class is not supposed to pass$fullPageCache
and$tagResolver
arguments.What I suggest here is to instantiate the corresponding object if it's not being passed as an argument. See the following instantiation as an example.
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.
Hi @rogyar, I asked similar question in one of my previous PRs, such non-backward compatible changes I'm doing in those PRs are based on info I received in #26269, where I was asked to replace backward-compatible change with one that doesn't use ObjectManager, since we're developing for 2.4 now.
Also such changes are being directly merged to core by Magento core team 4e6f6ae
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.
Hi @Bartlomiejsz. You are right, that's fair since we are editing a non-API class. That's rather a professional habit avoid bringing backward-incompatible changes :)