diff --git a/composer.json b/composer.json index bebb1f55752b..5632a8e1273c 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "phpunit/phpcov": "^9.0.2 || ^10.0", "phpunit/phpunit": "^10.5.16 || ^11.2", "predis/predis": "^3.0", - "rector/rector": "2.1.4", + "rector/rector": "2.1.5", "shipmonk/phpstan-baseline-per-identifier": "^2.0" }, "replace": { diff --git a/rector.php b/rector.php index c814a7402c4d..7e83d20c3dd2 100644 --- a/rector.php +++ b/rector.php @@ -35,6 +35,7 @@ use Rector\Php70\Rector\FuncCall\RandomFunctionRector; use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector; use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; +use Rector\PHPUnit\CodeQuality\Rector\Class_\AddParamTypeFromDependsRector; use Rector\PHPUnit\CodeQuality\Rector\Class_\RemoveDataProviderParamKeysRector; use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector; use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; @@ -169,6 +170,9 @@ CompactToVariablesRector::class, RemoveDataProviderParamKeysRector::class, + + // buggy on no depends, @see https://github.com/rectorphp/rector-phpunit/pull/537 + AddParamTypeFromDependsRector::class, ]) // auto import fully qualified class names ->withImportNames(removeUnusedImports: true) diff --git a/tests/system/Config/FactoriesTest.php b/tests/system/Config/FactoriesTest.php index 06013e49ca31..a3a4303dd3a0 100644 --- a/tests/system/Config/FactoriesTest.php +++ b/tests/system/Config/FactoriesTest.php @@ -460,7 +460,7 @@ public function testGetComponentInstances(): array * } */ #[Depends('testGetComponentInstances')] - public function testSetComponentInstances(array $data) + public function testSetComponentInstances(array $data): array { $before = Factories::getComponentInstances('config'); $this->assertSame(['options' => [], 'aliases' => [], 'instances' => []], $before);