From 2620f9afb49f95dbf202ee3e9d727caf19612882 Mon Sep 17 00:00:00 2001 From: Jason Chafin <1000543+Herm71@users.noreply.github.com> Date: Tue, 4 Aug 2026 16:31:06 -0700 Subject: [PATCH] fix(meta): correct the Requires PHP floor to 7.4 and enforce it with PHPCompatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit plugin.php declared `Requires PHP: 7.0`, but general.php declares `ucsccomms_enqueue_admin_styles(): void` — a return type added in 7.1. On 7.0 that is a parse error, so the plugin fatalled on activation on the very version it advertised. `: void` is the only above-7.0 construct in the codebase, making the true floor 7.1. Nothing enforced the claim: no `require` php constraint, no config.platform.php, and the PHPCompatibilityWP block in .phpcs.xml.dist has been commented out since the ruleset was written. Sets the header to 7.4, adds phpcompatibility/phpcompatibility-wp to require-dev, and switches on the ruleset block with testVersion 7.4-. 7.4 over 8.1 is the conservative choice: safely true of the current code, widest install compatibility. Both are past EOL as of August 2026, so neither is an endorsement — the header states where the plugin parses and runs, not what to host on. `composer run lint` still exits 0; the new standard produced zero findings. Mutation-checked that the sniff actually fires: at testVersion 7.0- it reports NewReturnTypeDeclarations.voidFound on general.php:25, exactly the described bug. The floor is a runtime constraint, independent of the test toolchain — PHPUnit ^12.5 needs 8.3+ and CI runs 8.3/8.4, but PHPCompatibility proves 7.4 statically with no 7.4 runtime involved. Closes #25 Co-Authored-By: Claude Opus 5 (1M context) --- .phpcs.xml.dist | 23 +++--- CLAUDE.md | 13 ++- ROADMAP.md | 38 +++++++++ composer.json | 1 + composer.lock | 215 +++++++++++++++++++++++++++++++++++++++++++++++- plugin.php | 2 +- 6 files changed, 277 insertions(+), 15 deletions(-) diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index 4f33569..7175f7e 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -61,19 +61,22 @@ - -