1

Error : Unsupported declare strict_types in ../vendor/magento/inventory-composer-installer while install the extension using composer in Magento 2.3.0.

0

I had the same issue, it is due to the version of PHP you are using, and the version of PHP required for Composer.

My CLI was using PHP 5.4, but I had to run it on 7.2.

So instead of running something like:

composer upgrade

I ran:

php7.2 /path/to/composer upgrade

Hope this helps. I was confused on this for a little while, as the error doesn't seem related to the PHP version, but seems like more of a bug with the installation.

  • I just realised how old this post is (so I assume you have a solution), but I couldn't find much help related to Magento 2.3, so I hope this helps anyone else who comes across it. – JamesH159 Feb 8 at 17:02
  • I'm getting this on 2.3.0 on php 7.2.14 :( – iphigenie May 2 at 11:22
  • In my case it is the multiphp had reset the php version on the composer folder, which i had to change manually with ln -s ea-php72 .ea-php-cli.cache – iphigenie May 2 at 11:29
0

if you still have this problem, just change your PHP version for CLI. If you use WHH you can change it from here:

Home »Software »MultiPHP Manager»System PHP Version click edit button and choose PHP 7.2

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.