Skip to content

Commit 637fd47

Browse files
authoredMar 20, 2025
[Php81] Unregister NewInInitializerRector from php81 config set as not safe (#6793)
* [Php81] Unregister NewInInitializerRector from php81 config set * fix phpstan
1 parent 3caf998 commit 637fd47

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎config/set/php81.php

-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
77
use Rector\Php81\Rector\Class_\MyCLabsClassToEnumRector;
88
use Rector\Php81\Rector\Class_\SpatieEnumClassToEnumRector;
9-
use Rector\Php81\Rector\ClassMethod\NewInInitializerRector;
109
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
1110
use Rector\Php81\Rector\MethodCall\MyCLabsMethodCallToEnumConstRector;
1211
use Rector\Php81\Rector\MethodCall\SpatieEnumMethodCallToEnumConstRector;
@@ -23,7 +22,6 @@
2322
ReadOnlyPropertyRector::class,
2423
SpatieEnumClassToEnumRector::class,
2524
SpatieEnumMethodCallToEnumConstRector::class,
26-
NewInInitializerRector::class,
2725
NullToStrictStringFuncCallArgRector::class,
2826
FirstClassCallableRector::class,
2927
]);

‎phpstan.neon

+2
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ parameters:
216216
# optional as changes behavior, should be used explicitly outside PHP upgrade
217217
- '#Register "Rector\\Php73\\Rector\\FuncCall\\JsonThrowOnErrorRector" service to "php73\.php" config set#'
218218

219+
- '#Register "Rector\\Php81\\Rector\\ClassMethod\\NewInInitializerRector" service to "php81\.php" config set#'
220+
219221
# closure detailed
220222
- '#Method Rector\\Config\\RectorConfig\:\:singleton\(\) has parameter \$concrete with no signature specified for Closure#'
221223

0 commit comments

Comments
 (0)