Repository navigation
Conversation
WordPress 7.2 adds support for PHP 8.6, so the pre-release ("beta") images
now include PHP 8.6 variants built from the upstream `php:8.6-rc-*` images.
The `latest` and `cli` channels are unchanged.
PHP 8.6 images no longer ship pear/pecl or a compiled-in mbstring
(docker-library/php#1654), so for 8.6:
- mbstring is installed via docker-php-ext-install
- imagick is built from the checksum-verified PECL source tarball via
docker-php-ext-install instead of `pecl install`
Note: the generated beta/php8.6/* Dockerfiles have not been produced yet
(run ./apply-templates.sh beta).
Gate PHP 8.6 on the WordPress version rather than the release channel, so any 7.1.x release (including a 7.1.x point release or RC that lands in the "latest" or "beta" channel) never receives PHP 8.6 images, while 7.2 pre-releases and the 7.2 release itself (and later) do.
No imagick release compiles against PHP 8.6: 3.8.1 still uses zval_dtor() and XtOffsetOf(), both removed in PHP 8.6 (see php-src UPGRADING.INTERNALS). The XtOffsetOf fix (Imagick/imagick#795) is merged but unreleased, and the zval_dtor fix (Imagick/imagick#768) is still open. Installing imagick without pecl is also pending docker-library#1001 (pie). Until then, PHP 8.6 images skip imagick and its build-only -dev packages; WordPress falls back to GD for image processing. The PHP 8.2-8.5 output is unchanged.
| [ "8.2", "8.3", "8.4", "8.5" ] | ||
| # PHP 8.6 is only supported by WordPress 7.2+ (regardless of channel; "cli" is WP-CLI, not WordPress) | ||
| + if env.version != "cli" and ( | ||
| env.fullVersion | ||
| | capture("^(?<major>[0-9]+)[.](?<minor>[0-9]+)") | ||
| | [ (.major, .minor) | tonumber ] >= [ 7, 2 ] | ||
| ) then [ "8.6" ] else [] end |
There was a problem hiding this comment.
I think we end up with a lot of nice properties for "free" if we just embed "8.6-rc" here instead of handling RC-specific logic all over -- then we don't need the is_php_rc function at all, for example, and the FROM values and the image tags are automatically correct (php8.6-rc instead of just php8.6).
I think we also don't need the version gate, because we only support a single version of WordPress (#701). 🙇 👀
There was a problem hiding this comment.
Great call, thanks! Updated in 0ee2ef5:
8.6-rcis now embedded directly inphpVersions(sois_php_rcis gone and theFROM/tags come out asphp:8.6-rc-*/beta-php8.6-rc-*)- the WordPress version gate is replaced with a plain
beta-only condition. I've noted the follow-ups in the description: renaming to8.6at GA, and moving it into the shared list once 7.2.0 ships (sincebetagets skipped when it matcheslatest).
I think we also don't need the version gate, because we only support a single version of WordPress (#701).
Given how large the expanded matrix is, this seems reasonable. I'm afraid I don't really know how these images are used in practice. If these are used by folks in production environments it would be great to ship some security updates, even if only for the last handful of versions. I'll follow up over on #701!
Embedding "8.6-rc" directly in phpVersions makes the FROM values and image tags (php8.6-rc) correct automatically, so is_php_rc is no longer needed. Also drop the WordPress version gate in favor of only adding 8.6-rc to the beta channel, since only a single version of WordPress is supported at a time (docker-library#701).
WordPress 7.2 (currently in beta) adds support for PHP 8.6. This PR adds PHP 8.6 variants so the ecosystem can test against them during the 7.2 pre-release cycle. In #986 there was some interest in exploring PHP pre-release support "assuming WordPress upstream supports the given pre-release version", and that's the case here.
Changes
versions.sh/versions.json:8.6-rcis added tophpVersionsfor thebetachannel only, so theFROMvalues (php:8.6-rc-<variant>) and image tags (beta-php8.6-rc-*) are correct without any RC-specific logic.latest(7.1.x) andcliare unchanged.Dockerfile.template:mbstring(Drop--with-pearwith PHP 8.6 php#1654), so for 8.6mbstringis installed withdocker-php-ext-install(pluslibonig-dev/oniguruma-dev).zval_dtor()andXtOffsetOf(), which were removed in 8.6 (php-srcUPGRADING.INTERNALS). TheXtOffsetOffix (XtOffsetOf is removed in 8.6, use standard C offsetof Imagick/imagick#795) is merged but unreleased; thezval_dtorfix (The zval_dtor() alias of zval_ptr_dtor_nogc() has been removed in php 8.6 (master) Imagick/imagick#768) is still open. Installing imagick without pecl is also pending Migrate to pie for installing imagick #1001. WordPress falls back to GD for image processing in the meantime.Rendered output for PHP 8.2–8.5 and
cliis byte-identical to what's currently committed, and the generated tags for all existing entries are unchanged.Notes
8.6-rcto8.6(images move tophp:8.6-*and tags tophp8.6).betawill matchlatestand be skipped bygenerate-stackbrew-library.sh, so 8.6 needs to move into the sharedphpVersionslist at that point or the 8.6 images will disappear.Still to do
./apply-templates.shand commit the generatedbeta/php8.6-rc/*directoriesapache,fpmandfpm-alpineon 8.6AI Disclaimer
This PR was generated with Claude Opus 5.5 and manually reviewed by me.
Closes #1027