Skip to content

Commit 4450b12

Browse files
committed
use full downgrade array spread on PHP 8.1 to avoid 2 rules doing almost the same job, ref rectorphp/rector#9448
1 parent 2c4aa18 commit 4450b12

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

config/set/downgrade-php74.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
DowngradeNullCoalescingOperatorRector::class,
3030
DowngradeNumericLiteralSeparatorRector::class,
3131
DowngradeStripTagsCallWithArrayRector::class,
32-
DowngradeArraySpreadRector::class,
32+
// DowngradeArraySpreadRector::class,
33+
// already handled in PHP 8.1 set
3334
DowngradeArrayMergeCallWithoutArgumentsRector::class,
3435
DowngradeFreadFwriteFalsyToNegationRector::class,
3536
DowngradePreviouslyImplementedInterfaceRector::class,

config/set/downgrade-php81.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
declare(strict_types=1);
44

5+
use Rector\DowngradePhp74\Rector\Array_\DowngradeArraySpreadRector;
56
use Rector\DowngradePhp81\Rector\FuncCall\DowngradeHashAlgorithmXxHashRector;
67
use Rector\DowngradePhp81\Rector\LNumber\DowngradeOctalNumberRector;
78
use Rector\DowngradePhp81\Rector\MethodCall\DowngradeIsEnumRector;
@@ -32,7 +33,8 @@
3233
DowngradeNewInInitializerRector::class,
3334
DowngradePhp81ResourceReturnToObjectRector::class,
3435
DowngradeReadonlyPropertyRector::class,
35-
DowngradeArraySpreadStringKeyRector::class,
36+
DowngradeArraySpreadRector::class,
37+
// DowngradeArraySpreadStringKeyRector::class,
3638
DowngradeArrayIsListRector::class,
3739
DowngradeSetAccessibleReflectionPropertyRector::class,
3840
DowngradeIsEnumRector::class,

0 commit comments

Comments
 (0)