I just tried running ./craft on a client server to remind myself how to re-save entries and got this message:
$ ./craft
PHP Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE) in /srv/users/sitename/apps/sitename/vendor/ramsey/uuid/src/functions.php on line 34
Apologies if this is completely unrelated to Craft, any idea if this is some kind of bug, or where I can ask for help?
Billythekid on Discord just confirmed the issue is that the CLI is running PHP 7.0 and this needs 7.1. Sorted!
If you add this to composer.json and then run composer update, your dependencies should all be downgraded to versions that are compatible with PHP 7.0:
"config": {
"platform": {
"php": "7.0"
}
}
Most helpful comment
If you add this to composer.json and then run
composer update, your dependencies should all be downgraded to versions that are compatible with PHP 7.0: