Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mecjos's avatar

PHP Parse Error After Composer Update

Hi.. I run composer update in order to upgrade laravel/framework from 8.12 to 8.42 and after update I get following error while authenticating.

ParseError: syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE) in file /home/vagrant/code/vendor/lcobucci/clock/src/SystemClock.php on line 13
0 likes
8 replies
mecjos's avatar

@tykus thanks for fast replay.. it says "8.0" (the default) is default in doc but mine is 7.4.... I run sudo update-alternatives --config php this command and select 8.0.0 now it seems 8.0.0.rc when I check the version but I get same error via composer version check.. I think I need to update something.. How Can I see which php versions supported in my homestead?

tykus's avatar
tykus
Best Answer
Level 104

@mecjos I haven't used Homestead for years now... but it does seem like you are using an older version. Check out the Updating Homestead docs

1 like

Please or to participate in this conversation.