Created
March 8, 2019 09:17
-
-
Save DavidMRGaona/110a5270399ee9036be7607bced96a04 to your computer and use it in GitHub Desktop.
Script to easily change PHP version in OS X with brew
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
#!/bin/bash | |
phpv() { | |
valet stop | |
brew unlink php@5.6 php@7.0 php@7.1 php@7.2 | |
brew link --force --overwrite $1 | |
brew services start $1 | |
composer global update | |
valet install | |
} | |
alias php56="phpv php@5.6" | |
alias php70="phpv php@7.0" | |
alias php71="phpv php@7.1" | |
alias php72="phpv php" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment