diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 11677a6..3aef723 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -62,5 +62,5 @@ jobs: - name: Analyze for refactoring run: | - composer global require --dev rector/rector:^0.13.8 + composer global require --dev rector/rector:^0.15.0 rector process --dry-run --no-progress-bar diff --git a/composer.json b/composer.json index eba5669..e7c4e8c 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "require-dev": { "codeigniter4/framework": "^4.1", "icanhazstring/composer-unused": "^0.8.2", - "rector/rector": "0.14.8" + "rector/rector": "0.15.0" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/rector.php b/rector.php index 448606c..19e4b3a 100644 --- a/rector.php +++ b/rector.php @@ -1,6 +1,5 @@ sets([SetList::DEAD_CODE, LevelSetList::UP_TO_PHP_74, PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD, PHPUnitSetList::PHPUNIT_80]); @@ -112,8 +112,8 @@ $rectorConfig->rule(SimplifyEmptyArrayCheckRector::class); $rectorConfig->rule(NormalizeNamespaceByPSR4ComposerAutoloadRector::class); $rectorConfig - ->ruleWithConfiguration(TypedPropertyRector::class, [ + ->ruleWithConfiguration(TypedPropertyFromAssignsRector::class, [ // Set to false if you use in libraries, or it does create breaking changes. - TypedPropertyRector::INLINE_PUBLIC => true, + TypedPropertyFromAssignsRector::INLINE_PUBLIC => true, ]); }; diff --git a/src/Template/rector.php b/src/Template/rector.php index f6c6018..e11a68b 100644 --- a/src/Template/rector.php +++ b/src/Template/rector.php @@ -29,12 +29,12 @@ use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector; use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector; -use Rector\Php74\Rector\Property\TypedPropertyRector; use Rector\PHPUnit\Set\PHPUnitLevelSetList; use Rector\PHPUnit\Set\PHPUnitSetList; use Rector\PSR4\Rector\FileWithoutNamespace\NormalizeNamespaceByPSR4ComposerAutoloadRector; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; +use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([SetList::DEAD_CODE, LevelSetList::UP_TO_PHP_74, PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD, PHPUnitLevelSetList::UP_TO_PHPUNIT_100]); @@ -114,8 +114,8 @@ $rectorConfig->rule(SimplifyEmptyArrayCheckRector::class); $rectorConfig->rule(NormalizeNamespaceByPSR4ComposerAutoloadRector::class); $rectorConfig - ->ruleWithConfiguration(TypedPropertyRector::class, [ + ->ruleWithConfiguration(TypedPropertyFromAssignsRector::class, [ // Set to false if you use in libraries, or it does create breaking changes. - TypedPropertyRector::INLINE_PUBLIC => true, + TypedPropertyFromAssignsRector::INLINE_PUBLIC => true, ]); };