From 658caa83b249670b1017f5a709cbc7fe063a194e Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 26 Jul 2026 11:18:42 +0000 Subject: [PATCH 1/2] Add pcov extension to PHP 8.5 images Install the php8.5-pcov package (code coverage driver) in the PHP 8.5 CLI and FPM Dockerfiles and mark pcov as available for 8.5 in the README extension table. Images for 7.1-8.4 already ship pcov. pcov requires PHP >= 7.1, so the 5.6 and 7.0 images are left unchanged. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01KXMvf7N1S6F7E4fQKP96sA --- 8.5-fpm/Dockerfile | 1 + 8.5/Dockerfile | 1 + README.md | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/8.5-fpm/Dockerfile b/8.5-fpm/Dockerfile index a1630fc..022b1bd 100644 --- a/8.5-fpm/Dockerfile +++ b/8.5-fpm/Dockerfile @@ -41,6 +41,7 @@ RUN apt update && apt dist-upgrade -y && \ php8.5-mbstring \ php8.5-memcached \ php8.5-mysql \ + php8.5-pcov \ php8.5-pdo \ php8.5-pgsql \ php8.5-soap \ diff --git a/8.5/Dockerfile b/8.5/Dockerfile index 55a6012..d0a848d 100644 --- a/8.5/Dockerfile +++ b/8.5/Dockerfile @@ -37,6 +37,7 @@ RUN apt update && apt dist-upgrade -y && \ php8.5-mbstring \ php8.5-memcached \ php8.5-mysql \ + php8.5-pcov \ php8.5-pdo \ php8.5-pgsql \ php8.5-soap \ diff --git a/README.md b/README.md index 16d16de..78a20b0 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ These images have preinstalled a couple of PHP extensions. The table shows which | mcrypt | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | | memcached | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | mysql | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | -| pcov | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | +| pcov | ❌ | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | pdo | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | pgsql | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | redis | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | From e83fbc664f5f54e12dab65eb62ce289226377b9f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 9 Sep 2026 06:16:18 +0000 Subject: [PATCH 2/2] Make: assert pcov is loaded in the smoke tests The cli and fpm smoke tests now run a test-pcov-* check that fails when the pcov extension is missing from an image built for PHP >= 7.1. Images older than 7.1 are exempt, since pcov does not support them. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01KXMvf7N1S6F7E4fQKP96sA --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a360d3d..f6c8e07 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ DOCKER_IMAGE=dockette/php DOCKER_PLATFORM?=linux/amd64 VERSION?=8.5 -.PHONY: build test run test-cli-% test-fpm-% +.PHONY: build test run test-cli-% test-fpm-% test-pcov-% build: build-${VERSION} @@ -47,6 +47,13 @@ build-8.5-fpm: _build-8.5-fpm test-cli-%: docker run --rm ${DOCKER_IMAGE}:$* sh -lc 'php -v && composer --version' + ${MAKE} test-pcov-$* test-fpm-%: docker run --rm ${DOCKER_IMAGE}:$*-fpm sh -lc 'php -v && composer --version && php-fpm$* -t' + ${MAKE} test-pcov-$*-fpm + +# pcov requires PHP >= 7.1, older images are expected not to have it +test-pcov-%: + docker run --rm ${DOCKER_IMAGE}:$* php -r 'exit(PHP_VERSION_ID < 70100 || extension_loaded("pcov") ? 0 : 1);' \ + || { echo "ERROR: pcov is not loaded in ${DOCKER_IMAGE}:$*" >&2; exit 1; }