Skip to content

feat(php): add the PHP 8.6 image - #385

Draft
mrrobot47 wants to merge 2 commits into
EasyEngine:developfrom
mrrobot47:feat/php-8.6
Draft

mrrobot47 wants to merge 2 commits into
EasyEngine:developfrom
mrrobot47:feat/php-8.6

Conversation

@mrrobot47

Copy link
Copy Markdown
Member

Summary

Adds the easyengine/php8.6 image (php/8.6), based on php/8.5.

Draft until PHP 8.6.0 GA is on Docker Hub. There is no php:8.6.0-fpm or php:8.6-fpm tag yet, so the image is built on php:8.6.0RC7-fpm, the newest RC. It moves to the 8.6.0 GA tag once that is published (and the extension pins below are re-checked then).

This PR also edits .github/workflows/test_and_publish.yml (adds '8.6' to the PHP matrix) and .github/dependabot.yaml (a php/8.6 entry like php/8.5's).

What differs from php/8.5

The 8.6 base image changed in three ways that affect this Dockerfile:

Extensions:

8.5 image 8.6 image
memcached pecl 3.4.0 upstream head 0b52d365 (reports 3.4.1dev): 3.4.0 doesn't build on 8.6 (XtOffsetOf, zval_dtor removed); fixed in php-memcached-dev/php-memcached#580, not released yet
redis pecl 6.3.0 upstream develop head 5b60b125 (reports 6.3.0RC1): 6.3.0 doesn't build on 8.6
apcu pecl 5.1.28 upstream head fb2c9425 (reports 5.1.29-dev): 5.1.28 doesn't build on 8.6
timezonedb pecl latest pecl.php.net latest tarball (2026.6), unchanged behaviour
imagick git master git master (unchanged step, builds on 8.6)
mcrypt pecl 1.0.9 dropped: doesn't build on 8.6, not even the upstream head (fixes are only in open PRs php/pecl-encryption-mcrypt#26 and #27)
imap pecl 1.0.3 dropped: doesn't build on 8.6, not even the upstream head; the sury libc-client-dev step it needed is commented out too
opcache docker-php-ext-install opcache (fails silently, opcache is built in since 8.5) line removed
mbstring built into the base installed as an extension

The memcached, redis and apcu sources are pinned by full commit SHA. Their builds are unreleased upstream code, so they should move to the first releases that support 8.6.

New Relic: stays disabled, as on 8.5. The latest agent (12.13.0.43) has no module for 8.6's API (20261112), and it has no ZTS build at all. The commented download line already uses the fixed lookup (grep 'linux\.tar\.gz"' | head -n 1).

php.ini, easyengine.conf, bashrc, expose_off.ini, newrelic.ini and docker-entrypoint.sh are copies of 8.5's, so php.ini has no session.sid_length / session.sid_bits_per_character.

Behaviour change from PHP itself: 8.6 defaults session.cookie_samesite to Lax (8.5: empty), and the image's php.ini doesn't set it, so session cookies now carry SameSite=Lax.

Testing

Built locally with docker build -t easyengine/php8.6:test php/8.6 (amd64 only) and compared with easyengine/php8.5:v4.14.0:

  • php -v: PHP 8.6.0RC7 (cli) (ZTS), with Zend OPcache.
  • php -m: the same modules as the 8.5 image except imap and mcrypt.
  • No startup warnings or deprecations with error_reporting=-1 and display_startup_errors=1. Every directive the shipped php.ini sets that 8.5 knows is also known on 8.6.
  • php-fpm -t passes. php-fpm started through the image's entrypoint serves FastCGI requests (sessions, mbstring, redis, memcached, apcu, imagick, opcache all working) and its error log has only the usual startup notices, the same as on 8.5.
  • wp --version (WP-CLI 2.12.0) and composer --version run.
  • Each extension was also built on its own on the RC7 base to confirm which PECL releases and upstream heads build.

Add php/8.6, based on php/8.5, on the php:8.6.0RC7-fpm base until the 8.6.0 GA image is on Docker Hub.

The 8.6 base image differs from 8.5's in three ways that need changes here:
- It has no pecl or PEAR (docker-library/php#1654), so memcached, redis, apcu and timezonedb are built from source tarballs with docker-php-ext-install, and the extension RUN uses set -eux so a failed extension fails the build instead of being skipped.
- mbstring is no longer compiled in, so it is installed as an extension (with libonig-dev).
- It is built with ZTS (docker-library/php#1686).

The latest PECL releases of memcached (3.4.0), redis (6.3.0) and apcu (5.1.28) don't build on 8.6, so the upstream commits that fix the build are pinned. mcrypt and imap don't build on 8.6 even from their upstream heads, so they are commented out, with the sury libc-client-dev step imap needed. Opcache is always compiled in since 8.5, so it is no longer installed as an extension. The New Relic agent stays disabled as on 8.5: its newest release has no build for 8.6's module API (20261112) or for ZTS. The commented download already uses the lookup that only matches the tarball.

php.ini is 8.5's, without the deprecated session.sid_length and session.sid_bits_per_character settings.
Add 8.6 to the PHP build matrix and a Dependabot entry for php/8.6, like 8.5.
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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