Skip to content

Commit 70b4f26

Browse files
authored
Update README.md
1 parent bb7177c commit 70b4f26

File tree

1 file changed

+89
-70
lines changed

1 file changed

+89
-70
lines changed

README.md

Lines changed: 89 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,89 @@
1-
2-
# PVM for Windows
3-
4-
> [!TIP]
5-
> Looking for the 0.x (composer) version? See the [v0 branch](https://github.com/hjbdev/pvm/tree/v0).
6-
7-
Removing the hassle of changing PHP versions in the CLI on Windows.
8-
9-
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.
10-
11-
This utility changes that.
12-
13-
## Installation
14-
15-
> [!WARNING]
16-
> version lower than 1.3.0 will have only pvm.exe
17-
> version 1.3.0 or higher will include pvm-setup.exe but can still get pvm.exe from source
18-
19-
### Installer
20-
Download the latest pvm installer from the releases page (>= 1.3.0).
21-
22-
### Manual Installation
23-
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.
24-
25-
## Commands
26-
27-
> `pvm list`
28-
> Will list out all the available PHP versions you have installed.
29-
30-
> `pvm list-remote`
31-
> Will list available PHP versions from remote repositories.
32-
33-
> `pvm install <version> [nts] [path]`
34-
> Will install specified PHP vesrion.
35-
- If the minor and patch versions are not specified, the newest available versions will be automatically selected.
36-
- [nts] (optional): Install a non-thread-safe version.
37-
- [path] (optional): Specify a custom installation path.
38-
39-
> `pvm use <version|path>`
40-
> Will switch your currently active PHP version to specified PHP vesrion.
41-
- 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.
42-
- Using a path: Specify the path to the PHP executable to set it as the active PHP version.
43-
44-
> `pvm uninstall 8.2.9`
45-
> Will uninstall specified PHP vesrion.
46-
- The `uninstall` command requires the full `major.minor.patch` version to be specified.
47-
48-
> `pvm add <path>`
49-
> Adds a custom PHP version by specifying the path to a PHP executable.
50-
51-
> `pvm remove <path>`
52-
> Removes a custom PHP version by specifying the path to the previously added PHP executable.
53-
54-
55-
## Composer support
56-
57-
`pvm` now installs also composer with each php version installed.
58-
It will install Composer latest stable release for PHP >= 7.2 and Composer latest 2.2.x LTS for PHP < 7.2.
59-
You'll be able to invoke composer from terminal as it is intended:
60-
```shell
61-
composer --version
62-
```
63-
64-
## Build this project
65-
66-
To compile this project use:
67-
68-
```shell
69-
GOOS=windows GOARCH=amd64 go build -o pvm.exe
70-
```
1+
# PVM for Windows
2+
3+
> [!TIP]
4+
> Looking for the 0.x (composer) version? See the [v0 branch](https://github.com/hjbdev/pvm/tree/v0).
5+
6+
Removing the hassle of changing PHP versions in the CLI on Windows.
7+
8+
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.
9+
10+
This utility changes that.
11+
12+
---
13+
14+
## Installation
15+
16+
> [!WARNING]
17+
> version lower than 1.3.0 will have only pvm.exe
18+
> version 1.3.0 or higher will include pvm-setup.exe but can still get pvm.exe from source
19+
20+
### Installer
21+
Download the latest pvm installer from the releases page (>= 1.3.0).
22+
23+
### Manual Installation
24+
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.
25+
26+
---
27+
28+
## Commands
29+
```
30+
pvm list
31+
```
32+
- __Will list out all the available PHP versions you have installed.__
33+
34+
```
35+
pvm list-remote
36+
```
37+
- __Will list available PHP versions from remote repositories.__
38+
39+
```
40+
pvm install <version> [nts] [path]
41+
```
42+
- __Will install specified PHP vesrion.__
43+
- If the minor and patch versions are not specified, the newest available versions will be automatically selected.
44+
- [nts] (optional): Install a non-thread-safe version.
45+
- [path] (optional): Specify a custom installation path.
46+
47+
```
48+
pvm use <version|path>
49+
```
50+
- __Will switch your currently active PHP version to specified PHP vesrion.__
51+
- 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.
52+
- Using a path: Specify the path to the PHP executable to set it as the active PHP version.
53+
54+
```
55+
pvm uninstall 8.2.9
56+
```
57+
- __Will uninstall specified PHP vesrion.__
58+
- The `uninstall` command requires the full `major.minor.patch` version to be specified.
59+
60+
```
61+
pvm add <path>
62+
```
63+
- __Adds a custom PHP version by specifying the path to a PHP executable.__
64+
65+
```
66+
pvm remove <path>
67+
```
68+
- __Removes a custom PHP version by specifying the path to the previously added PHP executable.__
69+
70+
---
71+
72+
## Composer support
73+
74+
`pvm` now installs also composer with each php version installed.
75+
It will install Composer latest stable release for PHP >= 7.2 and Composer latest 2.2.x LTS for PHP < 7.2.
76+
You'll be able to invoke composer from terminal as it is intended:
77+
```shell
78+
composer --version
79+
```
80+
81+
---
82+
83+
## Build this project
84+
85+
To compile this project use:
86+
87+
```shell
88+
GOOS=windows GOARCH=amd64 go build -o pvm.exe
89+
```

0 commit comments

Comments
 (0)