From a460c656c774bd51059b9c5d4b3cfe91db6220e5 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 31 Oct 2025 16:39:06 +0700 Subject: [PATCH 1/2] Bump Rector requirement to ^2.2.7 --- build/composer-php-74.json | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/composer-php-74.json b/build/composer-php-74.json index 40f5f17c6..0f02457d2 100644 --- a/build/composer-php-74.json +++ b/build/composer-php-74.json @@ -5,7 +5,7 @@ "description": "Rector upgrades rules for Laravel Framework", "require": { "php": "^7.4 || ^8.0", - "rector/rector": "^2.0" + "rector/rector": "^2.2.7" }, "autoload": { "psr-4": { diff --git a/composer.json b/composer.json index a2fdc609b..d24d79dad 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "description": "Rector upgrades rules for Laravel Framework", "require": { "php": ">=8.3", - "rector/rector": "^2.1.3", + "rector/rector": "^2.2.7", "webmozart/assert": "^1.11", "symplify/rule-doc-generator-contracts": "^11.2" }, From b9d8f96f3aa5585b96a347a06a22efd773b3f7f3 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 31 Oct 2025 16:43:15 +0700 Subject: [PATCH 2/2] rectify --- config/sets/laravel60.php | 2 +- config/sets/laravel70.php | 3 +-- .../PropertyFetch/ReplaceFakerInstanceWithHelperRector.php | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/config/sets/laravel60.php b/config/sets/laravel60.php index aa72db225..d5d6e1455 100644 --- a/config/sets/laravel60.php +++ b/config/sets/laravel60.php @@ -70,6 +70,6 @@ $rectorConfig ->ruleWithConfiguration(ArgumentAdderRector::class, [ // https://github.com/laravel/framework/commit/6c1e014943a508afb2c10869c3175f7783a004e1 - new ArgumentAdder('Illuminate\Database\Capsule\Manager', 'table', 1, 'as', null), + new ArgumentAdder('Illuminate\Database\Capsule\Manager', 'table', 1, 'as'), ]); }; diff --git a/config/sets/laravel70.php b/config/sets/laravel70.php index 7ef4624ae..0dae09cf2 100644 --- a/config/sets/laravel70.php +++ b/config/sets/laravel70.php @@ -51,8 +51,7 @@ 'Illuminate\Contracts\Routing\UrlRoutable', 'resolveRouteBinding', 1, - 'field', - null + 'field' ), ]); diff --git a/src/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector.php b/src/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector.php index dd09e0630..2f50fa060 100644 --- a/src/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector.php +++ b/src/Rector/PropertyFetch/ReplaceFakerInstanceWithHelperRector.php @@ -137,7 +137,6 @@ private function refactorInterpolatedString(InterpolatedString $interpolatedStri return array_reduce( $parts, fn (?Expr $carry, Expr $part) => $carry === null ? $part : new Concat($carry, $part), - null, ); }