-
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
Fix typo in SINGLE_PRODUCT_LAYOUT_HANLDE #12786
Conversation
Fix typo in SINGLE_PRODUCT_LAYOUT_HANLDE to SINGLE_PRODUCT_LAYOUT_HANDLE
Hi @aschrammel. Thanks for the pull request. First thing is first can you sign the CLA and then we can work on accepting this pull request. |
@@ -34,7 +34,7 @@ class Instance extends \Magento\Framework\Model\AbstractModel | |||
|
|||
const PRODUCT_LAYOUT_HANDLE = 'catalog_product_view'; | |||
|
|||
const SINGLE_PRODUCT_LAYOUT_HANLDE = 'catalog_product_view_id_{{ID}}'; | |||
const SINGLE_PRODUCT_LAYOUT_HANDLE = 'catalog_product_view_id_{{ID}}'; |
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.
Unfortunately we cannot rename or remove constants in a PR to 2.2-develop
. I would suggest the best case here would be to add a new constant with the correct spelling and then keep the old constant, deprecate it and then use the new constant to give the old constant it's value. Something like:
/**
* @deprecated see self::SINGLE_PRODUCT_LAYOUT_HANDLE
*/
const SINGLE_PRODUCT_LAYOUT_HANLDE = self::SINGLE_PRODUCT_LAYOUT_HANDLE;
const SINGLE_PRODUCT_LAYOUT_HANDLE = 'catalog_product_view_id_{{ID}}';
This way anyone relying on the old constant will still have the constant but all the magento core code that uses it will have been updated to use the new constant.
Deprecate old constant with typo and introduce new correct spelled one.
Hi @dmanners. Thanks for your feedback - I've now deprecated the old constant like you've suggested. I've already tried to sign the CLA three times - I don't know, why it isn't recognized as signed 😞 EDIT: CLA problem is solved. I missed to set the correct name used for the PR in the profile. |
The constant
SINGLE_PRODUCT_LAYOUT_HANLDE
contains a typo. It should beSINGLE_PRODUCT_LAYOUT_HANDLE
.Description
Correct spelling of "handle" in
SINGLE_PRODUCT_LAYOUT_HANLDE
constant inMagento\Widget\Model\Widget\Instance
Fixed Issues (if relevant)
--
Manual testing scenarios
--
Contribution checklist