I'm getting this when i'm trying to install an extension.
Warning: Unsupported declare 'strict_types' in /home/SITE_NAME/public_html/vendor/magento/inventory-composer-installer/src/Plugin.php on line 6
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/SITE_NAME/public_html/vendor/magento/inventory-composer-installer/src/Plugin.php on line 55
I have : CentOS Linux release 7.5.1804 (Core); PHP 7.2 (via cPanel) ; Latest magento 2.3.3 CE
php -v PHP 5.6.40 (cli) (built: Oct 29 2019 08:07:50)
Need Some Help
-
Your command line is using php5.6. Need to use php7. I just typed up how to use alias to run composer with different php versions on cpanel server magento.stackexchange.com/a/294937/70343Dominic Pixie– Dominic Pixie2019年11月07日 23:38:45 +00:00Commented Nov 7, 2019 at 23:38
2 Answers 2
either you could update your php to 7.X version or downgrade your ProxyManager. this will fix your problem.
In my issue I have resolved it like this php /path_to_composer/composer.phar install So try to find right version of php and run composer by php