Skip to content

Commit cd5b3b9

Browse files
Update rector/rector requirement from ^1.0.3 to ^2.0.3 (#21)
Co-authored-by: Sergei Predvoditelev <sergei@predvoditelev.ru>
1 parent 658680b commit cd5b3b9

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/rector.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
on:
2-
pull_request:
2+
pull_request_target:
33
paths-ignore:
44
- 'docs/**'
55
- 'README.md'
@@ -17,6 +17,7 @@ jobs:
1717
secrets:
1818
token: ${{ secrets.YIISOFT_GITHUB_TOKEN }}
1919
with:
20+
repository: ${{ github.event.pull_request.head.repo.full_name }}
2021
os: >-
2122
['ubuntu-latest']
2223
php: >-

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"require-dev": {
4141
"maglnet/composer-require-checker": "^4.7",
4242
"phpunit/phpunit": "^10.5",
43-
"rector/rector": "^1.0.3",
43+
"rector/rector": "^2.0.3",
4444
"roave/infection-static-analysis-plugin": "^1.34",
4545
"spatie/phpunit-watcher": "^1.23",
4646
"vimeo/psalm": "^5.20"

rector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
66
use Rector\Config\RectorConfig;
7-
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
87
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
98
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
109
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
@@ -26,7 +25,6 @@
2625

2726
$rectorConfig->skip([
2827
ClosureToArrowFunctionRector::class,
29-
JsonThrowOnErrorRector::class,
3028
ReadOnlyPropertyRector::class,
3129
NullToStrictStringFuncCallArgRector::class,
3230
]);

src/Adapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(
4343
private MutexFactoryInterface $mutexFactory,
4444
private string $channel = QueueFactory::DEFAULT_CHANNEL_NAME,
4545
) {
46-
$this->mutex = $this->mutexFactory->create(__CLASS__ . $this->channel);
46+
$this->mutex = $this->mutexFactory->create(self::class . $this->channel);
4747
}
4848

4949
public function runExisting(callable $handlerCallback): void
@@ -109,7 +109,7 @@ public function withChannel(string $channel): self
109109

110110
$new = clone $this;
111111
$new->channel = $channel;
112-
$new->mutex = $this->mutexFactory->create(__CLASS__ . $this->channel);
112+
$new->mutex = $this->mutexFactory->create(self::class . $this->channel);
113113

114114
return $new;
115115
}

0 commit comments

Comments
 (0)