From f50656402d02eb10b5cc1e00fa166947ecc2b740 Mon Sep 17 00:00:00 2001 From: "K. Adam White" Date: Thu, 28 May 2026 13:23:58 -0400 Subject: [PATCH 1/2] Relax WPCS version constraint to ^3, remove explicit PHPCS dependency PHPCS will be pulled in as a transient dependency of both WPCS and VIPCS, so keeping it in our own composer.json does nothing but increase our maintenance burden. The progressive point updates to WPCS in 3.1, 3.2 and 3.3 have improvements which would benefit HM projects and which make the coding standards more intuitively support modern versions of WordPress. --- composer.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 434f045b..c3bbadb8 100644 --- a/composer.json +++ b/composer.json @@ -5,11 +5,10 @@ "license": "GPL-2.0-or-later", "require": { "php": ">=8.2", - "wp-coding-standards/wpcs": "~3.0.0", - "automattic/vipwpcs": "~3.0.0", + "wp-coding-standards/wpcs": "^3.0.0", + "automattic/vipwpcs": "^3.0.0", "fig-r/psr2r-sniffer": "^0.5.0", "phpcompatibility/phpcompatibility-wp": "^2.0.0", - "squizlabs/php_codesniffer": "~3.5", "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0" }, "require-dev": { From e89183a918ca8c44448616fb99bd9bb224d7441e Mon Sep 17 00:00:00 2001 From: "K. Adam White" Date: Thu, 28 May 2026 15:34:45 -0400 Subject: [PATCH 2/2] Reintroduce PHPCS constraint to anchor our adjustments to PHPCS' API v3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Our sniffs use standard stable PHPCS API (File, Sniff, Tokens, Config, AbstractSniffUnitTest, Ruleset, etc.) — available since PHPCS 3.0 - Binding floor from our direct deps: WPCS 3.3.0 requires ^3.13.4 - PHPCS 4.x: neither WPCS (^3.13.4) nor VIPCS (^3.9.2) support it, so we can't support it either - Installed: PHPCS 3.13.5 --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index c3bbadb8..4c5e4fa6 100644 --- a/composer.json +++ b/composer.json @@ -5,6 +5,7 @@ "license": "GPL-2.0-or-later", "require": { "php": ">=8.2", + "squizlabs/php_codesniffer": "^3.13.4", "wp-coding-standards/wpcs": "^3.0.0", "automattic/vipwpcs": "^3.0.0", "fig-r/psr2r-sniffer": "^0.5.0",