Created
January 27, 2021 16:36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch-php() { | |
valet stop | |
brew unlink php@7.2 php@7.3 php@7.4 | |
brew link --force --overwrite php@$1 | |
brew services restart php@$1 | |
composer global update | |
rm -f ~/.config/valet/valet.sock | |
valet install | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alternative for the
brew unlink
line:brew list --formula -1 | grep php | grep @ | xargs brew unlink
This will unlink all php versions you have installed, without manually having to list them all.