Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MeowSky49887/pvm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PVM for Windows

Tip

Looking for the 0.x (composer) version? See the v0 branch.

Removing the hassle of changing PHP versions in the CLI on Windows.

This package has a much more niche use case than nvm does. When developing on Windows and using the integrated terminal, it's quite difficult to get those terminals to actually listen to PATH changes.

This utility changes that.


Installation

Warning

version lower than 1.3.0 will have only pvm.exe version 1.3.0 or higher will include pvm-setup.exe but can still get pvm.exe from source

Installer

Download the latest pvm installer from the releases page (>= 1.3.0).

Manual Installation

Create the folder %UserProfile%\.pvm\bin (e.g. C:\Users\Harry\.pvm\bin) and drop the pvm.exe in there. Add the folder to your PATH.


Commands

pvm list
  • Will list out all the available PHP versions you have installed.
pvm list-remote
  • Will list available PHP versions from remote repositories.
pvm install <version> [nts] [path]
  • Will install specified PHP vesrion.
  • If the minor and patch versions are not specified, the newest available versions will be automatically selected.
  • [nts] (optional): Install a non-thread-safe version.
  • [path] (optional): Specify a custom installation path.
pvm use <version|path>
  • Will switch your currently active PHP version to specified PHP vesrion.
  • Using a version: Specify at least the major.minor version. If the .patch version is omitted, the newest available patch version will be selected automatically.
  • Using a path: Specify the path to the PHP executable to set it as the active PHP version.
pvm uninstall <version>
  • Will uninstall specified PHP vesrion.
  • The uninstall command requires the full major.minor.patch version to be specified.
  • This command can uninstall only php installed by pvm.
pvm add <path>
  • Adds a custom PHP version by specifying the path to a PHP executable.
pvm remove <path>
  • Removes a custom PHP version by specifying the path to the previously added PHP executable.

Composer support

pvm now installs also composer with each php version installed. It will install Composer latest stable release for PHP >= 7.2 and Composer latest 2.2.x LTS for PHP < 7.2. You'll be able to invoke composer from terminal as it is intended:

composer --version

Build this project

To compile this project use:

GOOS=windows GOARCH=amd64 go build -o pvm.exe

To build pvm-setup.exe use:

iscc "pvm-setup.iss" 

About

PHP Version Manager for the CLI on Windows

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 89.2%
  • Inno Setup 10.8%