Skip to content

Releases: devhardiyanto/phpvm

v1.9.1 — one-liner install on Windows, install fixes on Linux

Choose a tag to compare

@github-actions github-actions released this 14 Jul 02:01
46bb7cb

Bug-fix release on top of 1.9.0. Upgrade with phpvm upgrade.

Fixed

Linux: phpvm install no longer moves your shell. phpvm.sh is sourced, so the build's cd was changing your own shell's working directory — and the build dir is deleted afterwards, leaving you in a directory that no longer exists. You now end up where you started, whether the build succeeds or fails.

Linux: no more job-control noise during a build. The progress spinner introduced in 1.9.0 made interactive shells announce its background job on every step ([3] 2015, [3] + done …). Regression from 1.9.0.

Windows: phpvm install composer and friends. Non-version arguments print a clear error instead of a raw PowerShell stack trace. (Shipped in 1.9.0, listed here for anyone skipping it.)

Windows: phpvm composer output. Composer's PHP banner and "run diagnose" hint are written to stderr and were leaking unformatted into the output. They are not errors — just noise — and are now suppressed.

Added

Windows: one-line install.

irm https://raw.githubusercontent.com/devhardiyanto/phpvm/main/windows/install.ps1 | iex

No more downloading two files by hand. The manual flow still works if you would rather read the script first.

Older-patch hint. phpvm install 8 resolves to the newest patch and installs it alongside any older patch of the same line. phpvm now tells you the old one is still there and how to remove it. It does not remove it for you — another project may pin that exact version in .phpvmrc.

Full Changelog: v1.9.0...v1.9.1

v1.9.0

Choose a tag to compare

@github-actions github-actions released this 14 Jul 00:24
d525ebf

Changes

  • Merge pull request #19 from devhardiyanto/fix/sprint10-ux-feedback
  • fix(linux): quote spinner frames so ShellCheck stops flagging SC1003
  • feat(windows,linux): live install progress and an install --no-use opt-out
  • fix(windows): drop stale restart hint, trim use output, guard install version
  • Merge pull request #17 from devhardiyanto/dependabot/github_actions/actions/checkout-7.0.0
  • Merge pull request #18 from devhardiyanto/fix/v1.8.3-linux-sodium-pecl
  • fix: bump version in install scripts to 1.8.3
  • fix: v1.8.3 - build sodium + ship pecl on Linux
  • ci: bump actions/checkout from 6.0.3 to 7.0.0

Full Changelog: v1.8.2...v1.9.0

v1.8.2

Choose a tag to compare

@github-actions github-actions released this 19 Jun 03:09
8fa31a7

Changes

  • Merge pull request #16 from devhardiyanto/feat/v1.8.2-env-broadcast
  • feat: v1.8.2 - broadcast WM_SETTINGCHANGE on PATH change (B1)

Full Changelog: v1.8.1...v1.8.2

v1.8.1

Choose a tag to compare

@github-actions github-actions released this 18 Jun 17:28
b62f6e5

Changes

  • Merge pull request #15 from devhardiyanto/feat/v1.8.1-composer-global
  • feat: v1.8.1 - global Composer that follows the active PHP version (B4)

Full Changelog: v1.8.0...v1.8.1

v1.8.0

Choose a tag to compare

@github-actions github-actions released this 18 Jun 16:34
d07e0cc

Changes

  • Merge pull request #14 from devhardiyanto/feat/v1.8.0-ux-resolver-uninstall
  • fix(ci): don't force CRLF on *.ps1 in .gitattributes
  • feat: v1.8.0 - UX fixes, partial-version resolve, auto-use, did-you-mean, uninstaller
  • Merge pull request #13 from devhardiyanto/fix/ext-install-arg-shift
  • fix(windows): pass version arg through to ext install (was using ext name as version)
  • Merge pull request #12 from devhardiyanto/fix/sqlsrv-pecl-redirect
  • fix(ci): replace non-ASCII em-dash to satisfy PSScriptAnalyzer
  • fix(ext): resolve sqlsrv PECL install across Win/Linux/macOS
  • Merge pull request #11 from devhardiyanto/dependabot/github_actions/actions/checkout-6.0.3
  • ci: bump actions/checkout from 4.3.1 to 6.0.3
  • Merge pull request #10 from devhardiyanto/feat/security-hardening
  • Harden CI against malicious PRs

Full Changelog: v1.7.0...v1.8.0

v1.7.0

Choose a tag to compare

@github-actions github-actions released this 09 Jun 15:57
d2ad4f6

Changes

  • Merge pull request #9 from devhardiyanto/feat/sprint-5-linux-parity
  • Fix SC2015 in phpvm_ext_laravel — use if/else instead of A && B || C
  • Sprint 5: Linux parity + auto-release (1.7.0)

Full Changelog: v1.6.5...v1.7.0

v1.6.5 - Linux .phpvmrc auto-switch parity

Choose a tag to compare

@devhardiyanto devhardiyanto released this 09 Jun 15:24
fbbfbda

Highlights

Linux feature parity for .phpvmrc auto-switch — closing the gap with Windows (shipped in v1.6.0).

What's new

  • .phpvmrc discovery + parsing for bash/zsh (_phpvm_find_rc, _phpvm_read_rc, _phpvm_resolve_rc)
  • phpvm auto — session-only PATH switch tracked via $PHPVM_AUTO_ACTIVE, never touches persistent shell config
  • Shell hook auto-registered on source: chpwd_functions for zsh, PROMPT_COMMAND for bash — auto-switches PHP version on every cd
  • phpvm hook command for status/install/uninstall
  • 21 bats-core tests under tests/linux/, wired into the CI ubuntu job
  • README — Linux Auto-Switch section mirrors the Windows one

Behavior

  • Resolution is offline-only: a cd never triggers a ~25 MB silent download. Missing version → warn + skip.
  • Auto-switch only touches $PATH for the current shell session.
  • Set PHPVM_AUTO_ACTIVE=0 to disable per-session.

CI

  • ShellCheck + bats now run on every PR alongside the Windows Pester suite
  • 3 jobs total, all required: Windows lint+tests, Linux shellcheck+bats, Version consistency

Compatibility

  • bash 4+ and zsh
  • PowerShell 5.1 + 7 (unchanged from 1.6.0)

Full Changelog: v1.6.0...v1.6.5

phpvm 1.6.0

Choose a tag to compare

@devhardiyanto devhardiyanto released this 09 Jun 09:56
8792e22

Highlights

.phpvmrc per-project version switching — the killer feature for multi-project workflows. Drop a .phpvmrc file in your project root with a PHP version; phpvm switches your shell to that version automatically.

New commands

phpvm auto              # resolve .phpvmrc upstream and switch (session-only)
phpvm hook install      # add a snippet to $PROFILE for per-prompt auto-switching
phpvm hook uninstall    # remove the snippet
phpvm hook status       # check whether the hook is installed

.phpvmrc syntax

8.3.0           # full semver
8.3             # major.minor - picks highest installed patch
v8.3.0          # leading `v` accepted
# project: api  # comments allowed

Innermost .phpvmrc wins when projects are nested.

How it works

  • phpvm auto prepends $VERSIONS_DIR\<ver> to $env:PATH for the current session — does NOT touch the persistent User PATH that phpvm use manages. Your global default stays intact.
  • The hook composes with existing prompt functions (Starship, oh-my-posh) by wrapping, not replacing.
  • Active version tracked in $env:PHPVM_AUTO_ACTIVE so repeat calls are no-ops and leaving a project cleanly removes the prepend.
  • Resolution is offline-onlyphpvm auto never auto-installs missing versions, just warns with an install hint.

Other

  • README expanded with an Auto-Switch section and documents three env vars (PHPVM_SKIP_HASH, PHPVM_NO_UPDATE_CHECK, PHPVM_AUTO_ACTIVE).
  • Documents phpvm install 8.3 partial-version syntax (introduced in 1.4.6 but never written down).
  • 15 new Pester tests; 40 total.

Upgrade

phpvm upgrade

Full diff: v1.5.0...v1.6.0

phpvm 1.5.0

Choose a tag to compare

@devhardiyanto devhardiyanto released this 09 Jun 09:41
2b9fbca

Highlights

  • SHA-256 verification on every download — phpvm install and phpvm ext install xdebug now check checksums against the upstream source and abort on mismatch. Falls back to warn-only for older archives that don't publish checksums.
  • CI on every push / PR — Windows lint + tests, Linux shellcheck, version consistency. No more silent regressions.
  • 22 offline Pester tests covering compiler mapping, byte[] decoding, version-index parsing, checksum lookup, and the ini-extension regex.
  • PHP 5.x and 7.0 / 7.1 installs work againGet-VSVersion now maps 5.x → vc11, 7.0 / 7.1 → vc14 instead of silently 404'ing.

New

  • phpvm install <major.minor> was added in 1.4.6 and is now validated end-to-end across 5.6, 7.0, 7.3, 8.5.
  • $env:PHPVM_SKIP_HASH=1 to skip SHA-256 verification in environments with content-rewriting corporate proxies.

Bugfix

  • Resolve-LatestPatch was case-sensitive and missed PHP 7.x archives (filenames use VC15 uppercase). Now case-insensitive.
  • Get-VSVersion fell through to vs17 for PHP 5.x and used vc15 for PHP 7.0 / 7.1 — wrong on both counts.
  • Renamed shadowed $matches to $hits in Install-XDebug to silence PSAvoidAssignmentToAutomaticVariable.

Upgrade

phpvm upgrade

Full diff: v1.4.6...v1.5.0

phpvm 1.4.6

Choose a tag to compare

@devhardiyanto devhardiyanto released this 09 Jun 08:13
d3dd1dd

Bugfix

  • phpvm composer no longer crashes on PowerShell 7 with Method invocation failed because [System.Byte] does not contain a method named 'Trim'. Invoke-WebRequest returns byte[] content when the response has no text/* Content-Type (e.g. composer's installer.sig); we now decode to UTF-8 before calling string methods. Same fix routed through the update check, self-upgrade, PECL listing, and xdebug.org listing.

New

  • phpvm install 8.3 (partial version) — auto-resolves to the latest patch published on windows.php.net. You no longer need to remember the exact patch number.

Improvements

  • 5s timeout on PHP download URL probes — no more multi-minute hangs on slow mirrors.
  • Skip the daily update check for help, version, list, current, which, ini — local commands stay snappy.
  • phpvm ext laravel snapshots php -m once instead of re-shelling per extension.
  • Drop redundant Unblock-File calls on already-extracted files.

Upgrade

phpvm upgrade

Full diff: b403125...v1.4.6