Skip to content

fix(windows): doctor ext_dir junction false-positive + hourly update check (1.12.1)#24

Merged
devhardiyanto merged 3 commits into
mainfrom
fix/doctor-extdir-junction
Jul 22, 2026
Merged

fix(windows): doctor ext_dir junction false-positive + hourly update check (1.12.1)#24
devhardiyanto merged 3 commits into
mainfrom
fix/doctor-extdir-junction

Conversation

@devhardiyanto

@devhardiyanto devhardiyanto commented Jul 22, 2026

Copy link
Copy Markdown
Owner

What

Patch 1.12.1 bundling two small changes:

  1. phpvm doctor no longer reports a spurious extension_dir mismatch on a correctly configured Windows install.
  2. The "update available" check now runs hourly instead of once per day, so new releases surface faster.

Why

  1. Reported from real usage: doctor flagged versions\<cur>\ext (what fix-ini writes into php.ini) as not matching current\ext (active build path). current is a junction to versions\<cur> — same folder — so it was a false positive that even phpvm fix-ini couldn't clear, misleading every user.
  2. With a 24h cache, a freshly published release could take up to a day to show in the banner. Requested: make it feel near-realtime.

How

  1. Extract Test-ExtDirMatch accepting either spelling of the active version's ext folder (junction or version-specific, trailing-slash tolerant); doctor uses it. Unit-tested.
  2. Drop PHPVM_CHECK_INTERVAL 86400 → 3600 on both OSes. Kept the once-per-interval throttle — no network call on every command (per-command checking would add latency and hammer GitHub).

Note: the doctor false-positive is Windows-only. Linux doctor checks that extension_dir exists (-d) rather than string-comparing paths, so it was never affected — no Linux change needed there.

Changes

  • windows/phpvm.ps1Test-ExtDirMatch helper + doctor uses it; check interval 24h → 1h
  • linux/phpvm.sh — check interval 24h → 1h
  • tests/windows/Doctor.Tests.ps1 — 5 unit tests for the helper
  • version bump 1.12.0 → 1.12.1 (5 files)

Testing Done

  • Unit test lewat — Pester 81/81, PSScriptAnalyzer clean, version-consistency PASS
  • Manual — reproduced the reporter's setup; doctor now reports extension_dir matches active build

`current` is a junction to versions\<cur>, so php.ini's extension_dir
(versions\<cur>\ext, written by fix-ini) and the build's current\ext name
the same folder — but the string compare flagged them as a mismatch on
every valid install, and fix-ini couldn't clear it. Extract
Test-ExtDirMatch that accepts either spelling; cover it with unit tests.

devhardiyanto
Drop PHPVM_CHECK_INTERVAL from 24h to 1h so a freshly published release
surfaces in the "update available" banner within the hour, while keeping
the once-per-interval throttle (no network call on every command).

devhardiyanto
@devhardiyanto devhardiyanto changed the title fix(windows): doctor no longer false-flags ext_dir on junction paths fix(windows): doctor ext_dir junction false-positive + hourly update check (1.12.1) Jul 22, 2026
@devhardiyanto
devhardiyanto merged commit eeda33c into main Jul 22, 2026
4 checks passed
@devhardiyanto
devhardiyanto deleted the fix/doctor-extdir-junction branch July 22, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant