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/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" 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; }