Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions config/set/php85.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use Rector\Php85\Rector\Class_\SleepToSerializeRector;
use Rector\Php85\Rector\Class_\WakeupToUnserializeRector;
use Rector\Php85\Rector\ClassMethod\NullDebugInfoReturnRector;
use Rector\Php85\Rector\Const_\ConstAndTraitDeprecatedAttributeRector;
use Rector\Php85\Rector\FuncCall\ArrayKeyExistsNullToEmptyStringRector;
use Rector\Php85\Rector\FuncCall\ChrArgModuloRector;
use Rector\Php85\Rector\FuncCall\OrdSingleByteRector;
Expand All @@ -36,7 +35,6 @@
ArrayFirstLastRector::class,
RemoveFinfoBufferContextArgRector::class,
NullDebugInfoReturnRector::class,
ConstAndTraitDeprecatedAttributeRector::class,
ColonAfterSwitchCaseRector::class,
ArrayKeyExistsNullToEmptyStringRector::class,
ChrArgModuloRector::class,
Expand Down
9 changes: 7 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,15 @@ 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()
# deprecated rules, kept out of the php sets, as they turn a doc annotation into a runtime deprecation
-
identifier: rector.upgradeDowngradeRegisteredInSet
path: rules/Php84/Rector/Class_/DeprecatedAnnotationToDeprecatedAttributeRector.php

-
identifier: rector.upgradeDowngradeRegisteredInSet
path: rules/Php85/Rector/Const_/ConstAndTraitDeprecatedAttributeRector.php

# is nested expr
-
message: '#Access to an undefined property PhpParser\\Node\\Expr\:\:\$expr#'
Expand Down Expand Up @@ -472,6 +475,8 @@ parameters:
- '#Class "Rector\\Transform\\Rector\\Scalar\\ScalarValueToConstFetchRector" is missing @see annotation with test case class reference#'
- '#Class "Rector\\DeadCode\\Rector\\ClassLike\\RemoveAnnotationRector" is missing @see annotation with test case class reference#'
- '#Class "Rector\\Transform\\Rector\\Class_\\AddInterfaceByTraitRector" is missing @see annotation with test case class reference#'
- '#Class "Rector\\Php84\\Rector\\Class_\\DeprecatedAnnotationToDeprecatedAttributeRector" is missing @see annotation with test case class reference#'
- '#Class "Rector\\Php85\\Rector\\Const_\\ConstAndTraitDeprecatedAttributeRector" is missing @see annotation with test case class reference#'

# @todo fix in phpstan-rules
-
Expand Down
4 changes: 0 additions & 4 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPublicMethodParameterRector;
use Rector\DeadCode\Rector\ConstFetch\RemovePhpVersionIdCheckRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php84\Rector\Class_\DeprecatedAnnotationToDeprecatedAttributeRector;
use Rector\Symfony\Symfony61\Rector\Class_\CommandConfigureToAttributeRector;

return RectorConfig::configure()
Expand Down Expand Up @@ -64,7 +63,4 @@
__DIR__ . '/src/Configuration/RectorConfigBuilder.php',
__DIR__ . '/src/Console/Notifier.php',
],

// keep @deprecated annotation, as readable in IDE and tooling
DeprecatedAnnotationToDeprecatedAttributeRector::class => [__DIR__ . '/src/Set/ValueObject/SetList.php'],
]);

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

use Rector\Config\RectorConfig;
use Rector\Php84\Rector\Foreach_\ForeachToArrayAllRector;
use Rector\ValueObject\PhpVersion;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rule(ForeachToArrayAllRector::class);

$rectorConfig->phpVersion(PhpVersion::PHP_84);
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

use Rector\Config\RectorConfig;
use Rector\Php84\Rector\Foreach_\ForeachToArrayAnyRector;
use Rector\ValueObject\PhpVersion;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->rule(ForeachToArrayAnyRector::class);

$rectorConfig->phpVersion(PhpVersion::PHP_84);
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Rector\Config\RectorConfig;
use Rector\Php84\Rector\Foreach_\ForeachToArrayFindKeyRector;
use Rector\ValueObject\PhpVersion;

return RectorConfig::configure()
->withRules([ForeachToArrayFindKeyRector::class]);
->withRules([ForeachToArrayFindKeyRector::class])
->withPhpVersion(PhpVersion::PHP_84);
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use Rector\Config\RectorConfig;
use Rector\Php84\Rector\Foreach_\ForeachToArrayFindRector;
use Rector\ValueObject\PhpVersion;

return RectorConfig::configure()
->withRules([ForeachToArrayFindRector::class]);
->withRules([ForeachToArrayFindRector::class])
->withPhpVersion(PhpVersion::PHP_84);

This file was deleted.

This file was deleted.

Loading
Loading