diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 6a2162d..f5da663 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -1,5 +1,5 @@ on: - pull_request: + pull_request_target: paths-ignore: - 'docs/**' - 'README.md' @@ -14,7 +14,10 @@ name: rector jobs: rector: uses: yiisoft/actions/.github/workflows/rector.yml@master + secrets: + token: ${{ secrets.YIISOFT_GITHUB_TOKEN }} with: + repository: ${{ github.event.pull_request.head.repo.full_name }} os: >- ['ubuntu-latest'] php: >- diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d22a40..98f307a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## 2.0.1 under development -- no changes in this release. +- Enh #110: Bump `yiisoft/rbac` version to `^2.1` (@vjik) ## 2.0.0 March 07, 2024 diff --git a/composer.json b/composer.json index 0102906..b9d77ea 100644 --- a/composer.json +++ b/composer.json @@ -29,16 +29,16 @@ ], "require": { "php": "^8.1", - "yiisoft/rbac": "^2.0", + "yiisoft/rbac": "^2.1", "yiisoft/var-dumper": "^1.7" }, "require-dev": { "ext-uopz": "*", "maglnet/composer-require-checker": "^4.3", "phpunit/phpunit": "^10.5.2", - "rector/rector": "^2.0.2", + "psr/clock": "^1.0", + "rector/rector": "^2.0.11", "roave/infection-static-analysis-plugin": "^1.18", - "slope-it/clock-mock": "0.5.0", "spatie/phpunit-watcher": "^1.23", "vimeo/psalm": "^4.30|^5.17", "yiisoft/files": "^1.0" diff --git a/rector.php b/rector.php index f55daae..c5adbf1 100644 --- a/rector.php +++ b/rector.php @@ -5,23 +5,18 @@ use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\Config\RectorConfig; use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; -use Rector\Set\ValueObject\LevelSetList; +use Rector\Php80\Rector\ClassMethod\AddParamBasedOnParentClassMethodRector; -return static function (RectorConfig $rectorConfig): void { - $rectorConfig->paths([ +return RectorConfig::configure() + ->withPaths([ __DIR__ . '/src', __DIR__ . '/tests', - ]); - - // register a single rule - $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); - - // define sets of rules - $rectorConfig->sets([ - LevelSetList::UP_TO_PHP_80, - ]); - - $rectorConfig->skip([ + ]) + ->withPhpSets(php80: true) + ->withRules([ + InlineConstructorDefaultToPropertyRector::class, + ]) + ->withSkip([ ClosureToArrowFunctionRector::class, + AddParamBasedOnParentClassMethodRector::class, ]); -};