Skip to content
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

PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento\InventoryReservationsApi\Model\ReservationBuilderInterface #2715

Closed
andrewizotov opened this issue Nov 16, 2019 · 4 comments

Comments

@andrewizotov
Copy link

Preconditions (*)

  1. version 2.3.3

Steps to reproduce (*)

  1. run setup:upgrade

Expected result (*)

  1. setup:upgrade has to be done without errors

Actual result (*)

php bin/magento setup:upgrade
PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento\InventoryReservationsApi\Model\AppendReservationsInterface in /private/var/www/tourvest/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:58
Stack trace:
#0 /private/var/www/tourvest/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Invento...')
#1 /private/var/www/tourvest/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Invento...')
#2 /private/var/www/tourvest/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\Invento...', NULL, 'appendReservati...', 'Magento\Invento...')
#3 /private/var/www/tourvest/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime( in /private/var/www/tourvest/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 58

Fatal error: Uncaught Error: Cannot instantiate interface Magento\InventoryReservationsApi\Model\AppendReservationsInterface in /private/var/www/tourvest/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 58

Error: Cannot instantiate interface Magento\InventoryReservationsApi\Model\AppendReservationsInterface in /private/var/www/tourvest/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 58

@andrewizotov
Copy link
Author

andrewizotov commented Nov 16, 2019

I just added to app/etc/di.xml
two lines :
<preference for="Magento\InventoryReservationsApi\Model\ReservationBuilderInterface" type="Magento\InventoryReservations\Model\ReservationBuilder"/> <preference for="Magento\InventoryReservationsApi\Model\AppendReservationsInterface" type="Magento\InventoryReservations\Model\AppendReservations"/>
and my setup upgrade is finished

@OleksiiStepanov
Copy link

Looks like one of Inventory modules is not enabled. You should enable modules Magento_InventoryReservation, Magento_InventoryReservationApi

@andrewizotov
Copy link
Author

Hi @OleksiiStepanov , thanks a lot , it helped definitely .

@jrosell
Copy link

jrosell commented Aug 18, 2020

I just added to app/etc/di.xml
two lines :
<preference for="Magento\InventoryReservationsApi\Model\ReservationBuilderInterface" type="Magento\InventoryReservations\Model\ReservationBuilder"/> <preference for="Magento\InventoryReservationsApi\Model\AppendReservationsInterface" type="Magento\InventoryReservations\Model\AppendReservations"/>
and my setup upgrade is finished

I think it should be possible to disable all Magento_Inventory* modules without having to include this lines or at least should be documented here: https://devdocs.magento.com/extensions/inventory-management/#disable-inventory-management

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants