Sprint 12: reliable & trustworthy out of the box (CA bundle, StrictMode guards, troubleshooting docs, macOS spike)#21
Merged
Conversation
…sl.cafile) Fresh Windows installs fail all HTTPS from PHP with cURL error 60 because the builds ship no CA bundle. Download the Mozilla bundle once to ~/.phpvm/cacert.pem (shared across versions) and point both directives at it when bootstrapping php.ini. Opt out with --no-cacert; repair existing installs via fix-ini; manage with the new 'phpvm cacert' command. devhardiyanto
…sing Get-CurrentVersion could throw when a reparse point has no Target on PS 5.1; Get-PHPBuildInfo crashed with a raw MethodInvocationException when php -i output lacked the Thread Safety / Compiler lines; and Get-VSVersion's [int] casts blew up on non-version input. All three now degrade to safe defaults instead of leaking PowerShell stack traces. devhardiyanto
macOS spike (B12 first slice): run the bats suite on macos-latest as a non-gating job to surface BSD-userland gaps. stat mtime lookup now works on BSD stat, and 'phpvm deps' prints a Homebrew command when brew is the detected package manager. devhardiyanto
devhardiyanto
First macOS CI run: every bats test failed because /bin/bash 3.2 cannot parse the &>> redirect at source time. Plain >> with 2>&1 is equivalent and portable. devhardiyanto
BSD paste (macOS) requires a file operand and errored with 'usage: paste ...' wherever PATH entries were rejoined, breaking auto-switch cleanup. GNU paste accepts the explicit '-' too. devhardiyanto
Show-Help was missing fix-ini entirely; the two helps ordered their sections differently; and the hook subcommand verbs diverged (Windows install/uninstall vs Linux enable/disable). Windows now accepts enable/disable (old verbs kept as aliases), both helps share the same section order and wording, and platform-specific lines (cacert, deps, build log) stay platform-specific by design. 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
Sprint 12 bundle — v1.10.0: auto-configured CA bundle on Windows installs, StrictMode crash guards, a README troubleshooting section + compatibility matrix, and an experimental macOS CI job.
Why
Fresh Windows installs fail every HTTPS request from PHP with
cURL error 60because the builds ship no CA bundle (user feedback). Bundled with the remaining reliability/quality backlog items (B2/B9/B10) and the first slice of macOS support (B12).How
~/.phpvm/cacert.pem(download is best-effort — offline installs still succeed);php.inibootstrap pointscurl.cainfo+openssl.cafileat it, so switching versions never loses the fix.Changes
windows/phpvm.ps1:Get-CABundle/Set-IniCACert/Update-IniCACert; wired intoinstall(opt-out--no-cacert) andfix-ini; newphpvm cacert [status|update]commandwindows/phpvm.ps1: StrictMode guards inGet-CurrentVersion(null junctionTarget),Get-PHPBuildInfo(missing Thread Safety/Compiler lines),Get-VSVersion(non-version input)linux/phpvm.sh: BSDstatfallback; Homebrew case inphpvm deps.github/workflows/ci.yml: experimentalmacos-latestbats job (continue-on-error)README.md: CA bundle section, Troubleshooting section (cURL 60, VC++ redist, PATH shadowing, ext_dir, ExecutionPolicy, build deps, .phpvmrc), PHP × toolchain matrix, macOS experimental rowtests/windows/CACert.Tests.ps1: 11 new offline Pester tests (70 total)Testing Done
bash -nclean on both sh scripts; shellcheck/bats/macOS run in CI🤖 Generated with Claude Code