PHP-UP - Cross-Platform PHP version manager
:zap: PHP version manager written in rust
Features
- No requirements for system PHP installation
- Cross-platform support (Linux, macOS, Windows[WIP])
- Automatically version switching via
.php-version
Quick Start (Linux, macOS)
For bash, zsh and fish there's a installation script
|
Upgrade
To prevent duplication in your shell config file, add --skip-shell option to install command.
|
Uninstall
To remove PHP-UP, just delete the .phpup folder in your home directory.
You should also edit your shell configuration to remove any references to phpup.
Installation
Requirements
- OS: Linux, macOS, Windows[WIP]
- shell:
bash,zsh,fishorpowershell[WIP] curl,psandmakeinstallation
Installation
using a release binary
- Download the latest release binary for your system
- Make it available globally on
PATHenvironment variable
using cargo
cargo install phpup
Shell setup
Bash, Zsh
Add the following to your .bashrc or .zshrc
Fish
Create ~/.config/fish/conf.d/phpup.fish and add the following to it
phpup init --auto --recursive | source
- To automatically run
phpup usewhen a directory contains a.php-versionfile, add the--auto(long:--auto-switch) option. - To search recursively for a
.php-versionfile in a parent directory when runningphpup useautomatically, add the--recursive(long:--recursive-version-file) option. - For more options, run
phpup init --help.
Usage
PHP Installation
How to specify configure options
using the command option: --configure-opts
PKG_CONFIG_PATH="/lib/pkgconfig" \
using the shell variable: PHPUP_CONFIGURE_OPTS
PKG_CONFIG_PATH="/lib/pkgconfig" \
PHPUP_CONFIGURE_OPTS="--with-iconv=" \
using the env variable: PHPUP_CONFIGURE_OPTS
See List of core configure options for more configre options.
For more details
phpup help
Contribution
PRs Welcome :tada: