From e3bd8fea2ba059d81cb26daecd6e3963f6071178 Mon Sep 17 00:00:00 2001 From: Rick Lam Date: Thu, 28 May 2026 12:56:22 +0100 Subject: [PATCH] Makefile: target PHP 7.4 (and matrix 8.0-8.5), use phpcs.xml.dist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PHP_VER default 7.2 -> 7.4 (composer now requires PHP >= 7.4, so the previous default fatal'd at composer platform_check.php). - Pass --standard=./phpcs.xml.dist to phpcs/phpcbf so local lint matches CI (and applies the mixed-type-hint exclusion). - test-matrix updated: PHP 7.4 + 8.0, 8.1, 8.2, 8.3, 8.4, 8.5 (drop EOL 5.6/7.0/7.1/7.2). graze/php-alpine ships -test tags for all of these. Verified end-to-end: `make test` (default 7.4) and `make PHP_VER=8.5 test` both pass — 131 tests / 696 assertions, OK. Co-Authored-By: Claude Opus 4.7 (1M context) --- Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index accc86f..cc158cf 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ SHELL = /bin/sh DOCKER = $(shell which docker) -PHP_VER := 7.2 +PHP_VER := 7.4 IMAGE := graze/php-alpine:${PHP_VER}-test VOLUME := /srv DOCKER_RUN_BASE := ${DOCKER} run --rm -t -v $$(pwd):${VOLUME} -w ${VOLUME} @@ -41,10 +41,10 @@ test: ## Run the unit and integration testsuites. test: lint test-unit lint: ## Run phpcs against the code. - ${DOCKER_RUN} vendor/bin/phpcs -p --warning-severity=0 src/ tests/ + ${DOCKER_RUN} vendor/bin/phpcs --standard=./phpcs.xml.dist -p --warning-severity=0 src/ tests/ lint-fix: ## Run phpcsf and fix possible lint errors. - ${DOCKER_RUN} vendor/bin/phpcbf -p src/ tests/ + ${DOCKER_RUN} vendor/bin/phpcbf --standard=./phpcs.xml.dist -p src/ tests/ test-unit: ## Run the unit testsuite. ${DOCKER_RUN} vendor/bin/phpunit --testsuite unit @@ -58,10 +58,13 @@ test-matrix-lowest: ## Test all version, with the lowest version ${MAKE} build-update test-matrix: ## Run the unit tests against multiple targets. - ${MAKE} PHP_VER="5.6" build-update test - ${MAKE} PHP_VER="7.0" build-update test - ${MAKE} PHP_VER="7.1" build-update test - ${MAKE} PHP_VER="7.2" build-update test + ${MAKE} PHP_VER="7.4" build-update test + ${MAKE} PHP_VER="8.0" build-update test + ${MAKE} PHP_VER="8.1" build-update test + ${MAKE} PHP_VER="8.2" build-update test + ${MAKE} PHP_VER="8.3" build-update test + ${MAKE} PHP_VER="8.4" build-update test + ${MAKE} PHP_VER="8.5" build-update test test-coverage: ## Run all tests and output coverage to the console. ${DOCKER_RUN} phpdbg7 -qrr vendor/bin/phpunit --coverage-text