Skip to content

Sprint 12: reliable & trustworthy out of the box (CA bundle, StrictMode guards, troubleshooting docs, macOS spike)#21

Merged
devhardiyanto merged 8 commits into
mainfrom
feat/sprint12-trust-out-of-the-box
Jul 15, 2026
Merged

Sprint 12: reliable & trustworthy out of the box (CA bundle, StrictMode guards, troubleshooting docs, macOS spike)#21
devhardiyanto merged 8 commits into
mainfrom
feat/sprint12-trust-out-of-the-box

Conversation

@devhardiyanto

Copy link
Copy Markdown
Owner

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 60 because 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

  • One shared Mozilla CA bundle at ~/.phpvm/cacert.pem (download is best-effort — offline installs still succeed); php.ini bootstrap points curl.cainfo + openssl.cafile at it, so switching versions never loses the fix.
  • Null-safety guards degrade to safe defaults instead of leaking PowerShell stack traces.
  • macOS runs the existing bats suite as a non-gating CI job to surface BSD-userland gaps.

Changes

  • windows/phpvm.ps1: Get-CABundle / Set-IniCACert / Update-IniCACert; wired into install (opt-out --no-cacert) and fix-ini; new phpvm cacert [status|update] command
  • windows/phpvm.ps1: StrictMode guards in Get-CurrentVersion (null junction Target), Get-PHPBuildInfo (missing Thread Safety/Compiler lines), Get-VSVersion (non-version input)
  • linux/phpvm.sh: BSD stat fallback; Homebrew case in phpvm deps
  • .github/workflows/ci.yml: experimental macos-latest bats 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 row
  • tests/windows/CACert.Tests.ps1: 11 new offline Pester tests (70 total)
  • Version bump 1.9.1 → 1.10.0 (5 files)

Testing Done

  • Pester 70/70 pass (offline), PSScriptAnalyzer clean
  • bash -n clean on both sh scripts; shellcheck/bats/macOS run in CI

🤖 Generated with Claude Code

…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
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
@devhardiyanto devhardiyanto merged commit af7fb97 into main Jul 15, 2026
4 checks passed
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