-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Remove usage of obsolete property $_isScopePrivate #31754
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
Remove usage of obsolete property $_isScopePrivate #31754
Conversation
Hi @mrtuvn. 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 |
TBH I don't think it's a bad practice to use _isScopePrivate. It would be good to understand what issues it's causing. |
d566665
to
07438f7
Compare
We should update more in docs related with this. Maybe add some real-world use case for example. Seem currently it's not clearly at my point of view |
07438f7
to
382d77f
Compare
It seems like a message about not using _isScopePrivat was added a long time ago, in 2016 magento/devdocs@a75a7a9#diff-21ef8286af3f0fb99ca6976a2c50f78693f2fe7e46b6394635ac8112792087adR62-R64. @sivaschenko @sidolov, could you explain why this approach was deprecated and should work incorrectly but still used in the core? |
@ihor-sviziev I believe the reason to walk away from The property was not yet deprecated by core teams due to low priority, internal ticket: https://jira.corp.magento.com/browse/MAGETWO-56701 |
This pull request not fixing but is related to the issue #30506 (just to create a link) |
I'd probably try to deprecate the property in 2.4 and remove in 2.5, @gabrieldagama @sidolov what do you think? |
Should i re-target branch and update issue link ? |
@mrtuvn considering the tumb-ups, yes, please Thanks! :) |
/** | ||
* @var bool | ||
*/ | ||
protected $_isScopePrivate = true; |
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.
While it should be ok to remove the redeclarations of the inherited property with the same value, I don't think we should remove the $_isScopePrivate = true
in this pull request (that should be done in 2.5 as part as deprecated property removal preparation)
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.
should i need revert all that ? only keep deprecate notes
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.
This is the only file where the removal should be reverted
Prioritized as P2 as missing the deprecated tag on the property prevents any further progress in moving to best practices in this direction |
89d3a2c
to
ffc0d75
Compare
@magento run all tests |
Hi @ihor-sviziev, thank you for the review. |
ffc0d75
to
f340589
Compare
Only rebase code nothing else change |
@magento run all tests |
✔️ QA Passed |
@magento run Functional Tests B2B |
Hi @mrtuvn, thank you for your contribution! |
Description (*)
In old codebase developers still use this property in someplace. We should clean that to follow best practices
https://devdocs.magento.com/guides/v2.4/extension-dev-guide/cache/page-caching/private-content.html#config-cache-priv-how-block
Search results return around 59 blocks still have this property. It's quite lot and can make break change if we refactor this
Just wonder if blocks created not from layout and created via other place (Controllers, Template view), How we can manager cache for that after remove isScopePrivate property
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
CC: @ihor-sviziev @ericmorand @marvinhinz @orlangur @sidolov
Feel free to give me any comments
Contribution checklist (*)