Skip to content

feat(php): add PHP 8.6 to site update - #540

Merged
mrrobot47 merged 3 commits into
EasyEngine:developfrom
mrrobot47:feat/php-8.6
Nov 19, 2026
Merged

mrrobot47 merged 3 commits into
EasyEngine:developfrom
mrrobot47:feat/php-8.6

Conversation

@mrrobot47

@mrrobot47 mrrobot47 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds PHP 8.6 to ee site update --php, for EasyEngine v4.15.0.

  • src/helper/class-ee-site.php: 8.6 in the --php help and options of site update.
  • templates/config/php-fpm/php86.zip (new): the config a site gets when it switches to 8.6, built like php85.zip (feat(config): add PHP 8.5 configuration zip file #471). It contains the /usr/local/etc of the easyengine/php8.6 image (feat(php): add the PHP 8.6 image dockerfiles#385, built on php:8.6.0-fpm): php.ini without session.sid_length / session.sid_bits_per_character, the default php-fpm.conf, and easyengine.conf. It also has the custom.ini from php85.zip and a msmtprc that points at the site's postfix.

Compared with php85.zip, php86.zip has no pear.conf (the 8.6 base image has no PEAR). Its conf.d follows the 8.6 image: docker-php-ext-memcached.ini instead of memcached.ini, a new docker-php-ext-mbstring.ini, and no imap.ini / docker-php-ext-mcrypt.ini. Nothing in core or the site packages keys on those file names.

The zip was first built from the 8.6.0RC7 image. The second commit rebuilds it from the 8.6.0 release image, and its files are byte-identical to the RC7 build.

The third commit fixes an older problem in site update --php. Core's option check compares loosely, so values like 8.10, 8, 08.5, "8.5 " or 8.50 pass as 8.1, 8.0 or 8.5 (on PHP 7 also 8.5.0, 8.5abc and 8.5.). update_php() then wrote a docker-compose.yml naming an image that doesn't exist, such as easyengine/php8.10:, tried to pull it, and relied on the rollback to put the site back (it does: the old compose file, config and DB value come back whether the pull or the missing php810.zip fails). On PHP 7, 8.5. even maps to php85.zip. update() now rejects any --php value that isn't exactly an X.Y version with Invalid value specified for 'php': <value>, before it changes anything. Exact values such as --php=8.6 and the errors for invalid ones (--php=latest, --php=9.9) behave as before.

Context

  • The easyengine/php8.6 image comes from feat(php): add the PHP 8.6 image dockerfiles#385. It drops mcrypt and imap (they don't build on 8.6), builds memcached, redis and apcu from pinned upstream commits until their releases support 8.6, and keeps PHP 8.6's new session.cookie_samesite = Lax default.
  • Core pins the image in img-versions.json (separate core PR). site-type-wp and site-type-php add --php=8.6 to site create in their own PRs, where 8.6 stays opt-in and the default moves to 8.5.
  • The drop_deprecated_session_sid_settings migration's PHP versions stay unchanged: the 8.6 configs never had those settings.

Testing

  • PHPUnit (PhpConfigTemplateTest and UpdatePhpTest in my local test suite, which is not part of this PR; run on PHP 7.4 and 8.5):
    • site update accepts 8.6, every --php option has a config zip, php86.zip has php85.zip's layout, the 8.4, 8.5 and 8.6 zips have no sid settings, and the mail settings use msmtp and postfix.
    • Core's option check over every option, invalid values (latest, 7.1, 8.7, 9.0, 5.5, abc) and the loosely matching ones, on each PHP version.
    • update_php() with a recording site type: 8.5 → 8.6 and 8.6 → 8.5 (config tree = the target zip plus the site's own custom.ini and easyengine.conf, backup = the old tree), latest sites → 8.5 and → 8.4 (backup dir php-latest), the "already at" check, and the rollbacks.
    • update() rejects each of the 16 non-exact values before it writes or runs anything.
    • Results: OK, 72 tests, on both versions. Against develop, the 8.6 and guard tests fail (26) and the rest pass. The full local suite has no new failures.
  • php86.zip extracted and mounted as /usr/local/etc of easyengine/php8.6 (what ee site update --php=8.6 produces): php-fpm serves requests with sendmail_path = /usr/bin/msmtp -t, and /etc/msmtprc points at the site's postfix.
  • php -l is clean on PHP 7.4 and 8.5.

Allow `ee site update --php=8.6` and add the php86.zip config it switches the site to. The zip is the /usr/local/etc of the easyengine/php8.6 image (php.ini without the session.sid_length and session.sid_bits_per_character settings, the default php-fpm.conf and easyengine.conf) plus the custom.ini and msmtprc a site gets. The 8.6 base image has no PEAR, so the zip has no pear.conf.
The archive was built from the 8.6.0RC7 image. It's now rebuilt from the easyengine/php8.6 image on the php:8.6.0-fpm base, in the same way: the image's /usr/local/etc plus custom.ini and msmtprc. The files are byte-identical to the RC7 build. Only the archive entry dates change.
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: PHP version options and validation

Layer / File(s) Summary
Document and validate PHP versions
src/helper/class-ee-site.php
The help text and option list include PHP 8.6. The command rejects non-false PHP values that do not match the one-digit-dot-one-digit format.

Suggested reviewers: l0rd-zer0

Change: Feature

Merge Risk: Minimal · up to 330ca

This change adds PHP 8.6 to site update and rejects malformed PHP values before the update runs. No concrete merge-blocking risk was found.

Security architecture risk: Minimal · up to 330ca

The change adds PHP 8.6 through the existing site-update workflow and strengthens input validation. No introduced or worsened security, isolation, or rollback risk was established. External image compatibility and runtime behavior were not validated.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The direct changed-resource scope is the selected site's PHP container, configuration, and recorded version. The inspected diff adds no remote entrypoint or additional Docker authority; the existing administrative execution boundary remains unchanged.

Trust Boundaries and Controls

  • observed — The additive guard restricts caller-supplied PHP version text before it reaches template-path construction. The existing configuration-volume controls stop PHP, reject a volume still mounted by a running container, and check for a plain file tree before replacement.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

PHPStan (2.3.5)

Composer install failed: dependency resolution error. Check composer.json and composer.lock for version constraints.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 38b52b83-cf29-46fc-8f60-2611701bd2e1
Commits

Reviewing files that changed from the base of the PR and between ed2491e and 330ca29.

Files selected for processing: 1

  • src/helper/class-ee-site.php

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

The synopsis check compares --php loosely against the options, so values like 8.10, 8, 08.5, "8.5 " or 8.50 pass it as 8.1, 8.0 or 8.5 (and on PHP 7 also 8.5.0 or 8.5abc). update_php() then rewrites docker-compose.yml with an image that doesn't exist and relies on the rollback to put it back; a value like 8.5. even maps to php85.zip. Reject anything that isn't exactly an X.Y version before the update changes anything.
@mrrobot47
mrrobot47 merged commit d087f53 into EasyEngine:develop Nov 19, 2026
23 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