Skip to content

Commit 0e3fd1d

Browse files
committed
Merge branch 'fix/github-issues-v1.5.0'
2 parents 8a1339a + 76f6a9c commit 0e3fd1d

File tree

1 file changed

+48
-2
lines changed

1 file changed

+48
-2
lines changed

README.MD

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414
**Example:**
1515

1616
```sh
17+
$ phpvm version
18+
phpvm version 1.5.0
19+
20+
PHP Version Manager for macOS and Linux
21+
Author: Jerome Thayananthajothy <[email protected]>
22+
Repository: https://github.com/Thavarshan/phpvm
23+
24+
Usage: phpvm help
25+
1726
$ phpvm use 8.2
1827
Switching to PHP 8.2...
1928
Switched to PHP 8.2.
@@ -31,9 +40,13 @@ PHP 8.1.13
3140
- Install and manage multiple PHP versions.
3241
- Seamlessly switch between installed PHP versions.
3342
- Auto-switch PHP versions based on project `.phpvmrc`.
34-
- Supports macOS (via Homebrew) and Linux distributions.
43+
- Supports macOS (via Homebrew) and Linux distributions including WSL.
44+
- Enhanced cross-platform compatibility with improved shell support.
3545
- Works with common shells (`bash`, `zsh`).
46+
- Comprehensive version commands (`phpvm version`, `phpvm --version`, `phpvm -v`).
47+
- Post-install validation with helpful warnings for missing binaries.
3648
- Improved error handling with detailed messages and suggestions.
49+
- Enhanced Homebrew integration with better link failure detection.
3750
- Informative, color-coded feedback with timestamps for logs.
3851
- Includes unit tests with BATS for automated testing.
3952
- Helper functions for better maintainability and reduced code duplication.
@@ -72,6 +85,21 @@ If the installation was successful, it should output the path to `phpvm`.
7285

7386
## Usage
7487

88+
### Available Commands
89+
90+
| Command | Description |
91+
| ------------------------- | ------------------------------------- |
92+
| `phpvm install <version>` | Install a specific PHP version |
93+
| `phpvm use <version>` | Switch to a specific PHP version |
94+
| `phpvm system` | Switch to system/Homebrew default PHP |
95+
| `phpvm list` | List all installed PHP versions |
96+
| `phpvm auto` | Auto-switch based on `.phpvmrc` file |
97+
| `phpvm test` | Run built-in self-tests |
98+
| `phpvm version` | Show version information |
99+
| `phpvm --version` | Show version information (alias) |
100+
| `phpvm -v` | Show version information (alias) |
101+
| `phpvm help` | Show help message |
102+
75103
### Installing PHP Versions
76104

77105
To install a specific version of PHP:
@@ -88,7 +116,7 @@ To switch between installed versions:
88116
phpvm use 8.0
89117
```
90118

91-
To switch back to the system PHP version:
119+
To switch back to the system PHP version (Homebrew default on macOS):
92120

93121
```sh
94122
phpvm system
@@ -100,6 +128,18 @@ Verify the active version with:
100128
php -v
101129
```
102130

131+
### Version Information
132+
133+
To check the phpvm version and get information:
134+
135+
```sh
136+
phpvm version
137+
# or
138+
phpvm --version
139+
# or
140+
phpvm -v
141+
```
142+
103143
### Auto-Switching PHP Versions
104144

105145
Create a `.phpvmrc` file in your project directory to specify the desired PHP version:
@@ -157,18 +197,24 @@ export PATH="$PHPVM_DIR/bin:$PATH"
157197
If you experience issues with `phpvm`, try the following:
158198

159199
- Run `phpvm test` to verify all functions are working correctly
200+
- Check the phpvm version with `phpvm version` or `phpvm --version`
160201
- Ensure your shell profile is sourcing `phpvm.sh`
161202
- Restart your terminal after installing or updating
162203
- Verify that the required package manager is installed:
163204
- Homebrew for macOS
164205
- apt, dnf, yum, or pacman for Linux
165206
- Check for permission issues during the installation or PHP version switching process
166207
- For Linux systems, you may need to use `sudo` for installation and switching
208+
- On WSL systems, ensure you're using bash shell compatibility
209+
- If you encounter Homebrew link issues on macOS, try manually relinking: `brew unlink [email protected] && brew link --force [email protected]`
167210
- Refer to the [Changelog](./CHANGELOG.md) for recent updates and fixes
168211

169212
## Development & Testing
170213

171214
- This project includes a set of BATS unit tests located in the repository (e.g., `test_phpvm.bats`).
215+
- v1.5.0 introduces significant cross-platform compatibility improvements, especially for WSL and Linux systems.
216+
- Enhanced error handling and validation with post-install checks for binary availability.
217+
- Improved Homebrew integration with better link failure detection and recovery.
172218
- Contributions, bug reports, and feature requests are welcome.
173219
- The codebase now includes helper functions for better maintainability and reduced duplication.
174220

0 commit comments

Comments
 (0)