diff --git a/composer.json b/composer.json index fa9eb0ee..fc59966c 100644 --- a/composer.json +++ b/composer.json @@ -8,13 +8,13 @@ }, "require-dev": { "phpstan/extension-installer": "^1.3", - "phpstan/phpstan": "^2.1.8", + "phpstan/phpstan": "^2.1.30", "phpstan/phpstan-webmozart-assert": "^2.0", - "phpunit/phpunit": "^11.4", + "phpunit/phpunit": "^11.5", "rector/rector-src": "dev-main", "symplify/easy-coding-standard": "^12.3", "symplify/rule-doc-generator": "^12.2", - "symplify/vendor-patches": "^11.3", + "symplify/vendor-patches": "^11.5", "tomasvotruba/class-leak": "^1.0", "tracy/tracy": "^2.10" }, diff --git a/config/set/downgrade-php74.php b/config/set/downgrade-php74.php index a1ade47e..23868307 100644 --- a/config/set/downgrade-php74.php +++ b/config/set/downgrade-php74.php @@ -4,7 +4,6 @@ use Rector\Config\RectorConfig; use Rector\ValueObject\PhpVersion; -use Rector\DowngradePhp74\Rector\Array_\DowngradeArraySpreadRector; use Rector\DowngradePhp74\Rector\ArrowFunction\ArrowFunctionToAnonymousFunctionRector; use Rector\DowngradePhp74\Rector\ClassMethod\DowngradeContravariantArgumentTypeRector; use Rector\DowngradePhp74\Rector\ClassMethod\DowngradeCovariantReturnTypeRector; @@ -29,7 +28,8 @@ DowngradeNullCoalescingOperatorRector::class, DowngradeNumericLiteralSeparatorRector::class, DowngradeStripTagsCallWithArrayRector::class, - DowngradeArraySpreadRector::class, + // DowngradeArraySpreadRector::class, + // already handled in PHP 8.1 set DowngradeArrayMergeCallWithoutArgumentsRector::class, DowngradeFreadFwriteFalsyToNegationRector::class, DowngradePreviouslyImplementedInterfaceRector::class, diff --git a/config/set/downgrade-php81.php b/config/set/downgrade-php81.php index e868660a..c045b53c 100644 --- a/config/set/downgrade-php81.php +++ b/config/set/downgrade-php81.php @@ -2,12 +2,12 @@ declare(strict_types=1); +use Rector\DowngradePhp74\Rector\Array_\DowngradeArraySpreadRector; use Rector\DowngradePhp81\Rector\FuncCall\DowngradeHashAlgorithmXxHashRector; use Rector\DowngradePhp81\Rector\LNumber\DowngradeOctalNumberRector; use Rector\DowngradePhp81\Rector\MethodCall\DowngradeIsEnumRector; use Rector\Config\RectorConfig; use Rector\ValueObject\PhpVersion; -use Rector\DowngradePhp81\Rector\Array_\DowngradeArraySpreadStringKeyRector; use Rector\DowngradePhp81\Rector\ClassConst\DowngradeFinalizePublicClassConstantRector; use Rector\DowngradePhp81\Rector\FuncCall\DowngradeArrayIsListRector; use Rector\DowngradePhp81\Rector\FuncCall\DowngradeFirstClassCallableSyntaxRector; @@ -32,7 +32,8 @@ DowngradeNewInInitializerRector::class, DowngradePhp81ResourceReturnToObjectRector::class, DowngradeReadonlyPropertyRector::class, - DowngradeArraySpreadStringKeyRector::class, + DowngradeArraySpreadRector::class, + // DowngradeArraySpreadStringKeyRector::class, DowngradeArrayIsListRector::class, DowngradeSetAccessibleReflectionPropertyRector::class, DowngradeIsEnumRector::class, diff --git a/rules/DowngradePhp81/Rector/Array_/DowngradeArraySpreadStringKeyRector.php b/rules/DowngradePhp81/Rector/Array_/DowngradeArraySpreadStringKeyRector.php index 1a42a3a8..e27d6e43 100644 --- a/rules/DowngradePhp81/Rector/Array_/DowngradeArraySpreadStringKeyRector.php +++ b/rules/DowngradePhp81/Rector/Array_/DowngradeArraySpreadStringKeyRector.php @@ -21,6 +21,8 @@ /** * @changelog https://wiki.php.net/rfc/array_unpacking_string_keys * + * @api testing if useful + * * @see \Rector\Tests\DowngradePhp81\Rector\Array_\DowngradeArraySpreadStringKeyRector\DowngradeArraySpreadStringKeyRectorTest */ final class DowngradeArraySpreadStringKeyRector extends AbstractRector