Skip to content

[Backport] type casted $qty to float in \Magento\Catalog\Model\Product::setQty()#1

Closed
lewisvoncken wants to merge 5098 commits into2.2-developfrom
2.2-develop-PR-port-18149
Closed

[Backport] type casted $qty to float in \Magento\Catalog\Model\Product::setQty()#1
lewisvoncken wants to merge 5098 commits into2.2-developfrom
2.2-develop-PR-port-18149

Conversation

@lewisvoncken
Copy link
Copy Markdown
Owner

Original Pull Request

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

Description

\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? magento/magento2#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)

OlgaVasyltsun and others added 30 commits September 18, 2018 16:32
 - Merge Pull Request magento#18113 from ihor-sviziev/magento2:new-relic-15947-fixes
 - Merged commits:
   1. be7e142
   2. 2a709c1
   3. 63c51f4
   4. 3eec546
…agento#18098

 - Merge Pull Request magento#18098 from torreytsui/magento2:feature/fix-shipping-discount-failed-to-apply
 - Merged commits:
   1. 1010526
… stores magento#18000

 - Merge Pull Request magento#18000 from nntoan/magento2:2.2-develop
 - Merged commits:
   1. 1172aae
…agento#18127

 - Merge Pull Request magento#18127 from dmytro-ch/magento2:2.2-develop-PR-port-18043
 - Merged commits:
   1. 8ebd99a
…dmin if "Minimum Order Amount" does not match Order total
…dmin if "Minimum Order Amount" does not match Order total
- Merged branch 'publication/2.2' into 'mainline/2.2-develop'
- Updated composer lock
 - Merge Pull Request magento#18137 from sidolov/magento2:readme-md-update-2.2-develop
 - Merged commits:
   1. e51945a
…ird product, to prevent other tests interfering
…y unrelated) tests are failing because they have hard coded product counts impacted by other tests
…dmin if "Minimum Order Amount" does not match Order total
… invalid credit card number is entered the loader keeps spinning forever without any error message
magento-engcom-team and others added 28 commits October 4, 2018 10:44
…#14630

- Merge Pull Request magento#14630 from AnshuMishra17/magento2:patch-2
 - Merged commits:
   1. dab8c38
   2. 97f5978
   3. 2b4ca2e

# Conflicts:
#	app/code/Magento/Sales/Controller/Adminhtml/Order/MassCancel.php
#	app/code/Magento/Sales/Test/Unit/Controller/Adminhtml/Order/MassCancelTest.php
…If invalid cr… magento#17986

 - Merge Pull Request magento#17986 from passtet/magento2:github-17964
 - Merged commits:
   1. 41def56
   2. 1f08cd1
   3. edea5c5
…o use Interface magento#18377

 - Merge Pull Request magento#18377 from JeroenVanLeusden/magento2:patch-1
 - Merged commits:
   1. e803e6a
   2. 21dfeae
   3. 0ecf1fa
   4. 2569a0b
[TSG] Backporting for 2.2 (pr48) (2.2.8)
 - merged latest code from mainline branch
Accepted Public Pull Requests:
 - magento#18375: Backport 2.2 - Fix wrong reference in google analytics module layout xml (by @sambolek)
 - magento#18369: [Backport] Fix throwing error by checkout error processor model (by @ihor-sviziev)
 - magento#18283: [Backport] Fix for removing the dirs while creating a TAR archive (by @haroldclaus)
 - magento#18377: [Backport 2.2-develop] Refactor Mass Order Cancel code to use Interface (by @JeroenVanLeusden)
 - magento#17986: Implemented 17964: Backend Order creation Authorizenet: If invalid cr� (by @passtet)
 - magento#17882: Do not overwrite URL Key with blank value (by @josephmcdermott)


Fixed GitHub Issues:
 - magento#16497: Magento 2.2.5: Google Analytics not added to head correctly (reported by @WalterSmulders) has been fixed in magento#18375 by @sambolek in 2.2-develop branch
   Related commits:
     1. 0189014

 - magento#18330: Checkout - Infinite loading indicator when server returned error (reported by @ihor-sviziev) has been fixed in magento#18369 by @ihor-sviziev in 2.2-develop branch
   Related commits:
     1. 74bed69

 - magento#17023: CSV Import of `sku,attribute` empties `url_key` value (reported by @josephmcdermott) has been fixed in magento#17882 by @josephmcdermott in 2.2-develop branch
   Related commits:
     1. a021d5f
     2. a02bf03
     3. e48683c
     4. 7df4e12
     5. fffb6ff
     6. 002aa19
     7. 172e2ec
     8. 3a54946
     9. 2fb7183
     10. fda664a
     11. abd95bd
     12. 0f26b52
…"Price" (without discount) after Updated Items and Quantities in the Order.
[TSG] Backporting for 2.2 (pr49) (2.2.8)
lewisvoncken pushed a commit that referenced this pull request Oct 6, 2018
[Backport] Use route ID when creating secret keys in backend menus instead of route name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.