Skip to content

How to add a php version? #164

Answered by nicoverbruggen
mattiaz9 asked this question in Q&A
Discussion options

You must be logged in to vote

Sometimes, Homebrew might unlink installed versions of PHP when you upgrade the currently linked version. (Upgrading dependents can happen when you run brew upgrade, which may result in an older version of PHP breaking. I've experienced this myself too.)

Here's what I usually do:

valet stop

This will halt the Valet services and make it easier to reinstall/uninstall specific PHP versions on Valet 3.1 and up.

Then, reinstall PHP 7.4:

brew reinstall php@7.4

And then restart Valet:

valet start

That usually fixes it.

Here's how it works under the hood... PHP Monitor scans the following directories:

  • /opt/homebrew/Cellar for directories starting with php (on Apple M1 Macs)
  • /usr/local/Cellar

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mattiaz9
Comment options

Answer selected by mattiaz9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants