From f9758d61cac076a9c906ccf8f325261d1465fca2 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Dadashi Date: Fri, 19 Jan 2024 07:16:50 +0330 Subject: [PATCH 1/5] chore(deps-dev): update rector/rector requirement from 0.18.13 to 0.19.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5c89f271f..4aa330cef 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "mockery/mockery": "^1.0", "phpstan/extension-installer": "^1.3", "phpstan/phpstan-strict-rules": "^1.5", - "rector/rector": "0.18.13" + "rector/rector": "0.19.0" }, "provide": { "codeigniter4/authentication-implementation": "1.0" From ad0940668dcddc9d169bf91134cbe67ff6ddcd58 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Dadashi Date: Fri, 19 Jan 2024 07:17:55 +0330 Subject: [PATCH 2/5] fix rector error in 0.19.0 --- rector.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/rector.php b/rector.php index 04b2685d8..166e1f512 100644 --- a/rector.php +++ b/rector.php @@ -33,7 +33,6 @@ use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector; use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector; use Rector\DeadCode\Rector\Property\RemoveUnusedPrivatePropertyRector; -use Rector\DeadCode\Rector\StmtsAwareInterface\RemoveJustPropertyFetchForAssignRector; use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; @@ -99,11 +98,6 @@ // May load view files directly when detecting classes StringClassNameToClassConstantRector::class, - // See https://github.com/codeigniter4/shield/issues/228 - RemoveJustPropertyFetchForAssignRector::class => [ - __DIR__ . '/src/Models/UserModel.php', - ], - // Ignore tests that use CodeIgniter::CI_VERSION UnwrapFutureCompatibleIfPhpVersionRector::class => [ __DIR__ . '/src/Test/MockInputOutput.php', From d25319fa5a5efbdd29a3a1cdae9837daaaaa6f3a Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Sat, 20 Jan 2024 06:50:46 +0330 Subject: [PATCH 3/5] chore: use rector v0.19.2 Co-authored-by: Abdul Malik Ikhsan --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4aa330cef..64c42306d 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "mockery/mockery": "^1.0", "phpstan/extension-installer": "^1.3", "phpstan/phpstan-strict-rules": "^1.5", - "rector/rector": "0.19.0" + "rector/rector": "0.19.2" }, "provide": { "codeigniter4/authentication-implementation": "1.0" From 9f7b7234d13345227119e992cdd7029d746c742e Mon Sep 17 00:00:00 2001 From: Pooya Parsa Dadashi Date: Sat, 20 Jan 2024 06:59:58 +0330 Subject: [PATCH 4/5] fix: use new namespace for rector --- rector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rector.php b/rector.php index 166e1f512..e9ea63d55 100644 --- a/rector.php +++ b/rector.php @@ -28,7 +28,7 @@ use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector; use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector; use Rector\Config\RectorConfig; -use Rector\Core\ValueObject\PhpVersion; +use Rector\ValueObject\PhpVersion; use Rector\DeadCode\Rector\Cast\RecastingRemovalRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector; use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector; From 1814804fb00f10fede96c2bd0b277f7e2e070284 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Dadashi Date: Sat, 20 Jan 2024 07:02:46 +0330 Subject: [PATCH 5/5] style: fix code style error --- rector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rector.php b/rector.php index e9ea63d55..634665e51 100644 --- a/rector.php +++ b/rector.php @@ -28,7 +28,6 @@ use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector; use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector; use Rector\Config\RectorConfig; -use Rector\ValueObject\PhpVersion; use Rector\DeadCode\Rector\Cast\RecastingRemovalRector; use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector; use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector; @@ -45,6 +44,7 @@ use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; +use Rector\ValueObject\PhpVersion; return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([