diff --git a/config/set/php84.php b/config/set/php84.php index 582a9ec5780..2fb2433c360 100644 --- a/config/set/php84.php +++ b/config/set/php84.php @@ -3,7 +3,6 @@ declare(strict_types=1); use Rector\Config\RectorConfig; -use Rector\Php84\Rector\Class_\DeprecatedAnnotationToDeprecatedAttributeRector; use Rector\Php84\Rector\Foreach_\ForeachToArrayAllRector; use Rector\Php84\Rector\Foreach_\ForeachToArrayAnyRector; use Rector\Php84\Rector\Foreach_\ForeachToArrayFindKeyRector; @@ -19,7 +18,6 @@ RoundingModeEnumRector::class, AddEscapeArgumentRector::class, NewMethodCallWithoutParenthesesRector::class, - DeprecatedAnnotationToDeprecatedAttributeRector::class, ForeachToArrayFindRector::class, ForeachToArrayFindKeyRector::class, ForeachToArrayAllRector::class, diff --git a/phpstan.neon b/phpstan.neon index aa10f8f83ad..182522df8d4 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -123,6 +123,12 @@ parameters: identifier: rector.upgradeDowngradeRegisteredInSet path: rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php + # deliberately kept out of the php84 set, as it turns a doc annotation into a runtime deprecation; + # it stays available to register directly with withRules() + - + identifier: rector.upgradeDowngradeRegisteredInSet + path: rules/Php84/Rector/Class_/DeprecatedAnnotationToDeprecatedAttributeRector.php + # is nested expr - message: '#Access to an undefined property PhpParser\\Node\\Expr\:\:\$expr#'