From fa606d2b0c433814731d51d24fbd5101eac04b8b Mon Sep 17 00:00:00 2001 From: Hug0-Drelon Date: Fri, 16 Oct 2026 17:09:32 +0200 Subject: [PATCH 1/3] chore(deps): pin PHPStan to ~2.2 Temporarily constrain PHPStan to 2.2.x while PHPStan 2.3 breaks the test suite. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4ab4794..fa237c2 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "type": "library", "require": { "php": "^8.0", - "phpstan/phpstan": "^2.0", + "phpstan/phpstan": "~2.2", "szepeviktor/phpstan-wordpress": "^2.0" }, "require-dev": { From 42825da461e800c77294923a8b0804c9a054051a Mon Sep 17 00:00:00 2001 From: Hug0-Drelon Date: Fri, 16 Oct 2026 17:15:34 +0200 Subject: [PATCH 2/3] fix(deps): use ~2.2.0 to actually cap PHPStan below 2.3 Composer treats ~2.2 as >=2.2.0 <3.0.0, which still allows 2.3.x. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fa237c2..03a9cc7 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "type": "library", "require": { "php": "^8.0", - "phpstan/phpstan": "~2.2", + "phpstan/phpstan": "~2.2.0", "szepeviktor/phpstan-wordpress": "^2.0" }, "require-dev": { From e2f0c8d6f1e7622260905e3b96f25de5e7515069 Mon Sep 17 00:00:00 2001 From: Hug0-Drelon Date: Fri, 16 Oct 2026 17:43:50 +0200 Subject: [PATCH 3/3] chore(deps): pin PHPStan to 2.2.x in require-dev only Keep the public require constraint at ^2.0 so consumers can use PHPStan 2.3.x. Pin PHPStan and strict-rules in require-dev to stabilize the PHPUnit test suite until #28 is addressed. --- composer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 03a9cc7..00f9318 100644 --- a/composer.json +++ b/composer.json @@ -6,11 +6,12 @@ "type": "library", "require": { "php": "^8.0", - "phpstan/phpstan": "~2.2.0", + "phpstan/phpstan": "^2.0", "szepeviktor/phpstan-wordpress": "^2.0" }, "require-dev": { - "phpstan/phpstan-strict-rules": "^2.0", + "phpstan/phpstan": "~2.2.0", + "phpstan/phpstan-strict-rules": "~2.0.0", "phpunit/phpunit": "^9", "wpsyntex/polylang-stubs": "dev-master" },