From d582f9daceb85be134512758d8de4d0c3518373c Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 30 Jul 2026 23:24:15 +0200 Subject: [PATCH 1/2] Remove NullToStrictStringFuncCallArgRector from the PHP 8.1 set The rule fires on a lot of call sites and is commonly skipped, so it costs more in withSkip() noise than it pays back when applied automatically. The rule itself and its 39 fixtures stay, so anyone who wants it can register it directly with withRules(). --- config/set/php81.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/set/php81.php b/config/set/php81.php index 5a08ab3fdfd..2f83cb1f147 100644 --- a/config/set/php81.php +++ b/config/set/php81.php @@ -11,7 +11,6 @@ use Rector\Php81\Rector\Class_\MyCLabsClassToEnumRector; use Rector\Php81\Rector\Class_\SpatieEnumClassToEnumRector; use Rector\Php81\Rector\FuncCall\NullToStrictIntPregSlitFuncCallLimitArgRector; -use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; use Rector\Php81\Rector\MethodCall\MyCLabsMethodCallToEnumConstRector; use Rector\Php81\Rector\MethodCall\RemoveReflectionSetAccessibleCallsRector; use Rector\Php81\Rector\MethodCall\SpatieEnumMethodCallToEnumConstRector; @@ -28,7 +27,6 @@ ReadOnlyPropertyRector::class, SpatieEnumClassToEnumRector::class, SpatieEnumMethodCallToEnumConstRector::class, - NullToStrictStringFuncCallArgRector::class, NullToStrictIntPregSlitFuncCallLimitArgRector::class, ArrayToFirstClassCallableRector::class, From af903f28ed45d9976aa5b24d2b4174dedf5a0937 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 30 Jul 2026 23:29:37 +0200 Subject: [PATCH 2/2] Ignore set-registration rule for NullToStrictStringFuncCallArgRector rector.upgradeDowngradeRegisteredInSet requires every Php8x rule to be listed in its matching config set. Keeping this rule out of php81.php is deliberate, so scope the ignore to that one file rather than relaxing the rule. --- phpstan.neon | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpstan.neon b/phpstan.neon index 0539471c0aa..24654e6061d 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -117,6 +117,12 @@ parameters: - src/Console/Notifier.php - src/Util/FileHasher.php + # deliberately kept out of the php81 set, as it fires too often to be applied by default; + # it stays available to register directly with withRules() + - + identifier: rector.upgradeDowngradeRegisteredInSet + path: rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php + # is nested expr - message: '#Access to an undefined property PhpParser\\Node\\Expr\:\:\$expr#'