You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Extension Support (`-e`)**: Easily install PHP extensions (e.g., `phpv -e imagick 81`) from the AUR.
7
+
-**Smart Install**: Prioritizes prebuilt binaries from configured repositories (like Chaotic-AUR) to speed up installation, falling back to AUR compilation if not found.
8
+
-**Automated Dependencies**: Automatically handles the missing `c-client` dependency by downloading a prebuilt binary from the repository.
9
+
-**Force Build (`--build`)**: Added flag to force compilation from source, bypassing binary checks.
10
+
-**Version Flag (`-v`)**: Added `--version` / `-v` to check current installed version.
Copy file name to clipboardExpand all lines: README.md
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,40 @@ Replace `<version>` with the desired shorthand (e.g., 80 for 8.0, 74 for 7.4).
85
85
86
86

87
87
88
+
#### Smart Install (Binary Support)
89
+
90
+
By default, `phpv` tries to install prebuilt binaries using `pacman` (if available in your configured repositories, like Chaotic-AUR). This saves time by avoiding compilation.
91
+
92
+
If a prebuilt binary is not found, it automatically falls back to building from the AUR.
93
+
94
+
#### Force Build from Source
95
+
96
+
If you prefer to compile from source (skipping the binary check), use the `--build` (or `-b`) flag:
97
+
98
+
```bash
99
+
phpv -i <version> --build
100
+
```
101
+
102
+
Example: `phpv -i 81 -b`
103
+
104
+
#### Skipping Tests
105
+
106
+
If the installation fails during the testing phase (common with some extensions like `imagick`), you can skip tests using `--nocheck`:
107
+
108
+
```bash
109
+
phpv -e imagick 81 --nocheck
110
+
```
111
+
112
+
#### Installing PHP Extensions
113
+
114
+
To install PHP extensions (e.g., imagick, redis) for a specific PHP version, use the `-e` flag:
115
+
116
+
```bash
117
+
phpv -e <extension><version>
118
+
```
119
+
120
+
Example: `phpv -e imagick 81` will install `php81-imagick` from the AUR.
121
+
88
122
#### Switching PHP Versions
89
123
90
124
To switch PHP versions, use the following command:
@@ -103,7 +137,12 @@ Replace `<version>` with the desired shorthand.
103
137
104
138
### Troubleshooting
105
139
106
-
If you encounter issues with the c-client dependency, follow the steps outlined below for manual installation.
140
+
### Troubleshooting
141
+
142
+
#### c-client Dependency
143
+
PHPV automatically detects if`c-client` is missing and attempts to install it for you using the prebuilt binary from this repository. You typically don't need to do anything.
144
+
145
+
However, if the automatic installation fails, you can follow the manual steps below.
0 commit comments