Skip to content

Publish PHP 8.6 images (GA 2026-11-19): migrate pecl → PIE #8

Open

Description

@barretstorck

PHP 8.6 GA is scheduled for 2026-11-19 (release schedule: RC1 09-24, RC2 10-08, RC3 10-22, RC4 11-05). This issue tracks publishing 8.6 images once it ships. The 8.5 bump (#7) deliberately leaves 8.6 out of scope because it is more than a tag change.

For planning: 8.4 active support ends 2026-12-31, and 8.5 active support ends 2027-12-31 (supported versions).

Findings below were checked against php:8.6-rc-* (8.6.0beta3) on 2026-09-16. [verified] means built and run in Docker; everything else comes from the linked sources.

Blocker 1: pecl is gone from the 8.6 images → move to PIE

  • What changed: docker-library dropped --with-pear for 8.6 (docker-library/php#1654, discussed in #1554), following the PIE adoption / PECL deprecation RFC. 8.2–8.5 images keep pecl. On 8.6, our RUN pecl install ... step exits 127 [verified].
  • Replacement: PIE. docker-library won't bundle it, so we copy it in ourselves.
  • PIE works on 8.5 too [verified]: stable imagick 3.8.1, pcov 1.0.12, redis 6.3.0, yaml 2.3.0 and xdebug 3.5.3 all install and load on 8.5-cli and 8.5-cli-alpine. One install path can serve every version, so there is no need to branch on the PHP version.

Proposed changes

  • bin/builddockerfile: replace the pecl install step with:

    COPY --from=ghcr.io/php/pie:1-bin /pie /usr/bin/pie
    RUN pie install -n --skip-enable-extension <packages...>
    • pie install accepts several packages in one call [verified].
    • -n makes it non-interactive.
    • Pin 1-bin rather than bin. Rolling major/minor tags exist from PIE 1.5.
  • Keep the existing docker-php-ext-enable step and pass --skip-enable-extension to PIE.

    • Without that flag, PIE enables the extension itself (through docker-php-ext-enable). Our enable step then prints warning: imagick (imagick) is already loaded!. It still exits 0, but the output is noisy [verified].
    • With the flag, the xdebug.ini COPY still overwrites docker-php-ext-xdebug.ini as before.
  • Extension configs: replace PECL_INSTALL with a PIE field that holds the Packagist name, and update CONTRIBUTING.md.

    ext Packagist package
    imagick imagick/imagick
    pcov pecl/pcov
    redis phpredis/phpredis
    xdebug xdebug/xdebug
    yaml pecl/yaml
  • Leave packages unconstrained where possible; PIE resolves a compatible release for the running PHP. For example, xdebug 3.5.x requires <8.6 and 3.6 requires <8.7.

    • Pre-release syntax, if needed: xdebug/xdebug:^3.6@alpha, or vendor/pkg:dev-<branch> [verified].
  • Build dependencies:

    • Debian: PIE needs unzip, otherwise it fails with "zip extension and unzip/7z commands are both missing". Today unzip only arrives via the composer config, so every PIE-backed extension must declare it.
    • Alpine: busybox unzip is enough. Still needs autoconf build-base.
    • Both: add libtool to silence PIE's "missing: libtoolize" warning. Builds succeed without it [verified].
  • Clean up PIE's caches (/root/.pie, /root/.composer/cache) in the same layer, or use --no-cache.

  • Consider passing GITHUB_TOKEN to the build as a BuildKit secret and into COMPOSER_AUTH.

    • Plain Packagist installs worked anonymously [verified].
    • vcs/dev-branch installs needed auth [verified], and anonymous GitHub API limits are easy to hit on shared runners.
  • Rebuild and verify all 14 8.5 images on the PIE path before adding any 8.6 rows. This part can land ahead of GA.

Blocker 2: PECL extensions don't compile on 8.6 yet

php-src 8.6 removed several internal macros (zval_dtor, XtOffsetOf, zval_is_true, INI_STR/INI_BOOL changes; see UPGRADING.INTERNALS). With PIE on 8.6.0beta3 (Debian trixie and Alpine 3.24), the latest stable releases give [verified]:

ext latest stable builds on 8.6? upstream status
xdebug 3.5.3 (<8.6) ❌ refuses 3.6.0alpha1 builds ✅; no date for 3.6 stable (compat)
imagick 3.8.1 ❌ fixed in master (Imagick/imagick#795), unreleased; dev-master builds ✅
redis 6.3.0 ❌ fixed in develop (phpredis#2884 + #2888, #2900), unreleased; dev-develop builds ✅
pcov 1.0.12 ❌ riskiest: fix PRs krakjoe/pcov#133/#134 still open; only the issue-php86a2 branch builds; no release since 2024-12
yaml 2.3.0 ❌ fixed 2026-09-15 (#109), unreleased; Packagist is stale because the repo lacks a webhook (#101)
  • Before GA, and again at GA, re-check for stable releases of all five.
  • Don't publish images built from dev branches. For any extension still unreleased at GA, pick one:
    • (a) delay 8.6 images;
    • (b) publish 8.6 images without that extension, gated with php_version_lt / PHP_VERSION in its config, with the README noting the gap;
    • (c) only publish the 8.6 variants whose extension lists are fully satisfiable.
  • If an extension config becomes empty on 8.6, check that bin/test-container still reports it as skipped rather than failed.

Blocker 3: mbstring is no longer compiled into the 8.6 images

  • What changed: the docker-library template change that dropped pear also dropped --enable-mbstring and oniguruma for 8.6. php -m on 8.6-rc has no mbstring, while 8.5 does [verified]. Composer packages and frameworks (Laravel etc.) commonly require it.

  • Install:

    • docker-php-ext-install mbstring fails without oniguruma [verified].
    • docker-php-ext-configure mbstring --disable-mbregex && docker-php-ext-install mbstring works with no extra packages [verified]. mbregex is deprecated in 8.6 anyway (RFC).
  • Add extensions/mbstring/config, gated to 8.6+ with php_version_lt 8.6 (it is already built in before that), and add it to the README extension table.

  • Add mbstring to every matrix row so 8.6 images keep parity with 8.5.

    • This changes every published tag name (generate-tag includes the extension list), so update the README table and announce it.
    • Alternative: add it only to the 8.6 rows.

Things that already work on 8.6 [verified]

  • Bundled extensions: bin/builddockerfile built bcmath, bz2, exif, gd, gmp, intl, mysqli, opcache, pcntl, pgsql, soap, sockets, xsl, zip and composer on 8.6-rc-cli and 8.6-rc-cli-alpine. All 15 passed bin/verify-extension.
  • opcache: the gate added in ci: build PHP 8.5 images and drop 8.4 #7 already covers 8.6 (OPcache is built in from 8.5).
  • Version parsing: bin/php-version parses 8.6-rc-* tags as 8.6.
  • Composer: 2.10.3 runs on 8.6.
  • Base images: all five bases exist as 8.6-rc-*. Unsuffixed tags are Debian 13 trixie, and Alpine defaults to 3.24.
  • Removed extensions: none. The UPGRADING "removed extensions" section is empty. New always-on modules: uri, lexbor.

CI / rollout gotchas

  • Use 8.6-* tags, not 8.6-rc-*, in the matrix.
    • At GA the 8.6-rc-* tags stop updating but stay pullable. They are reused later for patch RCs (today 8.4-rc is 8.4.26RC1).
    • Left in the matrix, the digest gate would silently skip them forever on a stale RC, or rebuild sporadically on patch RCs.
    • php:8.6-cli returns 404 until GA.
  • Don't add 8.6-* rows before the tags exist.
    • resolve-base-digest fails and marks them changed, so the build fails.
    • keepalive only records digests when every build succeeds, so a failing 8.6 row also stops the 8.5 digests from advancing (8.5 would rebuild daily).
    • The same applies to any 8.6 row with an extension that can't build yet (Blocker 2).
  • RC builds publish under a different name. If we publish RC images for early testing, the tags would be ghcr.io/barretstorck/php:8.6-rc-cli-... and would need removing at GA. Prefer a local make build PHP=8.6-rc-cli ... / bin/test-container check, or a separate non-publishing CI job.
  • README: the prebuilt table must stay 1:1 with the matrix. Check each row with bin/generate-tag.
  • 8.5 rows at GA: decide whether to keep them alongside 8.6 (8.5 has active support through 2027-12-31). Keeping both doubles the matrix to 28 jobs, which the digest gate keeps cheap.

Behaviour changes worth a README / release note

These don't affect the build, but image users will notice them:

  • Session defaults are now use_strict_mode=1, cookie_httponly=1, cookie_samesite=Lax.
  • A hard out-of-memory now exits with code 134 instead of 1.
  • Stricter TypeError/ValueError in gd, gmp, intl, pcntl, soap, sockets, zip.
  • Deprecations include mbregex and mysqli get_charset/stmt_init.

See UPGRADING.

Suggested order

  1. Now: land the PIE migration (Blocker 1) and verify it on 8.5.
  2. Now: add the gated mbstring config (Blocker 3).
  3. RC period: track the Blocker 2 releases and smoke-test locally with bin/test-container 8.6-rc-cli ....
  4. On or after 2026-11-19: add 8.6-* matrix rows and README rows, and decide what to do with any extension that is still unreleased.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions