I have a very annoying problem on my Magento 2.3.3 installation. The composer doesn't work properly. I can't run any composer update, composer require etc. Every-time I try to do that, it gives me this error:

Fatal error: Uncaught TypeError: Return value of Magento\InventoryComposerInstaller\Plugin::initModuleDeployment() must be an instance of Magento\InventoryComposerInstaller\void, none returned in /vendor/magento/inventory-composer-installer/src/Plugin.php:69
Stack trace:
#0 [internal function]: Magento\InventoryComposerInstaller\Plugin->initModuleDeployment(Object(Composer\Script\Event))
#1 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(176): call_user_func(Array, Object(Composer\Script\Event))
#2 phar:///opt/cpanel/composer/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(96): Composer\EventDispatcher\EventDispatcher->doDispatch(Object(Composer\Script\Event))
#3 phar:///opt/cpanel/composer/bin/composer/src/Composer/Installer.php(204): Composer\EventDispatcher\EventDispatcher->dispatchScript('pre-update-cmd', true)
#4 phar:///opt/cpanel/composer/bin/composer/src/Composer/Command/UpdateCommand.php(162): Composer\Inst in /vendor/magento/inventory-composer-installer/src/Plugin.php on line 69

Before answer this question saying "This is a compatibility issue, try to verify your memory limit, php version etc etc", this is NOT a compatibility issue.

I have enough memory limit and I have PHP 7.1 installed.

PS, even if I try to run the composer ignoring requirements (--ignore-platform-reqs) it gives me the same error!

PLEASE, I need somebody to help me on that!


Have a look at the Magento 2.3.x Technology stack requirements, but in your case, PHP 7.1 is using.

You can install PHP 7.2 or PHP 7.3 and use any of the PHP version.

The reason is that some PHP functions in the Magento core only compatible with PHP 7.2 or PHP 7.3.

But before do this, rename the vendor folder by mv vendor bkup_vendor or remove it rm -rf vendor/.

Use below guide for Fresh Magento installation.


Hope you will get an idea.

  • I did that, the problem is after a certain amount of time and after downloding some packages, it will give me this error: Fatal error: Allowed memory size of 1610612736 bytes exhausted If I check the memory it shows 256M, but in reality it is set to be 2048M (I even tried to set it to -1). It just doesn't change :/ Feb 23 '20 at 18:39
  • 1
    Ok, finally I "fixed" it. In order to run composer update, here is the command I have to run: COMPOSER_MEMORY_LIMIT=-1 composer update --no-plugins --no-dev If I wanna install an extension, here is what I have to do: COMPOSER_MEMORY_LIMIT=-1 composer require company/module --no-plugins Do you know How can I avoid doing all of this? Feb 23 '20 at 23:40
  • Great to hear that. Feb 24 '20 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.