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

screwtape_mk's avatar

changing php version in valet or brew

Hi folks

please assist with the change of php version for a laravel app. The steps i have taken so far is to 'cd' to the relevant application folder and then run the command valet isolate [email protected]

and i do get the following response:

The site [bookingproject.test] is now using [email protected].

However when i check the version i still get :

PHP 8.1.13 (cli) (built: Nov 24 2022 15:58:42) (NTS)

Is there anything i am missing?

0 likes
3 replies
idew's avatar
idew
Best Answer
Level 26

Are you running PHP in the CLI as php -v? To run the isolated PHP version in the CLI, cd into your project and run valet php. You should get 7.1 if you run valet php -v.

screwtape_mk's avatar

@idew Thanks, that seems to have worked , i basically ran the following steps after i cd into my :

step 1: valet isolate [email protected] step 2: valet php -v

and it does say PHP 7.1.33

1 like
screwtape_mk's avatar

@idew ok i am now facing another issue, i notice that phpmyadmin requires v7.2.5+ and i have been able to move (down) to v7.2.34 .

when i now try to move to v7.3 using the following commands:

brew unlink [email protected] && brew link --overwrite --force [email protected] i get the following error:

Error: No such keg: /opt/homebrew/Cellar/[email protected]```

is there any intermediate step i could be missing?

Please or to participate in this conversation.