-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Inheriting from a class that doesn't exist #33334
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
Comments
Hi @Qikerz. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. Please, add a comment to assign the issue:
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues 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 |
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hi @Qikerz , We have checked this issue in Magento 2.4-develop branch. As per the stated file i.e.https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php#L151, has a function call of getPrice which requires a string type of argument and it is passing BundleDiscountPrice::PRICE_CODE as an arguement. It seems that, the class BundleDiscountPrice is not defined. Are you talking about the same issue? |
Hi @engcom-Hotel, Yes that's right. Also, there is no calculateDiscount function that takes a float argument $configuredOptionsAmount. |
Hi @Qikerz , Based on the comments, I am confirming this issue. |
✅ Confirmed by @engcom-Hotel Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
@magento I’m working on it |
@magento I am working on this |
Hi @monteshot! 👋 |
@magento add to contributors team |
Hi @monteshot! 👋 |
@magento I am working on this |
- 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
- Removed unnecessary nesting in if statements according to the interface
- Removed unnecessary properties from test class
- Update the unit test for getter in case non-existing the item
- Made changes backwards compatible.
- Renamed Test class according to the recommendations.
- Renamed Test class according to the recommendations.
- Clarified comment for main test method
- Adjusted code style for the unit test - Replaced FQPN using import
- Adjusted code style for configuredPriceSelection propery in the target code - Added mock suffice to last property in unit test - Added decimals after point in unit test - Transferred setting up some mocks to the specific test case
- Added space between $discountCalculator and $configuredPriceSelection properties - Updated PHPdoc in constructor
Hi @Qikerz. Thank you for your report.
The fix will be available with the upcoming 2.4.3 release. |
https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php#L151
Preconditions:
Install Magento 2.4-develop
Steps to reproduce :
Expected Result;
The class BundleDiscountPrice must be declare.
Actual Result:
This class is not defined
The text was updated successfully, but these errors were encountered: