Impossible to switch back to PHP 8.0 from 8.1
brendt opened this issue · comments
Brent Roose commented
This is my current situation:
~ php -v
PHP 8.1.0 (cli)
Trying to link 8.0 instead:
~ brew link --overwrite --force php@8.0
Warning: Already linked: /opt/homebrew/Cellar/php/8.1.0_1
To relink, run:
brew unlink php && brew link php
Next I try to run this:
~ brew unlink php
Unlinking /opt/homebrew/Cellar/php/8.1.0_1... 24 symlinks removed.
~ brew link --overwrite --force php@8.0
Linking /opt/homebrew/Cellar/php/8.1.0_1... 24 symlinks created.
But php -v still lists 8.1:
~ php -v
PHP 8.1.0 (cli)
Shivam Mathur commented
@brendt
This is a temporary issue till homebrew/core updates their PHP formulae as well.
Till then, prefix the formula name with the tap's name shivammathur/php/php@8.0
brew link --overwrite --force shivammathur/php/php@8.0
Brent Roose commented
Gotcha, thanks for clarifying!
Brent Roose commented
FYI it seems like Laravel valet also breaks because of this, I guess it's just waiting for brew at this point…
Shivam Mathur commented
Please run brew update
. This should be fixed now.