Skip to content

[Forwardport] Fix type hint of customer-data updateSectionId parameters#18565

Merged
magento-engcom-team merged 4 commits intomagento:2.3-developfrom
gelanivishal:2.3-develop-PR-port-16115
Nov 14, 2018
Merged

[Forwardport] Fix type hint of customer-data updateSectionId parameters#18565
magento-engcom-team merged 4 commits intomagento:2.3-developfrom
gelanivishal:2.3-develop-PR-port-16115

Conversation

@gelanivishal
Copy link
Contributor

@gelanivishal gelanivishal commented Oct 12, 2018

Original Pull Request

#16115

Description

The type hint wrongly indicates the parameter should be a number, where in fact it is a boolean.
It is passed through to the server side to the controller action
\Magento\Customer\Controller\Section\Load::execute()
where it is cast to a bool and passed as the $updateIds parameter to
\Magento\Customer\CustomerData\SectionPool::getSectionsData(),
and from there as the boolean parameter $forceUpdate to the \Magento\Customer\CustomerData\Section\Identifier::initMark()` method.

This PR introduces no backward incompatibilities, it only fixes the type
hint to make the code more readable and improve compatibility with static
code analysis tools.

Fixed Issues (if relevant)

I didn't bother first opening an issue about this small change.

Manual testing scenarios

None, since it's only a comment change.

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)

Vinai added 4 commits October 12, 2018 17:58
The typehint wrongly indicates the parameter should be a number, where
in fact it is a boolean.
It is passed through to the server side to the controller action
\Magento\Customer\Controller\Section\Load::execute()
where it is cast to a boolean and passed as the $updateIds parameter to
\Magento\Customer\CustomerData\SectionPool::getSectionsData()
and from there as the boolean parameter $forceUpdate to the
\Magento\Customer\CustomerData\Section\Identifier::initMark() method.

This PR introduces no backward incompatibilities, it only fixes the type
hint to make the code more readable and improve compatibility with static
code analysis tools.
@magento-engcom-team
Copy link
Contributor

Hi @gelanivishal. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me $VERSION instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-3201 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @gelanivishal. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

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.

4 participants