Skip to content

Conversation

@lewisvoncken
Copy link
Contributor

…t::setQty()

type casted $qty to float in \Magento\Catalog\Model\Product::setQty()

Description

Backport PR #18149

\Magento\Catalog\Model\Product::getQty() should return float/double now, as mentioned in it's Doc-block

Fixed Issues (if relevant)

  1. Should getQty() return int/float or string? #18094: Should getQty() return int/float or string?

Manual testing scenarios

  1. Observe any event like checkout_cart_product_add_after
  2. In the Observer, get an instance of \Magento\Catalog\Model\Product
  3. Calling the getQty method of the above-mentioned class would return a float/double instead of string, as expected

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)

@magento-engcom-team magento-engcom-team added this to the Release: 2.2.8 milestone Oct 19, 2018
@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

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

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

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