|
1 | 1 | # Release Notes |
2 | 2 |
|
| 3 | +## [v1.7.0](https://github.com/Thavarshan/phpvm/compare/v1.6.0...v1.7.0) - 2025-12-10 |
| 4 | + |
| 5 | +### Added |
| 6 | + |
| 7 | +- **New `phpvm current` command:** Display the currently active PHP version. Returns the version string, "system", or "none" depending on state. |
| 8 | +- **New `phpvm which [version]` command:** Show the full path to the PHP binary for a given version. Supports all package managers (brew, apt, dnf, yum, pacman). |
| 9 | +- **New `phpvm deactivate` command:** Temporarily disable phpvm management and restore the original PATH. Useful for debugging or temporarily using system defaults. |
| 10 | +- **New `ls` alias for `list`:** Added `phpvm ls` as an alias for `phpvm list` for convenience. |
| 11 | +- **Specific exit codes:** Implemented consistent exit codes across all commands for better scripting support: |
| 12 | + - `0` - Success |
| 13 | + - `1` - General error |
| 14 | + - `2` - Invalid argument or usage error |
| 15 | + - `3` - Version not found (not available) |
| 16 | + - `4` - Version not installed locally |
| 17 | + - `5` - File or permission error |
| 18 | + - `127` - Unknown command |
| 19 | +- **Exit code documentation:** Added exit codes section to help output. |
| 20 | +- **PATH preservation:** `phpvm use` now stores the original PATH on first activation to enable proper deactivation. |
| 21 | + |
| 22 | +### Changed |
| 23 | + |
| 24 | +- **Enhanced help output:** Updated help text with new commands, examples, and exit code documentation. |
| 25 | +- **Improved error handling:** Key functions now return specific exit codes instead of generic error codes. |
| 26 | + |
| 27 | +### Internal |
| 28 | + |
| 29 | +- **Added exit code constants:** Defined `PHPVM_EXIT_*` constants for maintainability. |
| 30 | +- **New helper functions:** |
| 31 | + - `phpvm_store_original_path()` - Preserves PATH for deactivate functionality |
| 32 | + - `phpvm_current()` - Returns current PHP version |
| 33 | + - `phpvm_which()` - Resolves PHP binary paths |
| 34 | + - `phpvm_deactivate()` - Disables phpvm temporarily |
| 35 | +- **Expanded test suite:** Added tests for `phpvm_current`, `phpvm_which`, and `phpvm_deactivate` (now 14 tests total). |
| 36 | + |
3 | 37 | ## [v1.6.0](https://github.com/Thavarshan/phpvm/compare/v1.5.0...v1.6.0) - 2025-09-15 |
4 | 38 |
|
5 | 39 | ### Added |
|
0 commit comments