-
Notifications
You must be signed in to change notification settings - Fork 9.4k
avoid using deprecated escape* methods from AbstractBlock #31610
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
avoid using deprecated escape* methods from AbstractBlock #31610
Conversation
Hi @sergeynezbritskiy. 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 |
@magento run all tests |
Nice, great job, thanks! |
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 @sergeynezbritskiy,
Could you re-target your PR to the 2.5-develop branch?
@magento run functional tests |
@magento run Functional Tests B2B, Functional Tests CE |
Hi @sergeynezbritskiy, thanks for working on this track! We've discussed this during the Public Community Triage meeting and we believe this can be delivered to Therefore, the amount of files on this PR makes it hard to review, so we would like to recommend the breakdown of this PR into several pull requests, the idea would be split it per module. Hope that makes sense, thanks! |
@gabrieldagama: I strongly disagree, please see my comments on #30639 (comment) Please think about end users with custom themes who are required to review all changes which Magento adds to the blank theme files and take them over to their own customisations. It's really unfortunate that these changes weren't applied in Magento 2.4.0 when the escaper made its appearance, but that's no excuse for now rolling these out in a minor release because it was forgotten. I'm available on Slack to chat about this should this still not be clear that this is a bad idea. |
Hi @hostep, thanks for highlighting your concern. Usually, we decide on which version something should be delivered based on backward compatibility, not on the number of changes, mostly because that is relative to how long that development cycle is and how much contribution/work is being done during that time. Such changes have a small risk of breaking a custom theme, and I believe we are not removing the However, I do understand your concern, having that many files to be reviewed would be hard and time-consuming (as this PR, that is why we recommended to split it into multiple PRs, per module). I will bring this up for the team once more and we can further discuss it. From my personal point of view, I don't see any problem to 'postpone' such changes to 2.5 instead. |
Thanks for considering this @gabrieldagama Just to explain a bit more, when we compare a frontend file of an old magento version with a new version and if it contains a lot of these changes like used in this PR, it's hard to find other changes which could actually be important, because there is a lot of noise. The exact same problem happened with Magento 2.3.3 where this gigantic change got accepted: 8698a69. All these changes are only cleanup but made it a lot more complex to figure out which other changes next to these were included in the frontend files. Therefore, big cleanups in frontend files should only happen while working on a new major version in my opinion. Every new major version has a chance to cleanup or apply new coding standards to the entire code base (we recently had a discussion about this on Slack in the #coding-standard channel btw, see screenshot below). If it is already hard to review these many changes for you guys, image that a lot of your end users also have to go through this review phase and it's not only this change but a bunch of other changes all combined which makes this much harder for us then for you. Also, there are some reason why we try to apply all changes from core files to our custom themes:
|
Hi @gabrieldagama I've split this PR onto smaller ones, one module - one PR. #31662, #31663, #31664, #31665, #31666, #31667, #31668, #31669, #31670, #31671, #31672, #31673, #31674, #31675, #31676, #31677, #31678, #31679, #31680, #31681, #31682, #31683, #31684, #31685, #31686, #31687, #31688, #31689, #31690, #31691, #31692, #31693, #31694, #31695, #31696, #31697, #31698, #31699, #31700, #31701, #31702, #31703, #31704, #31705, #31706, #31707, #31708, #31709, #31710, #31711, #31712, #31713, #31714, #31715, #31716, #31717, #31718, #31719, #31720, #31721, #31722, #31723, #31724, #31725, #31726, #31727, #31728, #31729, #31730, #31731, #31732, #31733 Hence this PR can be closed |
Hi @sergeynezbritskiy, thank you for your contribution! |
@hostep @ihor-sviziev we don't see enough risk of these changes to postpone them to 2.5. The only BIC risks that I can see is extended or plaginized escape methods of blocks in extensions or customization. Do you agree that is very unlikely and we should target these PRs to 2.4-develop branch? |
Hi @sivaschenko, this is not about BIC, please see reasoning above... |
@hostep I see, that's about time to review the changes of patch release. Makes sense, thanks for bringing up this point. |
Exactly. Magento should try to reduce the number of changes in between minor versions (especially for frontend related files) so these minor updates are as easy as possible and people are encouraged to perform them. Cleanup like suggested here or new coding styles should preferably only be applied to the entire codebase just before a new major version is released. Until a new major version is then released, no cleanup or new coding styles should be allowed, so we only see see significant changes and no unnecessary noise in between minor versions as they will make it easier to deal with as an end-user. I completely understand that switching to this escaper in phtml files is recommended and make the codebase cleaner and more consistent, but that should have been done by the magento core-devs when they released this feature in 2.4.0, and they didn't. It's a bit annoying this happened, hopefully this sort of thing can be avoided in the future 🙂 |
Description (*)
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)