cancel
Showing results for 
Search instead for 
Did you mean: 

Error when running the command composer require stripe/stripe-php:^7

Error when running the command composer require stripe/stripe-php:^7

Hi

 

I am fairly new to Magento 2 and struggling with an error that I am receiving when running a command to install any extensions through composer, I keep getting the below error:

 

composer require stripe/stripe-php:^7

Warning: Unsupported declare 'strict_types' in /home/user/public_html/vendor/magento/inventory-composer-installer/src/Plugin.php on line 6

Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/user/public_html/vendor/magento/inventory-composer-installer/src/Plugin.php on line 55

 

I would really appreciate if someone can help me with this.

 

Thanks

 

1 REPLY 1

Re: Error when running the command composer require stripe/stripe-php:^7

Hello,
Actually, this issue is occurring due to a PHP version issue, so if you are using cPanel or WHM on VPS Note that the system PHP version may be different than the PHP version per domain, so please check it and upgrade the PHP version and try to install.

Thanks.