statamic / ssg

The official Statamic Static Site Generator
233 stars 24 forks source link

Syntax error when updating Statamic and Statamic SSG #80

Closed clivewalker closed 2 years ago

clivewalker commented 2 years ago

I'm getting the following syntax error when updating Statamic/SSG

I'm running composer update statamic/cms --with-all-dependencies

which results in this error:

Symfony\Component\Debug\Exception\FatalThrowableError  : syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')'
at /starter-kit-cool-writings/vendor/statamic/ssg/src/Generator.php:287

Can you help?

jasonvarga commented 2 years ago

The SSG requires PHP 7.4. (Admittedly, it doesn't say this anywhere, but anything lower than 7.4 is super old now)

clivewalker commented 2 years ago

Weird. I was using 7.4.12. Upgraded to 8.0.0 and still get the error when updating Statamic. Do I need to run another update for Statamic SSG. If yes, what's the command for this?

jasonvarga commented 2 years ago

How are you confirming the PHP version? Are you running php -v in your terminal?

clivewalker commented 2 years ago

Ah, I see what you mean. PHP version on Mac. Not PHP version on virtual server. Looks like 7.3.29 so I will investigate updating that. Thanks for your help.