Repository navigation
Conversation
- One Dockerfile for PHP 8.3, 8.4 and 8.5 (versions in docker-bake.hcl), multi-architecture images (linux/amd64 + linux/arm64): bref/php-XX, bref/php-XX-dev, bref/build-php-XX. - No more Lambda layers: nothing is installed in /opt (layers would hide it). PHP in /usr/local, configuration in /etc/php, Bref's bootstrap in /var/runtime. - PHP compiled with -O2 instead of -Os, default extensions compiled statically, optional ones (intl, soap, apcu, redis) shared and disabled as before. - OpenSSL 3.5 built with Amazon Linux's SnapSafe patch (SnapStart-safe randomness). - zend.assertions=-1. - php-fpm wrapper so that bref/bref 3.x (which starts FPM with /opt/bref/etc/php-fpm.conf) works.
# Conflicts: # src/php-85.ini
Member
Author
|
Measured on Lambda (CMR runtime, arm64, 1024 MB, 20 cold starts each, interleaved): A = v3 layer, B = the research prototype (
Warm requests: no difference (1.5 ms |
Simpler for now. Without it, environments restored from the same SnapStart snapshot share OpenSSL's random generator state.
mnapoli
commented
Nov 18, 2026
mnapoli
commented
Nov 23, 2026
mnapoli
commented
Nov 23, 2026
…ckage, trim the README - Don't publish the latest tag while v3 is the stable version - Rename VERSIONS to FULL_PHP_VERSIONS and VERSION_PHP to FULL_PHP_VERSION - Explain why each apt package is installed, remove the unused ones (perl, patch, xz-utils: only used to compile OpenSSL; bz2: PHP has no bz2 extension) - README: remove the design decisions log and the Dockerfile walkthrough, the release no longer runs the tests
…mented as a breaking change in the v4 upgrade guide
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First step of the v4 runtime: the images, built and tested, without the Customer-Managed Runtime publishing yet (separate PR).
What changes compared to v3:
Dockerfilefor every PHP version (versions indocker-bake.hcl)./opt(Lambda mounts layers there and they would hide it). PHP in/usr/local, config in/etc/php, bootstrap in/var/runtime. Extension layers still work:/opt/bref/etc/php/conf.dis still scanned.bref/php-85serves both x86 and arm (no morearm-prefix), plus-devandbref/build-php-85for building extensions.zend.assertions=-1, certificates at/usr/lib/ssl/cert.pem(and still at v3's/etc/pki/tls/cert.pem)./var/taskand/etc/hosts, which Lambda requires (without them the environment silently never starts).Validated:
make testpasses for 8.3, 8.4 and 8.5 (arm64), and the 8.5 image runs as a CMR runtime on Lambda (function, FPM, Laravel) with today'sbref/bref3.x thanks to aphp-fpmwrapper (src/php-fpm-v3-compat.sh, to remove once bref/bref v4 reads/etc/php/php-fpm.conf).Choices to validate:
bref/php-XX,bref/php-XX-dev,bref/build-php-XX, Docker tag4.Not in this PR: CMR runtime publishing (versions, aliases, pre-warming), the extra extensions, the HTTP server mode (nginx/FrankenPHP), the single php/php-fpm binary, bref/bref v4.
The branch merges
4.x(#350:src/php-85.iniis gone, itsfastcgi_finish_requestchange lands insrc/php.ini), and the tests now run on pushes to4.xinstead ofv4.