From 6142a9c1567b2f35d31aae3792bb1c56db89bb69 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Fri, 10 May 2024 18:27:54 +0200 Subject: [PATCH 1/3] Prepare Sulu 2.6 ruleset --- README.md | 2 +- config/sets/sulu/level/up-to-sulu-26.php | 11 ++++++++ config/sets/sulu/sulu-26.php | 20 +++++++++++++++ src/Set/SuluLevelSetList.php | 5 ++++ src/Set/SuluSetList.php | 5 ++++ tests/Set/Sulu25/Sulu25Test.php | 2 +- tests/Set/Sulu26/Sulu26Test.php | 32 ++++++++++++++++++++++++ tests/Set/Sulu26/config/sulu-26.php | 11 ++++++++ 8 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 config/sets/sulu/level/up-to-sulu-26.php create mode 100644 config/sets/sulu/sulu-26.php create mode 100644 tests/Set/Sulu26/Sulu26Test.php create mode 100644 tests/Set/Sulu26/config/sulu-26.php diff --git a/README.md b/README.md index 1c44bd2..5408b1b 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ use Rector\Config\RectorConfig; return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([ - SuluLevelSetList::UP_TO_SULU_25, + SuluLevelSetList::UP_TO_SULU_26, ]); }; ``` diff --git a/config/sets/sulu/level/up-to-sulu-26.php b/config/sets/sulu/level/up-to-sulu-26.php new file mode 100644 index 0000000..6a417f9 --- /dev/null +++ b/config/sets/sulu/level/up-to-sulu-26.php @@ -0,0 +1,11 @@ +sets([SuluSetList::SULU_26, SuluLevelSetList::UP_TO_SULU_25]); +}; diff --git a/config/sets/sulu/sulu-26.php b/config/sets/sulu/sulu-26.php new file mode 100644 index 0000000..419f0bc --- /dev/null +++ b/config/sets/sulu/sulu-26.php @@ -0,0 +1,20 @@ +doTestFile($fileInfo); + } + + /** + * @return \Iterator + */ + public function provideData(): \Iterator + { + return $this->yieldFilesFromDirectory(__DIR__ . '/Fixture'); + } + + public function provideConfigFilePath(): string + { + return __DIR__ . '/config/sulu-26.php'; + } +} diff --git a/tests/Set/Sulu26/config/sulu-26.php b/tests/Set/Sulu26/config/sulu-26.php new file mode 100644 index 0000000..df9c03f --- /dev/null +++ b/tests/Set/Sulu26/config/sulu-26.php @@ -0,0 +1,11 @@ +import(__DIR__ . '/../../../../config/config.php'); + $rectorConfig->sets([SuluSetList::SULU_26]); +}; From 3093b5fe281c3bd2615263920a2ecab9377c6c0b Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Fri, 10 May 2024 18:31:27 +0200 Subject: [PATCH 2/3] Add currently an empty dirrectory --- tests/Set/Sulu26/Fixture/.gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/Set/Sulu26/Fixture/.gitignore diff --git a/tests/Set/Sulu26/Fixture/.gitignore b/tests/Set/Sulu26/Fixture/.gitignore new file mode 100644 index 0000000..e69de29 From 50b14bc6fda467e1815f6a7dcc19833a7214741c Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Fri, 10 May 2024 18:31:58 +0200 Subject: [PATCH 3/3] Update code style --- config/sets/sulu/sulu-26.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/config/sets/sulu/sulu-26.php b/config/sets/sulu/sulu-26.php index 419f0bc..74a42ef 100644 --- a/config/sets/sulu/sulu-26.php +++ b/config/sets/sulu/sulu-26.php @@ -2,19 +2,7 @@ declare(strict_types=1); -use PHPStan\Type\ArrayType; -use PHPStan\Type\BooleanType; -use PHPStan\Type\FloatType; -use PHPStan\Type\IntegerType; -use PHPStan\Type\IterableType; -use PHPStan\Type\MixedType; -use PHPStan\Type\ObjectType; -use PHPStan\Type\StringType; use Rector\Config\RectorConfig; -use Rector\Renaming\Rector\MethodCall\RenameMethodRector; -use Rector\Renaming\ValueObject\MethodCallRename; -use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector; -use Rector\TypeDeclaration\ValueObject\AddReturnTypeDeclaration; return static function (RectorConfig $rectorConfig): void { };