-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add Magento\ConfigurableProduct\Pricing\Price\PriceResolverInterface to di.xml in issue23717 #23753
Add Magento\ConfigurableProduct\Pricing\Price\PriceResolverInterface to di.xml in issue23717 #23753
Conversation
…to di.xml in issue23717
Hi @edenduong. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @ihor-sviziev, thank you for the review.
|
@edenduong @ihor-sviziev is it not used in core? |
Hi Orlangur, @orlangur Currently, the interface isn't injected to any class. But I think it is better if we add it in the di.xml and other modules can use the interface instead of the model PriceResolver (following to the Service Contract https://devdocs.magento.com/guides/v2.3/extension-dev-guide/service-contracts/service-contracts.html) |
And if we use the class: Magento\ConfigurableProduct\Pricing\Price\ConfigurablePriceResolver to other module, it don't think it can run. Because no preference but now it call the function of the inferface:
|
@edenduong thanks, that's what I was thinking about - it was injected by a concrete implementation and not by interface :( |
✔️ QA Passed |
Hi @edenduong, thank you for your contribution! |
…verInterface to di.xml in issue23717 #23753
Description (*)
No Preference for Magento\ConfigurableProduct\Pricing\Price\PriceResolverInterface in di.xml
Solution: Just add to di.xml
Fixed Issues (if relevant)
Manual testing scenarios (*)
e.g.
Result :The dependency is injected correctly
Questions or comments
Contribution checklist (*)