Skip to content

Commit d28a8a2

Browse files
authored
Update README.MD
1 parent 6d31e09 commit d28a8a2

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

README.MD

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ PHP 8.1.13
2626
- Auto-switch PHP versions based on project `.phpvmrc`.
2727
- Supports macOS (via Homebrew) and Linux distributions.
2828
- Works with common shells (`bash`, `zsh`).
29+
- Improved error handling and informative, color-coded feedback.
30+
- Includes unit tests with BATS for automated testing.
2931

3032
## Installation
3133

@@ -41,11 +43,11 @@ curl -o- https://raw.githubusercontent.com/Thavarshan/phpvm/main/install.sh | ba
4143
wget -qO- https://raw.githubusercontent.com/Thavarshan/phpvm/main/install.sh | bash
4244
```
4345

44-
This script will download and set up `phpvm` in `~/.phpvm`, adding the following to your shell profile (`~/.bashrc`, `~/.zshrc`, or `~/.profile`):
46+
This script will download and set up `phpvm` in `~/.phpvm` and automatically update your shell profile (`~/.bashrc`, `~/.zshrc`, or `~/.profile`) with the following lines:
4547

4648
```sh
4749
export PHPVM_DIR="$HOME/.phpvm"
48-
source "$PHPVM_DIR/phpvm"
50+
source "$PHPVM_DIR/phpvm.sh"
4951
```
5052

5153
### Verify Installation
@@ -56,7 +58,7 @@ Run the following command:
5658
command -v phpvm
5759
```
5860

59-
If the installation was successful, it should output `phpvm`.
61+
If the installation was successful, it should output the path to `phpvm`.
6062

6163
## Usage
6264

@@ -76,21 +78,21 @@ To switch between installed versions:
7678
phpvm use 8.0
7779
```
7880

79-
Check the active version:
81+
Verify the active version with:
8082

8183
```sh
8284
php -v
8385
```
8486

8587
### Auto-Switching PHP Versions
8688

87-
If a `.phpvmrc` file is present in your project directory, `phpvm` will automatically switch to the specified version:
89+
Create a `.phpvmrc` file in your project directory to specify the desired PHP version:
8890

8991
```sh
9092
echo "8.1" > .phpvmrc
9193
```
9294

93-
Upon entering the project directory, `phpvm` will switch to PHP 8.1 automatically.
95+
When you navigate to that project directory, `phpvm` will automatically switch to PHP 8.1.
9496

9597
### Uninstalling PHP Versions
9698

@@ -116,21 +118,27 @@ To completely remove `phpvm`, run:
116118
rm -rf ~/.phpvm
117119
```
118120

119-
And remove the following lines from your shell profile (`~/.bashrc`, `~/.zshrc`, etc.):
121+
Then remove the following lines from your shell profile (`~/.bashrc`, `~/.zshrc`, or `~/.profile`):
120122

121123
```sh
122124
export PHPVM_DIR="$HOME/.phpvm"
123-
source "$PHPVM_DIR/phpvm"
125+
source "$PHPVM_DIR/phpvm.sh"
124126
```
125127

126128
## Troubleshooting
127129

128130
If you experience issues with `phpvm`, try the following:
129131

130-
- Ensure your shell profile is sourcing `phpvm`.
131-
- Restart your terminal after installation.
132-
- Make sure Homebrew is installed (for macOS users).
133-
- Check for permission issues when installing PHP versions.
132+
- Ensure your shell profile is sourcing `phpvm.sh`.
133+
- Restart your terminal after installing or updating.
134+
- Verify that Homebrew is installed (for macOS users).
135+
- Check for permission issues during the installation or PHP version switching process.
136+
- Refer to the [Changelog](./CHANGELOG.md) for recent updates and fixes.
137+
138+
## Development & Testing
139+
140+
- This project includes a set of BATS unit tests located in the repository (e.g., `test_phpvm.bats`).
141+
- Contributions, bug reports, and feature requests are welcome.
134142

135143
## Maintainers
136144

@@ -142,4 +150,5 @@ This project is licensed under the MIT License. See [LICENSE](./LICENSE) for det
142150

143151
## Disclaimer
144152

145-
`phpvm` is provided as-is, without any warranties. Use it at your own risk.
153+
`phpvm` is provided as-is without any warranties. Use it at your own risk.
154+
```

0 commit comments

Comments
 (0)