-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Inheriting from a class that doesn't exist#33334 #33449
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
Inheriting from a class that doesn't exist#33334 #33449
Conversation
- Changed PRICE_CODE constant from non-exist class to $this class
- calculateDiscount method must be point as FinalPrice to its class but in ConfiguredPrice.php this method not exist. Also in FinalPrice invokes the \Magento\Bundle\Pricing\Price\DiscountCalculator::calculateDiscount - added unit test for method getValue
Hi @monteshot. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
- Removed unnecessary nesting in if statements according to the interface
…sn't_exist#33334' into Inheriting_from_a_class_that_doesn't_exist#33334
Hello. Thanks. |
Neither module.xml nor composer.json i cannot change version because its absent in both files |
- Removed unnecessary properties from test class
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
- Update the unit test for getter in case non-existing the item
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
- Made changes backwards compatible.
@magento run all tests |
Hi @bgorski, thank you for the review. |
Hi @Den4ik, thank you for the review. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
|
@magento run Functional Tests EE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
✔️ QA Passed Hello @monteshot, I have tested this fix by setting items previously using the setItem method. Below is the before and after fix screenshot: Before ✖️ After ✔️ Verified that the below fatal error should not come:
Tested all the manual scenarios, no impact on regression testing. Thanks |
Hi @monteshot, thank you for your contribution! |
This class already have its own constant on 28 line.
const PRICE_CODE = self::CONFIGURED_PRICE_CODE;
The related issue Inheriting from a class that doesn't exist #33334
Description (*)
The class that responsible for getting price value uses not valid constant.
I was remove incorrect constant and add the constant from this class that can be correctly overrided.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
\Magento\Catalog\Pricing\Price\ConfiguredPriceInterface::CONFIGURED_PRICE_CODE is in Magento\Bundle\Pricing\Price\Pool
Questions or comments
Comments:
The class that inherits this class already have the Unit test
\Magento\Catalog\Test\Unit\Pricing\Price\ConfiguredPriceTest but it.
Also i wrote unit for getValue method
Normally on frontend the code with error not invokes. It seems to be fallback.
This code may crash when unit tests executing
Contribution checklist (*)