GithubHelp home page GithubHelp logo

masan4444 / phpup Goto Github PK

View Code? Open in Web Editor NEW
41.0 3.0 1.0 19.45 MB

Cross-Platform PHP version manager written in rust :crab:

Home Page: https://phpup.vercel.app

License: GNU General Public License v3.0

Rust 92.54% Shell 7.46%
phpup php-versions php version version-manager build-tool php-version rust

phpup's Introduction

PHP-UP - Cross-Platform PHP version manager

โšก PHP version manager written in rust

Blazing fast!

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

curl -fsSL https://phpup.vercel.app/install | bash

Upgrade

To prevent duplication in your shell config file, add --skip-shell option to install command.

curl -fsSL https://phpup.vercel.app/install | bash -s -- --skip-shell

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, fish or powershell[WIP]
  • curl, ps and make installation

Installation

using a release binary

  1. Download the latest release binary for your system
  2. Make it available globally on PATH environment variable

using cargo

cargo install phpup

Shell setup

Bash, Zsh

Add the following to your .bashrc or .zshrc

eval "$(phpup init --auto --recursive)"

Fish

Create ~/.config/fish/conf.d/phpup.fish and add the following to it

phpup init --auto --recursive | source
  • To automatically run phpup use when a directory contains a .php-version file, add the --auto (long: --auto-switch) option.
  • To search recursively for a .php-version file in a parent directory when running phpup use automatically, 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="$(brew --prefix libxml2)/lib/pkgconfig" \
phpup install 8.1 \
  --configure-opts="--with-iconv=$(brew --prefix libiconv)"
using the shell variable: PHPUP_CONFIGURE_OPTS
PKG_CONFIG_PATH="$(brew --prefix libxml2)/lib/pkgconfig" \
PHPUP_CONFIGURE_OPTS="--with-iconv=$(brew --prefix libiconv)" \
phpup install 8.1
using the env variable: PHPUP_CONFIGURE_OPTS
export PKG_CONFIG_PATH="$(brew --prefix libxml2)/lib/pkgconfig"
export PHPUP_CONFIGURE_OPTS="--with-iconv=$(brew --prefix libiconv)"
phpup install 8.1

See List of core configure options for more configre options.

For more details

phpup help

Contribution

PRs Welcome ๐ŸŽ‰

Inspired

phpup's People

Contributors

masan4444 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

juli4ndev

phpup's Issues

Don't add phpup into PATH when default is system

When using system version as default phpup adds to PATH the tmp dir symlinked to /usr/bin. This is confusing because every binary installed in your system shows as running from phpup path in process managers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.