From aff731213aa26924984bb8c0d3be1bca4af4c1b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 22:32:44 +0000 Subject: [PATCH 1/2] Update rector/rector requirement from ^1.0.3 to ^2.0.3 Updates the requirements on [rector/rector](https://github.com/rectorphp/rector) to permit the latest version. - [Release notes](https://github.com/rectorphp/rector/releases) - [Commits](https://github.com/rectorphp/rector/compare/1.0.3...2.0.3) --- updated-dependencies: - dependency-name: rector/rector dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4dce900..d5ad2ef 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "require-dev": { "maglnet/composer-require-checker": "^4.7", "phpunit/phpunit": "^10.5", - "rector/rector": "^1.0.3", + "rector/rector": "^2.0.3", "roave/infection-static-analysis-plugin": "^1.34", "spatie/phpunit-watcher": "^1.23", "vimeo/psalm": "^5.20" From 6cc03f3cc5aff3defafef4d7de5611d472d308ea Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Fri, 13 Dec 2024 15:39:20 +0300 Subject: [PATCH 2/2] improve --- .github/workflows/rector.yml | 3 ++- rector.php | 2 -- src/Adapter.php | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 35411d0..457772a 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' @@ -17,6 +17,7 @@ jobs: secrets: token: ${{ secrets.YIISOFT_GITHUB_TOKEN }} with: + repository: ${{ github.event.pull_request.head.repo.full_name }} os: >- ['ubuntu-latest'] php: >- diff --git a/rector.php b/rector.php index 51c3a65..137e59d 100644 --- a/rector.php +++ b/rector.php @@ -4,7 +4,6 @@ use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\Config\RectorConfig; -use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector; use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; @@ -26,7 +25,6 @@ $rectorConfig->skip([ ClosureToArrowFunctionRector::class, - JsonThrowOnErrorRector::class, ReadOnlyPropertyRector::class, NullToStrictStringFuncCallArgRector::class, ]); diff --git a/src/Adapter.php b/src/Adapter.php index 19f1aa0..6189ce5 100644 --- a/src/Adapter.php +++ b/src/Adapter.php @@ -43,7 +43,7 @@ public function __construct( private MutexFactoryInterface $mutexFactory, private string $channel = QueueFactory::DEFAULT_CHANNEL_NAME, ) { - $this->mutex = $this->mutexFactory->create(__CLASS__ . $this->channel); + $this->mutex = $this->mutexFactory->create(self::class . $this->channel); } public function runExisting(callable $handlerCallback): void @@ -109,7 +109,7 @@ public function withChannel(string $channel): self $new = clone $this; $new->channel = $channel; - $new->mutex = $this->mutexFactory->create(__CLASS__ . $this->channel); + $new->mutex = $this->mutexFactory->create(self::class . $this->channel); return $new; }