Skip to content

Instantly share code, notes, and snippets.

@mitchjam
Last active May 26, 2020 23:13
Show Gist options
  • Save mitchjam/6f478301817771301ede4b93006be88a to your computer and use it in GitHub Desktop.
Save mitchjam/6f478301817771301ede4b93006be88a to your computer and use it in GitHub Desktop.
Use old versions of PHP with Laravel Valet via Homebrew

Homebrew removes old versions of php

And, since Laravel Valet uses Homebrew in it's valet use [email protected] command,
that means trying to install [email protected] now breaks because Homebrew removed it from it's core.

To install [email protected] with Homebrew

We need to tap a barrel that has the [email protected] formula.

brew tap exolnet/homebrew-deprecated

^this is a tap I found that had the [email protected] and [email protected] formulas

Now we can call, as normal:

valet use [email protected]

...as well as the standard brew commands

brew install [email protected]
brew link [email protected]

@rcubitto
Copy link

rcubitto commented May 26, 2020

That worked but wasn't enough for me. I had to reinstall PHP 7.1 from source.

$ brew list --versions icu4c
icu4c 66.1

$ brew list --versions openssl
[email protected] 1.1.1g

$ brew reinstall --build-from-source [email protected]

$ php -v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment