pvm
pvm copied to clipboard
Installation Tweaks
Suggestions to installation process:
Install the package
pvm setup
- Will update your path for you
- Remove any other PHPs in there
- Advise you to log out / restart computer
pvm use (optional string)
- if string == null - list out installs and you can choose the ID you want
- if string - change to that version
pvm laragon-use (optional string)
- same as 'use' but will also update laragon
pvm php-install
- shows list of php versions available
- select ID you want
- downloads to laragon and unzips
pvm remove
- removes the link from the path file (important this one!)
Might be nice ones:
pvm addtopath
- shows all the php versions available
- choose the oen you want by id
- will add that php version to the path and ensure that the symbolic one isnt there
for this command: pvm php-install
.
For downloading windows releases I think you can parse the PHP archive https://windows.php.net/downloads/releases/archives/ it has all windows versions from 5.x to 8.x
v2 will have install/uninstall commands
it's a bit sad to see the project went from php to go.
I can understand that, the issue with having the project written in PHP is that it then requires PHP to be already installed in order for it to work.
To install it you have to first:
- Install PHP
- Add PHP to your PATH
- Install composer
- Require pvm
- Update your path to point to PVM instead
By rewriting in a language like go, I can simplify the install process to be more like nvm-windows so it can be:
- Install pvm
- Run
pvm install 8.1
- Update PATH
It also means that pvm isn't limited by the PHP version it's running on. The original version of pvm was written in Laravel Zero, however as soon as you switched to a PHP version below 7.4 it would break because of incompatible dependencies.
I rewrote the utility to be as minimal as possible, but there could be a time where PHP updates and I end up having to drop support for all old PHP versions because of a breaking change in the language.
There was an option to just include a standalone version which includes the full PHP release+pvm and a bat file to run the pvm app. put this all in zip file it wont exceed 20MB and can be added in GitHub releases I did this in the past.
I wanted to note this before because I saw in the readme you mentioned the composer install as "not ideal".
Now that it moved to go there is no going back. I wanted to contribute more to the project but now I can't :/ but I will still use this utility because it removes the hassle of changing versions. Good luck on v2! can't wait to update :)