shivammathur / homebrew-php

:beer: Homebrew tap for PHP 5.6 to 8.4. PHP 8.4 is built nightly.

Home Page:https://github.com/shivammathur/homebrew-php/packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Impossible to switch back to PHP 8.0 from 8.1

brendt opened this issue · comments

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)

@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

Gotcha, thanks for clarifying!

FYI it seems like Laravel valet also breaks because of this, I guess it's just waiting for brew at this point…

@brendt @nicoverbruggen

Please run brew update. This should be fixed now.