Magento CE 2.3.3
PHP 7.2
When installing modules the Dependency check fails and when i try and run any composer related commands via SSH like composer help etc I get this error message
Warning: Unsupported declare 'strict_types' in /home/vendor/magento/inventory-composer-installer/src/Plugin.php on line 6
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/vendor/magento/inventory-composer-installer/src/Plugin.php on line 55
I have tried changing memory limits and has not helped, googled and tried multiple fixes and nothing seems to work.
Any help GREATLY appreciated, have been pulling my hair out
I'm facing same issue. I'm using PHP 7.3.16 (cli) and Magento CE 2.3.4 There is no solution published on the web. I hope that Magento Forums may help us.
I solved this issue by upgrading System PHP Version to 7.2. If you use CPANEL or WHM on VPS note that System PHP Version may different that PHP Version per Domain.