fix(windows): doctor ext_dir junction false-positive + hourly update check (1.12.1)#24
Merged
Merged
Conversation
`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
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Patch 1.12.1 bundling two small changes:
phpvm doctorno longer reports a spuriousextension_dir mismatchon a correctly configured Windows install.Why
versions\<cur>\ext(whatfix-iniwrites into php.ini) as not matchingcurrent\ext(active build path).currentis a junction toversions\<cur>— same folder — so it was a false positive that evenphpvm fix-inicouldn't clear, misleading every user.How
Test-ExtDirMatchaccepting either spelling of the active version's ext folder (junction or version-specific, trailing-slash tolerant); doctor uses it. Unit-tested.PHPVM_CHECK_INTERVAL86400 → 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_direxists (-d) rather than string-comparing paths, so it was never affected — no Linux change needed there.Changes
windows/phpvm.ps1—Test-ExtDirMatchhelper + doctor uses it; check interval 24h → 1hlinux/phpvm.sh— check interval 24h → 1htests/windows/Doctor.Tests.ps1— 5 unit tests for the helperTesting Done
extension_dir matches active build