Skip to content

External PHP: Update to PR #29 #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/.idea
/.vscode
pvm.exe
/.vscode
66 changes: 52 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,88 @@ This package has a much more niche use case than nvm does. When developing on Wi

This utility changes that.

---

## Installation

Download the latest pvm version from the releases page (1.0-alpha-1, it's currently a pre-release).
> [!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.

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
- __Will list out all the available PHP versions you have installed.__

```
pvm list-remote
```
- __Will list available PHP versions from remote repositories.__

```
pvm path
pvm install <version> [nts] [path]
```
Will tell you what to put in your Path variable.
- __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 8.2.9
pvm use <version|path>
```
> [!NOTE]
> Versions must have major.minor specified in the *use* command. If a .patch version is omitted, newest available patch version is chosen.
- __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.

Will switch your currently active PHP version to PHP 8.2.9
```
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 install 8.2
pvm add <path>
```
> [!NOTE]
> The install command will automatically determine the newest minor/patch versions if they are not specified
- __Adds a custom PHP version by specifying the path to a PHP executable.__

Will install PHP 8.2 at the latest patch.
```
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:
```shell
composer --version
```

---

## Build this project

To compile this project use:

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

To build pvm-setup.exe use:

```shell
iscc "pvm-setup.iss"
```
23 changes: 0 additions & 23 deletions commands/help.go

This file was deleted.

22 changes: 0 additions & 22 deletions commands/path.go

This file was deleted.

Loading