2

I try to change PHP version used by valet, so I execute following command:

valet use php@7.4

Valet return a success message: Valet is now using php@7.4.

But if I use phpinfo() on a .test website, I see that php is in 7.3.

I've changed the php version several times this way, it always worked. I don't understand what's wrong now...

ZecKa
  • 2,552
  • 2
  • 21
  • 39

3 Answers3

11

Building on ZecKa's answer, I was able to get it working with just these commands:

valet stop
rm ~/.config/valet/valet.sock
valet start
clifgriffin
  • 2,008
  • 3
  • 21
  • 41
3

Finally I got the solution on github

I have to execute following commands:

valet stop
valet uninstall
rm ~/.config/valet/valet.sock
valet install
ZecKa
  • 2,552
  • 2
  • 21
  • 39
1

if you're global php is correctly set (according to your global dependencies -usually is the highest version you got) you can go with

valet use php@7.4 --force

it just stops php, nginx, and restarts them all using the correct version.

pippoBoy
  • 11
  • 2