Stu Mason
Stu Mason

Activity

Pull Request Merged

PR #101 merged: fix(docker): use install-php-extensions for PHP 8.5 base images

Summary

Third (and hopefully final) attempt at fixing the nightly base-image build. Read history before approving — the previous two attempts (#97, #100) chased wrong hypotheses.

What we learned from #97 / #100

  • #97 (-j$(nproc)-j1) — assumed parallelism race. Verified post-merge: still failed identically.
  • #100 (opcache into its own RUN) — assumed inter-extension teardown was wiping opcache's JIT IR helpers. Verified post-merge: still failed identically. The standalone-opcache log was the smoking gun — opcache's make all ran in 0ms with no compile output yet emitted "Build complete.":
2.169 Configuring for: PHP 8.5
... configure runs to completion ...
4.410 Build complete.       ← NO COMPILE OUTPUT BEFORE THIS
4.481 cp: cannot stat 'modules/*'

This is a docker-php-ext-install-vs-PHP-8.5 incompatibility specific to opcache. I can't diagnose further without local repro.

This change

Switches the PHP 8.5 Dockerfiles (Dockerfile.8.5, Dockerfile.8.5-node) to use mlocati/install-php-extensions — the de facto community-maintained alternative to docker-php-ext-install. Same set of extensions installed; same end state.

Untouched: Dockerfile.8.3 and Dockerfile.8.4 still use docker-php-ext-install — they work fine on those versions, no need to take on a new dependency there.

Trade-offs

  • Adds a third-party script as a build dependency. The script is from mlocati/docker-php-extension-installer, widely used in production, MIT licensed. Binary pinned to latest — open to switching to a tagged release (e.g. v2.x) if you'd prefer a more conservative pin.
  • Slightly different extension setup output, but same installed extensions and same runtime behaviour.
  • If docker-php-ext-install ships a PHP 8.5 fix upstream, we can revisit and unify back.

Test plan

  • PR CI lane passes (Tests / Lint / Pint / PHPStan)
  • Manual build-base-images.yml dispatch after merge — confirm all 8.5 jobs go green
  • Watch next nightly run lands green
  • If anything else regresses (it shouldn't — same extensions), happy to address in a follow-up

Honest note

Two failed PRs in a row on the same issue is not a good look. I should've reached for install-php-extensions sooner instead of pattern-matching on parallelism / cleanup theories. Apologies for the noise.

+24
additions
-22
deletions
2
files changed