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
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:
45
47
46
48
```sh
47
49
export PHPVM_DIR="$HOME/.phpvm"
48
-
source"$PHPVM_DIR/phpvm"
50
+
source"$PHPVM_DIR/phpvm.sh"
49
51
```
50
52
51
53
### Verify Installation
@@ -56,7 +58,7 @@ Run the following command:
56
58
command -v phpvm
57
59
```
58
60
59
-
If the installation was successful, it should output `phpvm`.
61
+
If the installation was successful, it should output the path to `phpvm`.
60
62
61
63
## Usage
62
64
@@ -76,21 +78,21 @@ To switch between installed versions:
76
78
phpvm use 8.0
77
79
```
78
80
79
-
Check the active version:
81
+
Verify the active version with:
80
82
81
83
```sh
82
84
php -v
83
85
```
84
86
85
87
### Auto-Switching PHP Versions
86
88
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 directoryto specify the desired PHP version:
88
90
89
91
```sh
90
92
echo"8.1"> .phpvmrc
91
93
```
92
94
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.
94
96
95
97
### Uninstalling PHP Versions
96
98
@@ -116,21 +118,27 @@ To completely remove `phpvm`, run:
116
118
rm -rf ~/.phpvm
117
119
```
118
120
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`):
120
122
121
123
```sh
122
124
export PHPVM_DIR="$HOME/.phpvm"
123
-
source"$PHPVM_DIR/phpvm"
125
+
source"$PHPVM_DIR/phpvm.sh"
124
126
```
125
127
126
128
## Troubleshooting
127
129
128
130
If you experience issues with `phpvm`, try the following:
129
131
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.
134
142
135
143
## Maintainers
136
144
@@ -142,4 +150,5 @@ This project is licensed under the MIT License. See [LICENSE](./LICENSE) for det
142
150
143
151
## Disclaimer
144
152
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.
0 commit comments