Latest update to homebrew seems to remove the php/php72 formula in favour of just /php
Valet then generates an error "Unable to determine linked PHP" from here https://github.com/laravel/valet/blob/master/cli/Valet/Brew.php#L187
I was able to fix by changing
https://github.com/laravel/valet/blob/master/cli/Valet/Brew.php#L55
to be
return collect(['php','php72', 'php71', 'php70', 'php56']);
however I'm not sure if that's what is needed long term - it has got Valet working again on my machine though.
I encountered the same exact issue. Homebrew changed their php naming conventions: which should have been 'php72' is now simply 'php'. The workaround you suggest is only a first step towards the solution.
To completely solve the issue update /vendor/laravel/valet/cli/Valet/PhpFpm.php with https://gist.github.com/benoitvilliere/f1853030efb437891958921dea4bf4bb
There are some interesting pull requests pending that might solve this so I'm not posting this as a pull request, I consider it a quick fix as there might be better ways to solve the issue. I just needed to get back to work!
I confirm that Valet is broken since the latest homebrew php update
@Alshie's fix seems to be working for me so far. For those who are having trouble finding the file to edit (like I did) it's at: ~/.composer/vendor/laravel/valet/cli/Valet/Brew.php, then edit line 55.
Thanks for the report, fixed on master.
Most helpful comment
Thanks for the report, fixed on master.