genesisweb / valet-linux-plus

Advanced local development experience for Linux.
MIT License
148 stars 26 forks source link

Can't Run `valet composer show` after isolating to 7.3 #142

Closed feenx closed 2 months ago

feenx commented 2 months ago

Hello,

I'm running the version 2.0.1 of this package, and I am running PHP8.2 globally.

But after running valet isolate 7.3 within a specific project, whenever I run valet composer show I get a syntax error below.

valet composer show
PHP Parse error:  syntax error, unexpected '=' in /usr/share/php/Symfony/Component/String/Resources/functions.php on line 34

It seems to be referencing Symfony files installed at /usr/share/php/Symfony which don't appear to be a version that would support PHP 7.3 as the specific null has a type of null operator not supported in PHP 7.3.

feenx commented 2 months ago

Figured out that I had installed composer using apt, and it installed its own dependencies globally.

Ran sudo apt remove composer then followed directions here: https://getcomposer.org/download/

Now, composer works when proxied through valet. Leaving this comment in case anyone else has this issue.