-
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
dependency injection fails for \Magento\ConfigurableProduct\Pricing\Price\PriceResolverInterface #23717
Comments
Hi @ioweb-gr. 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. @ioweb-gr do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Issue is reproducible in Magento 2.3-develop and is coming because no preference are added for PriceResolverInterface. |
Hi @edenduong. Thank you for working on this issue.
|
✅ Confirmed by @edenduong |
@edenduong Thank you for verifying the issue. Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
Once all required information is added, please add label |
Yes, the reason because no preference of PriceResolverInterface in di.xm |
Hi @shikhamis11. Thank you for working on this issue.
|
✅ Confirmed by @shikhamis11 Issue Available: @shikhamis11, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
since the issue is fixed and merged to 2.3-develop branch I am closing this one |
Unlike other interface classes the \Magento\ConfigurableProduct\Pricing\Price\PriceResolverInterface doesn't seem to be usable via dependency injection.
Preconditions (*)
Steps to reproduce (*)
e.g.
Expected result (*)
Actual result (*)
PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento\ConfigurableProduct\Pricing\Price\PriceResolverInterface in /private/magento/2x/default/httpdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50
Stack trace:
#0 /private/magento/2x/default/httpdocs/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Configu...')
Can you commit to repository a folder dev/tests/static ? #1 /private/magento/2x/default/httpdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Configu...')
BUG FIX - Uncaught exception when accessing admin with none existent use... #2 /private/magento/2x/default/httpdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Configu...', NULL, 'configurableReg...', 'Vendor\Module...')
__DIR__ Typo fixed #3 /private/magento/2x/default/httpdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManage in /private/magento/2x/default/httpdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50
The text was updated successfully, but these errors were encountered: