Skip to content
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

Merged
merged 2 commits into from
Dec 22, 2017

Conversation

aschrammel
Copy link

@aschrammel aschrammel commented Dec 18, 2017

The constant SINGLE_PRODUCT_LAYOUT_HANLDE contains a typo. It should be SINGLE_PRODUCT_LAYOUT_HANDLE.

Description

Correct spelling of "handle" in SINGLE_PRODUCT_LAYOUT_HANLDE constant in Magento\Widget\Model\Widget\Instance

Fixed Issues (if relevant)

--

Manual testing scenarios

--

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Fix typo in SINGLE_PRODUCT_LAYOUT_HANLDE to SINGLE_PRODUCT_LAYOUT_HANDLE
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Dec 18, 2017

CLA assistant check
All committers have signed the CLA.

@dmanners dmanners self-assigned this Dec 18, 2017
@dmanners dmanners added this to the December 2017 milestone Dec 18, 2017
@dmanners
Copy link
Contributor

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}}';
Copy link
Contributor

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.
@aschrammel
Copy link
Author

aschrammel commented Dec 18, 2017

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.

@magento-team magento-team merged commit deffe81 into magento:2.2-develop Dec 22, 2017
@aschrammel aschrammel deleted the bug/handle-typo branch December 22, 2017 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants