genesisweb / valet-linux-plus

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

cant check php v #117

Closed jaroslaw-filipiak closed 10 months ago

jaroslaw-filipiak commented 11 months ago

HI ,i was switch php from 8 to 7.3 and thats works great but when i want to back to php 8 i have error and i cant switch php ver

command: valet use 8.0

response: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.3.33-14+ubuntu22.04.1+deb.sury.org+1. PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.3.33-14+ubuntu22.04.1+deb.sury.org+1. in /home/jarek/.config/composer/vendor/composer/platform_check.php on line 24

jaroslaw-filipiak commented 11 months ago

update: i have the same response even if i typo: valet , valet links etc

uttamrabadiya commented 11 months ago

Hey @jaroslaw-filipiak It's a general error by composer, I'd recommend to run composer global update command once, and then run valet use 8.0 command to switch back to 8.0.

Another tip: use valet isolate command on your specific project that you want to use 7.3 version. You can do it very easily by following command: valuet isolate 7.3 --site=site-name.localhost. Additionally you can use --secure flag to use HTTPS. Now whenever you want to run any php command within isolated project then just simply run valet php.

jaroslaw-filipiak commented 10 months ago

Thanks so much @uttamrabadiya , valet isolate is awesome command and i dont know that command exist