Open kassner opened 4 years ago
Hi @kassner. Thank you for your report. To help us process this issue please make sure that you provided the following information:
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:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
Please, add a comment to assign the issue: @magento I am working on this
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Thank you for your contributions.
up
:white_check_mark: Confirmed by @gabrieldagama
Thank you for verifying the issue. Based on the provided information internal tickets MC-40335
were created
Issue Available: @gabrieldagama, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!
up
Summary
\Magento\Shipping\Model\Carrier\AbstractCarrierInterface::collectRates currently has in its signature that it will return
\Magento\Framework\DataObject
, but technically\Magento\Shipping\Model\Rate\Result
is used everywhere, and it does not inherit the DataObject, so the signature is, de facto, incorrect.Examples
\Magento\Shipping\Model\Shipping:
Both append methods expect the result class:
Some Magento shipping modules also don't expect the DataObject to be used:
Flatrate:
Freeshipping:
UPS:
Fedex:
Basically no class expects
\Magento\Framework\DataObject
, as the AbstractCarrierInterface::collectRates() suggests.Proposed solution
Change the method's signature to reflect the real world, but the method is marked with
@api
, so I don't know how to proceed.