Skip to content

Commit 62b7fc8

Browse files
committed
chore: release v1.9.2 — code quality improvements
- Namespace global OS variables with PHPVM_ prefix - Make .phpvmrc search depth configurable via PHPVM_PHPVMRC_MAX_DEPTH - Replace echo with printf in version validation functions - Remove unused PHPVM_CACHE_UPDATE_ALTERNATIVES variable - Inline nested functions in suggest_repository_setup - Fix word-splitting in brew_unlink_all_php with while-read loop
1 parent 570911a commit 62b7fc8

2 files changed

Lines changed: 99 additions & 91 deletions

File tree

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
## [Unreleased]
44

5+
## [v1.9.2](https://github.com/Thavarshan/phpvm/compare/v1.9.1...v1.9.2) - 2026-03-15
6+
7+
### Changed
8+
9+
- **Namespaced global OS variables:** Renamed `OS_TYPE`, `OS_ARCH`, `MACOS_VERSION`, `MACOS_MAJOR`, `MACOS_MINOR`, `IS_WSL`, `WSL_VERSION`, `LINUX_DISTRO`, and `LINUX_VERSION` to `PHPVM_`-prefixed equivalents (`PHPVM_OS_TYPE`, etc.) to prevent namespace pollution when the script is sourced into user shells.
10+
- **Made `.phpvmrc` search depth configurable:** `find_phpvmrc` now uses `PHPVM_PHPVMRC_MAX_DEPTH` environment variable (default: 25) instead of a hardcoded value.
11+
- **Replaced `echo` with `printf` in version validation:** `is_valid_version_format()` and `phpvm_normalize_version()` now use `printf '%s\n'` to avoid potential misinterpretation of version strings starting with `-e` or `-n`.
12+
- **Inlined nested functions in `suggest_repository_setup`:** Removed `suggest_repository_heading()` and `suggest_repository_footer()` inner function definitions that were re-created on every call.
13+
- **Fixed word-splitting in `brew_unlink_all_php`:** Replaced `for ... in $(echo | grep)` pattern with a safe `while IFS= read -r` loop.
14+
15+
### Removed
16+
17+
- **Removed unused `PHPVM_CACHE_UPDATE_ALTERNATIVES` variable.**
18+
19+
### Internal
20+
21+
- **Version bump:** Updated to v1.9.2.
22+
- **All tests passing:** 51 BATS tests pass.
23+
524
## [v1.9.1](https://github.com/Thavarshan/phpvm/compare/v1.9.0...v1.9.1) - 2026-03-15
625

726
### Fixed

0 commit comments

Comments
 (0)