Skip to content

Commit f2be385

Browse files
[Php81] Deprecate NewInInitializerRector as depends on context (#7913)
* [Php81] Deprecate NewInInitializerRector as depends on context * [Php81] Deprecate NewInInitializerRector as depends on context * [ci-review] Rector Rectify * fix api * remove unused service * remove unused service * fix phpstan * fix phpstan * final touch: define @ api on method for consistency with other method * final touch: use @ api on class for global definition --------- Co-authored-by: GitHub Action <actions@github.com>
1 parent 3e751ec commit f2be385

33 files changed

+14
-860
lines changed

config/set/php81.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector;
1111
use Rector\Php81\Rector\Class_\MyCLabsClassToEnumRector;
1212
use Rector\Php81\Rector\Class_\SpatieEnumClassToEnumRector;
13-
use Rector\Php81\Rector\ClassMethod\NewInInitializerRector;
1413
use Rector\Php81\Rector\FuncCall\NullToStrictIntPregSlitFuncCallLimitArgRector;
1514
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
1615
use Rector\Php81\Rector\MethodCall\MyCLabsMethodCallToEnumConstRector;
@@ -41,7 +40,5 @@
4140
ClosureFromCallableToFirstClassCallableRector::class,
4241
FunctionFirstClassCallableRector::class,
4342
RemoveReflectionSetAccessibleCallsRector::class,
44-
45-
NewInInitializerRector::class,
4643
]);
4744
};

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,9 @@ parameters:
423423
# deprecated rule
424424
- '#Rule Rector\\Php81\\Rector\\Array_\\FirstClassCallableRector must implements Rector\\VersionBonding\\Contract\\MinPhpVersionInterface#'
425425
- '#Register "Rector\\Php81\\Rector\\Array_\\FirstClassCallableRector" service to "php81\.php" config set#'
426+
- '#Register "Rector\\Php81\\Rector\\ClassMethod\\NewInInitializerRector" service to "php81\.php" config set#'
426427
- '#Class "Rector\\CodingStyle\\Rector\\String_\\SymplifyQuoteEscapeRector" is missing @see annotation with test case class reference#'
428+
- '#Class "Rector\\Php81\\Rector\\ClassMethod\\NewInInitializerRector" is missing @see annotation with test case class reference#'
427429

428430
# BC layer for FileWithoutNamespace node
429431
-

rules-tests/Php81/Rector/ClassMethod/NewInInitializerRector/Fixture/pass_class_const_fetch_arg.php.inc

Lines changed: 0 additions & 35 deletions
This file was deleted.

rules-tests/Php81/Rector/ClassMethod/NewInInitializerRector/Fixture/pass_const_fetch_arg.php.inc

Lines changed: 0 additions & 37 deletions
This file was deleted.

rules-tests/Php81/Rector/ClassMethod/NewInInitializerRector/Fixture/pass_non_dynamic_arg.php.inc

Lines changed: 0 additions & 35 deletions
This file was deleted.

rules-tests/Php81/Rector/ClassMethod/NewInInitializerRector/Fixture/pass_non_dynamic_arg2.php.inc

Lines changed: 0 additions & 29 deletions
This file was deleted.

rules-tests/Php81/Rector/ClassMethod/NewInInitializerRector/Fixture/property_with_attributes.php.inc

Lines changed: 0 additions & 43 deletions
This file was deleted.

rules-tests/Php81/Rector/ClassMethod/NewInInitializerRector/Fixture/skip_abstract.php.inc

Lines changed: 0 additions & 14 deletions
This file was deleted.

rules-tests/Php81/Rector/ClassMethod/NewInInitializerRector/Fixture/skip_assign_coalesce_with_new_in_inner_class.php.inc

Lines changed: 0 additions & 23 deletions
This file was deleted.

rules-tests/Php81/Rector/ClassMethod/NewInInitializerRector/Fixture/skip_dynamic_new.php.inc

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)