Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KXMvf7N1S6F7E4fQKP96sA
  • Loading branch information
claude committed Sep 9, 2026
commit e83fbc664f5f54e12dab65eb62ce289226377b9f
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down Expand Up @@ -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; }
Loading