diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9b00e4c..003cd6d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,7 +30,7 @@ jobs: include: - php-version: '8.1' dependency-versions: 'lowest' - - php-version: '8.1' + - php-version: '8.2' dependency-versions: 'highest' steps: diff --git a/README.md b/README.md index e2b22f2..1c44bd2 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ To add a set to your config, use `Sulu\Rector\Set\SymfonySetList` and `Sulu\Rect class and pick one of constants: ```php -use Rector\Sulu\Set\SuluLevelSetList; +use Sulu\Rector\Set\SuluLevelSetList; use Rector\Config\RectorConfig; return static function (RectorConfig $rectorConfig): void { diff --git a/composer.json b/composer.json index f73cd62..cd2d000 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ ], "require": { "php": "^8.1", - "rector/rector": "^0.13.1 || ^0.14.0" + "rector/rector": "^0.14.1 || ^0.15" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.6", @@ -44,8 +44,8 @@ "@lint-rector" ], "fix": [ - "@php-cs-fix", - "@rector" + "@rector", + "@php-cs-fixer" ], "lint-rector": "@php vendor/bin/rector process --dry-run", "rector": "@php vendor/bin/rector process", diff --git a/rector.php b/rector.php index 39a7d1e..8605252 100644 --- a/rector.php +++ b/rector.php @@ -7,9 +7,11 @@ use Rector\Set\ValueObject\SetList; return static function (RectorConfig $rectorConfig): void { - $rectorConfig->importNames(); $rectorConfig->paths([__DIR__ . '/src', __DIR__ . '/tests']); + $rectorConfig->importNames(); + $rectorConfig->importShortClasses(false); + $rectorConfig->parallel(); // for testing diff --git a/tests/Set/Sulu24/Sulu24Test.php b/tests/Set/Sulu24/Sulu24Test.php index ad2362b..8e025dd 100644 --- a/tests/Set/Sulu24/Sulu24Test.php +++ b/tests/Set/Sulu24/Sulu24Test.php @@ -4,7 +4,6 @@ namespace Sulu\Rector\Tests\Set\Sulu24; -use Iterator; use Rector\Testing\PHPUnit\AbstractRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; @@ -13,15 +12,15 @@ final class Sulu24Test extends AbstractRectorTestCase /** * @dataProvider provideData() */ - public function test(SmartFileInfo $fileInfo): void + public function test(string $fileInfo): void { - $this->doTestFileInfo($fileInfo); + $this->doTestFile($fileInfo); } /** - * @return Iterator + * @return \Iterator */ - public function provideData(): Iterator + public function provideData(): \Iterator { return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); } diff --git a/tests/Set/Sulu25/Sulu25Test.php b/tests/Set/Sulu25/Sulu25Test.php index ad3b091..2d00d38 100644 --- a/tests/Set/Sulu25/Sulu25Test.php +++ b/tests/Set/Sulu25/Sulu25Test.php @@ -4,7 +4,6 @@ namespace Sulu\Rector\Tests\Set\Sulu24; -use Iterator; use Rector\Testing\PHPUnit\AbstractRectorTestCase; use Symplify\SmartFileSystem\SmartFileInfo; @@ -13,15 +12,15 @@ final class Sulu25Test extends AbstractRectorTestCase /** * @dataProvider provideData() */ - public function test(SmartFileInfo $fileInfo): void + public function test(string $fileInfo): void { - $this->doTestFileInfo($fileInfo); + $this->doTestFile($fileInfo); } /** - * @return Iterator + * @return \Iterator */ - public function provideData(): Iterator + public function provideData(): \Iterator { return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); }