From 37af9f99026702d4e77dec32cd3f29b3382b6bb8 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 23 Nov 2026 09:52:38 +0100 Subject: [PATCH 1/2] Remove the php-fpm wrapper for Bref v3: bref/bref v4 reads /etc/php/php-fpm.conf --- Dockerfile | 3 --- src/bootstrap.sh | 3 +-- src/php-fpm-v3-compat.sh | 13 ------------- tests/composer.json | 2 +- 4 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 src/php-fpm-v3-compat.sh diff --git a/Dockerfile b/Dockerfile index cd14bdf7..e5c89b6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -211,9 +211,6 @@ COPY --link src/php.ini /etc/php/conf.d/50-bref.ini # Before PHP 8.5, opcache is a shared extension RUN if [ "${PHP_VERSION}" -lt 85 ]; then echo 'zend_extension=opcache' > /etc/php/conf.d/10-opcache.ini; fi COPY --link src/php-fpm.conf /etc/php/php-fpm.conf -# TODO remove once bref/bref v4 reads /etc/php/php-fpm.conf: Bref v3 starts php-fpm with /opt/bref/etc/php-fpm.conf -COPY --link src/php-fpm-v3-compat.sh /usr/local/bin/php-fpm -RUN chmod +x /usr/local/bin/php-fpm COPY --link src/bootstrap.sh /var/runtime/bootstrap RUN chmod +x /var/runtime/bootstrap diff --git a/src/bootstrap.sh b/src/bootstrap.sh index f7702b00..d53d92ad 100644 --- a/src/bootstrap.sh +++ b/src/bootstrap.sh @@ -4,8 +4,7 @@ set -e # Lambda does not apply the image's ENV to custom runtimes: set what PHP needs here. -# /usr/local/bin first: it holds the php-fpm wrapper for Bref v3, see php-fpm-v3-compat.sh -export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin" +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" export LAMBDA_TASK_ROOT="${LAMBDA_TASK_ROOT:-/var/task}" # The handler is passed as the first argument (Lambda container images get it from # /lambda-entrypoint.sh, which sets _HANDLER) diff --git a/src/php-fpm-v3-compat.sh b/src/php-fpm-v3-compat.sh deleted file mode 100644 index 175d2322..00000000 --- a/src/php-fpm-v3-compat.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# Bref v3 (bref/bref 3.x) starts `php-fpm --fpm-config /opt/bref/etc/php-fpm.conf`. -# Nothing is in /opt anymore: point it to /etc/php/php-fpm.conf. -# TODO remove once bref/bref v4 reads /etc/php/php-fpm.conf -set -e -for arg do - shift - if [ "$arg" = "/opt/bref/etc/php-fpm.conf" ]; then - arg=/etc/php/php-fpm.conf - fi - set -- "$@" "$arg" -done -exec /usr/local/sbin/php-fpm "$@" diff --git a/tests/composer.json b/tests/composer.json index 4d38fcbd..9c727942 100644 --- a/tests/composer.json +++ b/tests/composer.json @@ -1,6 +1,6 @@ { "require": { - "bref/bref": "dev-master" + "bref/bref": "dev-v4-fpm-config as 4.x-dev" }, "config": { "platform": { From 517e35877606ec2c42f29fbb3d134822e82207d9 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 23 Nov 2026 10:16:05 +0100 Subject: [PATCH 2/2] Tests: use bref/bref 4.x --- tests/composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/composer.json b/tests/composer.json index 9c727942..2d1d213a 100644 --- a/tests/composer.json +++ b/tests/composer.json @@ -1,6 +1,6 @@ { "require": { - "bref/bref": "dev-v4-fpm-config as 4.x-dev" + "bref/bref": "4.x-dev" }, "config": { "platform": {