From 73d25af660d9f7319ea2c40d92acc79559ad9c78 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Wed, 18 Oct 2023 17:56:34 +0300 Subject: [PATCH] improve --- .github/workflows/rector.yml | 4 +++- composer.json | 2 +- rector.php | 9 ++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index adacd73..bd79331 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -14,8 +14,10 @@ name: rector jobs: rector: uses: yiisoft/actions/.github/workflows/rector.yml@master + secrets: + token: ${{ secrets.YIISOFT_GITHUB_TOKEN }} with: os: >- ['ubuntu-latest'] php: >- - ['8.0'] + ['8.2'] diff --git a/composer.json b/composer.json index 2ed58ed..1cef03d 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,7 @@ "require-dev": { "nyholm/psr7": "^1.3", "phpunit/phpunit": "^9.5", - "rector/rector": "^0.14.3", + "rector/rector": "^0.18.5", "roave/infection-static-analysis-plugin": "^1.16", "spatie/phpunit-watcher": "^1.23", "vimeo/psalm": "^4.30|^5.6", diff --git a/rector.php b/rector.php index 63713ce..95bde68 100644 --- a/rector.php +++ b/rector.php @@ -4,6 +4,8 @@ use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\Config\RectorConfig; +use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; +use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; use Rector\Set\ValueObject\LevelSetList; return static function (RectorConfig $rectorConfig): void { @@ -17,6 +19,11 @@ // define sets of rules $rectorConfig->sets([ - LevelSetList::UP_TO_PHP_80, + LevelSetList::UP_TO_PHP_74, + ]); + + $rectorConfig->skip([ + ClosureToArrowFunctionRector::class, + JsonThrowOnErrorRector::class, ]); };