All Projects → wilmoore → Php Version

wilmoore / Php Version

Licence: mit
stupid simple PHP version management

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Php Version

Generator Loopback Vue
app版本管理,(热更新)前后端分离,vue page分页功能,authenticate 权限控制,accesstoken机制,credentials,CI,docker
Stars: ✭ 202 (-68.29%)
Mutual labels:  version-manager
godot-hub
A hub for your Godot needs
Stars: ✭ 17 (-97.33%)
Mutual labels:  version-manager
G
Golang Version Manager
Stars: ✭ 285 (-55.26%)
Mutual labels:  version-manager
svm-rs
Solidity-Compiler Version Manager
Stars: ✭ 114 (-82.1%)
Mutual labels:  version-manager
alt
A simple version manager. Tool for switching between different versions of commands
Stars: ✭ 71 (-88.85%)
Mutual labels:  version-manager
snowfs
SnowFS - a fast, scalable version control file storage for graphic files 🎨
Stars: ✭ 1,101 (+72.84%)
Mutual labels:  version-manager
Fvm
Flutter Version Manager. Flutter 多版本管理工具。 本地缓存安装多个 Flutter 版本,随时快速切换
Stars: ✭ 170 (-73.31%)
Mutual labels:  version-manager
Cpm.cmake
📦 CMake's missing package manager. A small CMake script for setup-free, cross-platform, reproducible dependency management.
Stars: ✭ 560 (-12.09%)
Mutual labels:  version-manager
unity-version-manager
A commandline application to manage unity versions
Stars: ✭ 18 (-97.17%)
Mutual labels:  version-manager
Yvm
🧶 Manage multiple versions of Yarn
Stars: ✭ 265 (-58.4%)
Mutual labels:  version-manager
nodenv-nvmrc
nodenv plugin that detects the node version based on .nvmrc.
Stars: ✭ 30 (-95.29%)
Mutual labels:  version-manager
zsh-lazyenv
Environments for lazy load commands and speed up start up time of zsh
Stars: ✭ 16 (-97.49%)
Mutual labels:  version-manager
flora
Upgrade and version manager for terraform
Stars: ✭ 16 (-97.49%)
Mutual labels:  version-manager
Nvm Windows
A node.js version management utility for Windows. Ironically written in Go.
Stars: ✭ 18,587 (+2817.9%)
Mutual labels:  version-manager
G
Simple go version manager, gluten-free
Stars: ✭ 307 (-51.81%)
Mutual labels:  version-manager
Plugin Nvm
Node version manager wrapper for Fish shell
Stars: ✭ 173 (-72.84%)
Mutual labels:  version-manager
govm
Govm is a fast and flexible Go version manager built with Go.
Stars: ✭ 17 (-97.33%)
Mutual labels:  version-manager
Snowfs
SnowFS - a fast, scalable version control file storage for graphic files 🎨
Stars: ✭ 590 (-7.38%)
Mutual labels:  version-manager
Asdf Plugins
Central plugin repository for asdf
Stars: ✭ 350 (-45.05%)
Mutual labels:  version-manager
dvm
A lightweight, and powerful Deno Version Manager for Linux/macOS.
Stars: ✭ 21 (-96.7%)
Mutual labels:  version-manager

simple PHP version switching

php-version exposes a php-version command allowing developers to switch between versions of PHP.

This IS for you if

  • You are not satisifed with heavy handed *AMP or PPA-based installers.
  • You use multiple versions of PHP on Linux or Mac.
  • You download pre-compiled PHP binaries for Windows (NOTE: this is a bash script so you'll need WSL).
  • You want to run your automated tests against multiple PHP versions.
  • You are a developer that works on a variety of PHP projects each requiring different versions of PHP.
  • You want to work on the latest PHP, but expect to support prior work that was done on older PHP versions.

This is NOT for you if

  • You are content with heavy handed *AMP installers.
  • You are provisioning a production server so you only need a single PHP install.
  • You NEVER work on more than one PHP project at a time.
  • You don't plan on supporting prior work that was done on other PHP versions.

Rationale

php-version attempts to stick to the classic UNIX notion that tools should do one thing well.

While there are smart alternative tools that attempt to solve this problem, none of the tools I've found were simple enough for me.

Features

  • Homebrew installed PHP versions are picked up automatically.
  • PHP versions installed into ~/.phps are picked up automatically.
  • PHP versions listed in the $PHP_VERSIONS shell variable are picked up automatically.
  • snap versioning: Use a partial version number (i.e. php-version 5) to automatically use the latest 5.x version.
  • per version php.ini: we export PHPRC if a version-specific php.ini exists.
  • configurable: php-version --help for details.
  • bash, zsh, and fish shells actively supported; though care has been taken such that other shells are likely to work as well.
  • tiny: less than 200 LOC; a single function sourced via your shell's initialization file.

Non-Features

  • no shims, sub-shells, symlinks or cd hooks.
  • we won't leave files and symlinks all over the place.
  • does not attempt to manage Apache, MySQL, etc.
  • does not attempt to compile, build, or install PHP.
  • does not attempt to support OS package manager installed (i.e. ppa, etc.) PHP versions.

Usage Examples

Switch to a specific PHP version

% php-version <version>

List installed and active (*) PHP version(s)

% php-version
  5.3.9
  5.3.10
  5.4.0RC8
  5.4.0RC6
  5.4.0
* 5.4.8

Install

homebrew (recommended for OSX users)

% brew tap wilmoore/formulae
% brew install php-version

cURL (for non-OSX users or those that prefer not to use homebrew):

% mkdir -p $HOME/local/php-version # or your place of choice
% cd !$
% curl -# -L https://github.com/wilmoore/php-version/tarball/master | tar -xz --strip 1

Alternative (i.e. non-Homebrew) installation methods are documented on the wiki.

Setup

Add one of the following to your shell's initialization file:

# Homebrew (recommended)
source $(brew --prefix php-version)/php-version.sh
php-version 5

# non-Homebrew
source $HOME/local/php-version/php-version.sh # or your place of choice
php-version 5

Type php-version --help for more configuration options such as how to add extra PHP installation paths or php-config --version to find out which php version is active.

If you have PHP versions in multiple directories, you can list them in the environment variable PHP_VERSIONS separated by spaces as depicted below:

export PHP_VERSIONS="$HOME/local/php $HOME/php/versions"

NOTE: do this before you source php-version.sh:

Deactivate / Uninstall

  1. Remove setup configuration.

  2. Enter one of the following commands listed below to remove associated files.

     # Homebrew (recommended)
     % brew remove --force php-version
    
     # non-Homebrew
     % rm -rf $HOME/local/php-version
    

Having Issues?

  1. Copy the bug report output to your clipboard (pbcopy works on Mac OSX; use your OS equivalent)

     % cd /tmp
     % git clone https://github.com/wilmoore/php-version.git
     % source php-version/bug-report.sh | pbcopy
    
  2. File an issue.

More Info

Contributors

https://github.com/wilmoore/php-version/graphs/contributors

Alternatives

Inspiration

LICENSE

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].