PHP environment toolchain for macOS.
- Auto switching between PHP versions based on the project's composer.json file.
- phpup relies on homebrew-installed PHP. This means multiple PHP versions must be installed with homebrew first.
Clone the repository:
git clone https://github.com/priyashpatil/phpup.git
Run the installation script by executing the following command:
./bin/install.sh
Add the following line to your ~/.bashrc
or ~/.zshrc
file:
source ~/.phpup/source.sh
phpup automatically detects the required PHP version by inspecting the composer.json
file located at the root of your project. However, if you need to set a specific PHP version, you can do so by creating a .phpuprc
file in your project's root directory.
php_version=8.1
To enable debug statements add debug_phpup=1
above the source ~/.phpup/source.sh
in .zshrc
or .bashrc