From 821818791f6dcc1982ab6e00891c81f398b30ad1 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 4 Jun 2026 15:13:34 +0300 Subject: [PATCH 1/8] Align Redis adapter with current queue core --- Makefile | 20 ++++++++--------- src/Adapter.php | 10 ++++----- src/Message/Message.php | 12 ++++++++++ tests/Integration/QueueTest.php | 14 +++++------- tests/Support/IntegrationTestCase.php | 32 ++++++++++++++++++--------- 5 files changed, 55 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index 14f4578..02dc7df 100644 --- a/Makefile +++ b/Makefile @@ -1,30 +1,30 @@ build: ## Build an image from a docker-compose file. - docker-compose -f tests/docker-compose.yml up -d --build + docker compose -f tests/docker-compose.yml up -d --build composer: - docker-compose -f tests/docker-compose.yml run php-cli composer install + docker compose -f tests/docker-compose.yml run php-cli composer install down : ## Stop and remove containers, networks, images, and volumes. - docker-compose -f tests/docker-compose.yml down + docker compose -f tests/docker-compose.yml down coverage: ## Run code coverage. - docker-compose -f tests/docker-compose.yml run php-cli vendor/bin/phpunit --coverage-clover /app/tests/runtime/coverage.xml + docker compose -f tests/docker-compose.yml run php-cli vendor/bin/phpunit --coverage-clover /app/tests/runtime/coverage.xml test: ## Run tests. make down make build - docker-compose -f tests/docker-compose.yml run php-cli vendor/bin/phpunit + docker compose -f tests/docker-compose.yml run php-cli vendor/bin/phpunit test-unit: ## Run unit tests. make down make build - docker-compose -f tests/docker-compose.yml run php-cli vendor/bin/phpunit --testsuite Unit + docker compose -f tests/docker-compose.yml run php-cli vendor/bin/phpunit --testsuite Unit test-integration: ## Run integration tests. make down make build - docker-compose -f tests/docker-compose.yml run php-cli vendor/bin/phpunit --testsuite Integration + docker compose -f tests/docker-compose.yml run php-cli vendor/bin/phpunit --testsuite Integration static-analyze: ## Run code static analyze. make build - docker-compose -f tests/docker-compose.yml run php-cli vendor/bin/psalm --config=psalm.xml --shepherd --stats --php-version=8.1 + docker compose -f tests/docker-compose.yml run php-cli vendor/bin/psalm --config=psalm.xml --shepherd --stats --php-version=8.1 rector: ## Run rector. make build - docker-compose -f tests/docker-compose.yml run php-cli vendor/bin/rector process --config=rector.php --dry-run + docker compose -f tests/docker-compose.yml run php-cli vendor/bin/rector process --config=rector.php --dry-run mutation: ## Run mutation tests. make down make build - docker-compose -f tests/docker-compose.yml run php-cli ./vendor/bin/roave-infection-static-analysis-plugin + docker compose -f tests/docker-compose.yml run php-cli ./vendor/bin/roave-infection-static-analysis-plugin diff --git a/src/Adapter.php b/src/Adapter.php index 3fe1959..8dbc3c3 100644 --- a/src/Adapter.php +++ b/src/Adapter.php @@ -7,10 +7,10 @@ use BackedEnum; use Yiisoft\Queue\Adapter\AdapterInterface; use Yiisoft\Queue\Cli\LoopInterface; -use Yiisoft\Queue\JobStatus; use Yiisoft\Queue\Message\IdEnvelope; use Yiisoft\Queue\Message\MessageInterface; use Yiisoft\Queue\Message\MessageSerializerInterface; +use Yiisoft\Queue\MessageStatus; final class Adapter implements AdapterInterface { @@ -38,7 +38,7 @@ public function runExisting(callable $handlerCallback): void } } - public function status(int|string $id): JobStatus + public function status(int|string $id): MessageStatus { $id = (int) $id; if ($id <= 0) { @@ -46,14 +46,14 @@ public function status(int|string $id): JobStatus } if ($this->provider->existInReserved($id)) { - return JobStatus::RESERVED; + return MessageStatus::RESERVED; } if ($this->provider->existInWaiting($id)) { - return JobStatus::WAITING; + return MessageStatus::WAITING; } - return JobStatus::DONE; + return MessageStatus::DONE; } public function push(MessageInterface $message): MessageInterface diff --git a/src/Message/Message.php b/src/Message/Message.php index 8a90a6e..39fe033 100644 --- a/src/Message/Message.php +++ b/src/Message/Message.php @@ -31,6 +31,11 @@ public function getHandlerName(): string return $this->handlerName; } + public function getType(): string + { + return $this->handlerName; + } + public function getData(): mixed { return $this->data; @@ -41,6 +46,13 @@ public function getMetadata(): array return $this->metadata; } + public function withMetadata(array $metadata): static + { + $message = clone $this; + $message->metadata = $metadata; + return $message; + } + public static function fromData(string $handlerName, mixed $data, array $metadata = []): self { return new self($handlerName, $data, $metadata); diff --git a/tests/Integration/QueueTest.php b/tests/Integration/QueueTest.php index 196a1b3..96abacc 100644 --- a/tests/Integration/QueueTest.php +++ b/tests/Integration/QueueTest.php @@ -6,11 +6,11 @@ use Yiisoft\Queue\Adapter\AdapterInterface; use Yiisoft\Queue\Cli\LoopInterface; -use Yiisoft\Queue\JobStatus; use Yiisoft\Queue\Message\JsonMessageSerializer; -use Yiisoft\Queue\Message\Message; +use Yiisoft\Queue\Message\GenericMessage as Message; use Yiisoft\Queue\Message\MessageInterface; use Yiisoft\Queue\Message\MessageSerializerInterface; +use Yiisoft\Queue\MessageStatus; use Yiisoft\Queue\Queue; use Yiisoft\Queue\Redis\Adapter; use Yiisoft\Queue\Redis\QueueProvider; @@ -53,12 +53,12 @@ public function testStatus(): void ); $status = $adapter->status($message->getId()); - $this->assertEquals(JobStatus::WAITING, $status); + $this->assertEquals(MessageStatus::WAITING, $status); $queue->run(); $status = $adapter->status($message->getId()); - $this->assertEquals(JobStatus::DONE, $status); + $this->assertEquals(MessageStatus::DONE, $status); $mockReserved = $this->createMock(QueueProviderInterface::class); $mockReserved->method('existInReserved')->willReturn(true); @@ -66,7 +66,7 @@ public function testStatus(): void $queue = $this->getDefaultQueue($adapter); $status = $adapter->status('1'); - $this->assertEquals(JobStatus::RESERVED, $status); + $this->assertEquals(MessageStatus::RESERVED, $status); } public function testListen(): void @@ -109,9 +109,7 @@ public function testImmutable(): void private function getDefaultQueue(AdapterInterface $adapter): Queue { - return $this - ->getQueue() - ->withAdapter($adapter); + return $this->getQueueWithAdapter($adapter); } public function testAdapterStatusException() diff --git a/tests/Support/IntegrationTestCase.php b/tests/Support/IntegrationTestCase.php index af6cb70..7eb8b4f 100644 --- a/tests/Support/IntegrationTestCase.php +++ b/tests/Support/IntegrationTestCase.php @@ -15,11 +15,11 @@ use Yiisoft\Queue\Message\MessageInterface; use Yiisoft\Queue\Middleware\CallableFactory; use Yiisoft\Queue\Middleware\Consume\ConsumeMiddlewareDispatcher; -use Yiisoft\Queue\Middleware\Consume\MiddlewareFactoryConsume; +use Yiisoft\Queue\Middleware\Consume\ConsumeMiddlewareFactory; use Yiisoft\Queue\Middleware\FailureHandling\FailureMiddlewareDispatcher; -use Yiisoft\Queue\Middleware\FailureHandling\MiddlewareFactoryFailure; -use Yiisoft\Queue\Middleware\Push\MiddlewareFactoryPush; -use Yiisoft\Queue\Middleware\Push\PushMiddlewareDispatcher; +use Yiisoft\Queue\Middleware\FailureHandling\FailureMiddlewareFactory; +use Yiisoft\Queue\Middleware\Push\PushMiddlewareConfig; +use Yiisoft\Queue\Middleware\Push\PushMiddlewareFactory; use Yiisoft\Queue\Queue; use Yiisoft\Queue\Redis\Adapter; use Yiisoft\Queue\Redis\QueueProvider; @@ -58,7 +58,18 @@ protected function getQueue(): Queue $this->getWorker(), $this->getLoop(), new NullLogger(), - $this->getPushMiddlewareDispatcher() + $this->getPushMiddlewareConfig(), + ); + } + + protected function getQueueWithAdapter(AdapterInterface $adapter): Queue + { + return new Queue( + $this->getWorker(), + $this->getLoop(), + new NullLogger(), + $this->getPushMiddlewareConfig(), + $adapter, ); } @@ -71,6 +82,7 @@ protected function getWorker(): WorkerInterface $this->getContainer(), $this->getConsumeMiddlewareDispatcher(), $this->getFailureMiddlewareDispatcher(), + new CallableFactory($this->getContainer()), ); } @@ -100,7 +112,7 @@ protected function getContainerDefinitions(): array protected function getConsumeMiddlewareDispatcher(): ConsumeMiddlewareDispatcher { return new ConsumeMiddlewareDispatcher( - new MiddlewareFactoryConsume( + new ConsumeMiddlewareFactory( $this->getContainer(), new CallableFactory($this->getContainer()), ), @@ -110,7 +122,7 @@ protected function getConsumeMiddlewareDispatcher(): ConsumeMiddlewareDispatcher protected function getFailureMiddlewareDispatcher(): FailureMiddlewareDispatcher { return new FailureMiddlewareDispatcher( - new MiddlewareFactoryFailure( + new FailureMiddlewareFactory( $this->getContainer(), new CallableFactory($this->getContainer()), ), @@ -132,10 +144,10 @@ protected function getLoop(): LoopInterface return $this->loop ??= new SignalLoop(); } - protected function getPushMiddlewareDispatcher(): PushMiddlewareDispatcher + protected function getPushMiddlewareConfig(): PushMiddlewareConfig { - return new PushMiddlewareDispatcher( - new MiddlewareFactoryPush( + return new PushMiddlewareConfig( + new PushMiddlewareFactory( $this->getContainer(), new CallableFactory($this->getContainer()), ), From 954f917a871b3658c5d815adb4a9334d76c6616c Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 4 Jun 2026 17:20:05 +0300 Subject: [PATCH 2/8] Fix Redis message metadata types --- src/Message/Message.php | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/Message/Message.php b/src/Message/Message.php index 39fe033..b6a1638 100644 --- a/src/Message/Message.php +++ b/src/Message/Message.php @@ -8,12 +8,22 @@ final class Message implements MessageInterface { + /** + * @var array + */ + private array $metadata; + + /** + * @param array $metadata + */ public function __construct( private string $handlerName, private mixed $data, - private array $metadata, + array $metadata, private int $delay = 0 //delay in seconds ) { + $this->metadata = $metadata; + if ($this->delay > 0) { $this->metadata['delay'] = $delay; } @@ -41,11 +51,17 @@ public function getData(): mixed return $this->data; } + /** + * @return array + */ public function getMetadata(): array { return $this->metadata; } + /** + * @param array $metadata + */ public function withMetadata(array $metadata): static { $message = clone $this; @@ -53,8 +69,11 @@ public function withMetadata(array $metadata): static return $message; } - public static function fromData(string $handlerName, mixed $data, array $metadata = []): self + /** + * @param array $metadata + */ + public static function fromData(string $type, mixed $data, array $metadata = []): self { - return new self($handlerName, $data, $metadata); + return new self($type, $data, $metadata); } } From 7b8f94777cc924c318fdb3fd7606e7d6b8c51830 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 4 Jun 2026 17:26:13 +0300 Subject: [PATCH 3/8] Type Redis default channel constant --- src/QueueProvider.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/QueueProvider.php b/src/QueueProvider.php index a5d6c9b..08beb76 100644 --- a/src/QueueProvider.php +++ b/src/QueueProvider.php @@ -9,6 +9,9 @@ class QueueProvider implements QueueProviderInterface { + /** + * @var string + */ private const DEFAULT_CHANNEL_NAME = 'yii-queue'; /** From 0b7acff3d1b5ae6dc7d4c04cdbca7f9a0d352d74 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 4 Jun 2026 17:39:40 +0300 Subject: [PATCH 4/8] Run Redis CI checks through package make targets --- .github/workflows/mutation.yml | 14 ++++++-------- .github/workflows/rector.yml | 14 ++++++-------- src/Message/Message.php | 9 +-------- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 8150499..d9d7275 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -22,11 +22,9 @@ name: mutation test jobs: mutation: - uses: yiisoft/actions/.github/workflows/roave-infection.yml@master - with: - os: >- - ['ubuntu-latest'] - php: >- - ['8.2'] - secrets: - STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Mutation tests + run: make mutation diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 35411d0..19cf681 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -13,11 +13,9 @@ name: rector jobs: rector: - uses: yiisoft/actions/.github/workflows/rector.yml@master - secrets: - token: ${{ secrets.YIISOFT_GITHUB_TOKEN }} - with: - os: >- - ['ubuntu-latest'] - php: >- - ['8.3'] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Rector + run: make rector diff --git a/src/Message/Message.php b/src/Message/Message.php index b6a1638..e6cc89c 100644 --- a/src/Message/Message.php +++ b/src/Message/Message.php @@ -8,22 +8,15 @@ final class Message implements MessageInterface { - /** - * @var array - */ - private array $metadata; - /** * @param array $metadata */ public function __construct( private string $handlerName, private mixed $data, - array $metadata, + private array $metadata, private int $delay = 0 //delay in seconds ) { - $this->metadata = $metadata; - if ($this->delay > 0) { $this->metadata['delay'] = $delay; } From 111568b268e816965be7d4b745cd4f323a946691 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 4 Jun 2026 17:44:02 +0300 Subject: [PATCH 5/8] Suppress Redis constant type warning for PHP 8.1 --- src/QueueProvider.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/QueueProvider.php b/src/QueueProvider.php index 08beb76..f0feaed 100644 --- a/src/QueueProvider.php +++ b/src/QueueProvider.php @@ -11,6 +11,8 @@ class QueueProvider implements QueueProviderInterface { /** * @var string + * + * @psalm-suppress MissingClassConstType PHP 8.1 support prevents native typed class constants. */ private const DEFAULT_CHANNEL_NAME = 'yii-queue'; From 7bfa2c632fc2e6380bb539e9f62a2f8581a5d937 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 4 Jun 2026 23:37:18 +0300 Subject: [PATCH 6/8] Address Redis queue PR review comments --- .github/workflows/mutation.yml | 3 +++ .github/workflows/rector.yml | 3 +++ src/Adapter.php | 6 +++++- src/Message/Message.php | 7 ++----- src/QueueProvider.php | 11 +++++++++++ src/QueueProviderInterface.php | 2 ++ tests/Integration/QueueTest.php | 10 ++++++---- tests/Unit/Message/MessageTest.php | 16 +++++++++++++--- 8 files changed, 45 insertions(+), 13 deletions(-) diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index d9d7275..4c64b99 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -20,6 +20,9 @@ on: name: mutation test +permissions: + contents: read + jobs: mutation: runs-on: ubuntu-latest diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 19cf681..7bb92d8 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -11,6 +11,9 @@ on: name: rector +permissions: + contents: read + jobs: rector: runs-on: ubuntu-latest diff --git a/src/Adapter.php b/src/Adapter.php index 8dbc3c3..0ce544c 100644 --- a/src/Adapter.php +++ b/src/Adapter.php @@ -42,7 +42,7 @@ public function status(int|string $id): MessageStatus { $id = (int) $id; if ($id <= 0) { - throw new \InvalidArgumentException('This adapter IDs start with 1.'); + return MessageStatus::NOT_FOUND; } if ($this->provider->existInReserved($id)) { @@ -53,6 +53,10 @@ public function status(int|string $id): MessageStatus return MessageStatus::WAITING; } + if ($id > $this->provider->getLastId()) { + return MessageStatus::NOT_FOUND; + } + return MessageStatus::DONE; } diff --git a/src/Message/Message.php b/src/Message/Message.php index e6cc89c..93c9491 100644 --- a/src/Message/Message.php +++ b/src/Message/Message.php @@ -62,11 +62,8 @@ public function withMetadata(array $metadata): static return $message; } - /** - * @param array $metadata - */ - public static function fromData(string $type, mixed $data, array $metadata = []): self + public static function fromData(string $type, mixed $data): self { - return new self($type, $data, $metadata); + return new self($type, $data, []); } } diff --git a/src/QueueProvider.php b/src/QueueProvider.php index f0feaed..da397a8 100644 --- a/src/QueueProvider.php +++ b/src/QueueProvider.php @@ -139,6 +139,17 @@ public function getId(): int throw new \RuntimeException('Unable to get message id.'); } + /** + * @throws RedisException + */ + public function getLastId(): int + { + $this->checkConnection(); + $id = $this->redis->get("$this->channelName.message_id"); + + return is_string($id) ? (int) $id : 0; + } + public function withChannelName(string $channelName): QueueProviderInterface { if ($this->channelName === $channelName) { diff --git a/src/QueueProviderInterface.php b/src/QueueProviderInterface.php index f59b523..4efefd9 100644 --- a/src/QueueProviderInterface.php +++ b/src/QueueProviderInterface.php @@ -19,6 +19,8 @@ public function existInWaiting(int $id): bool; public function existInReserved(int $id): bool; + public function getLastId(): int; + public function withChannelName(string $channelName): self; public function getChannelName(): string; diff --git a/tests/Integration/QueueTest.php b/tests/Integration/QueueTest.php index 96abacc..5683720 100644 --- a/tests/Integration/QueueTest.php +++ b/tests/Integration/QueueTest.php @@ -60,10 +60,12 @@ public function testStatus(): void $status = $adapter->status($message->getId()); $this->assertEquals(MessageStatus::DONE, $status); + $status = $adapter->status(PHP_INT_MAX); + $this->assertEquals(MessageStatus::NOT_FOUND, $status); + $mockReserved = $this->createMock(QueueProviderInterface::class); $mockReserved->method('existInReserved')->willReturn(true); $adapter = new Adapter($mockReserved, new JsonMessageSerializer(), $this->getLoop()); - $queue = $this->getDefaultQueue($adapter); $status = $adapter->status('1'); $this->assertEquals(MessageStatus::RESERVED, $status); @@ -112,11 +114,11 @@ private function getDefaultQueue(AdapterInterface $adapter): Queue return $this->getQueueWithAdapter($adapter); } - public function testAdapterStatusException() + public function testAdapterStatusNotFound(): void { $adapter = $this->getAdapter(); - $this->expectException(\InvalidArgumentException::class); - $adapter->status(-1); + $this->assertSame(MessageStatus::NOT_FOUND, $adapter->status(-1)); + $this->assertSame(MessageStatus::NOT_FOUND, $adapter->status('invalid')); } public function testAdapterNullMessage() diff --git a/tests/Unit/Message/MessageTest.php b/tests/Unit/Message/MessageTest.php index e42e0ff..c1c3681 100644 --- a/tests/Unit/Message/MessageTest.php +++ b/tests/Unit/Message/MessageTest.php @@ -13,6 +13,7 @@ public function testGetHandlerName(): void { $message = new Message('handler', 'data', []); $this->assertEquals('handler', $message->getHandlerName()); + $this->assertEquals('handler', $message->getType()); } public function testGetData(): void @@ -32,6 +33,16 @@ public function testGetMetadata(): void $this->assertEquals($metadata, $message->getMetadata()); } + public function testWithMetadata(): void + { + $message = new Message('handler', 'data', []); + $messageWithMetadata = $message->withMetadata(['key' => 'value']); + + $this->assertNotSame($message, $messageWithMetadata); + $this->assertSame([], $message->getMetadata()); + $this->assertSame(['key' => 'value'], $messageWithMetadata->getMetadata()); + } + public function testWithDelay(): void { $message = new Message('handler', 'data', []); @@ -45,13 +56,12 @@ public function testFromData(): void { $handlerName = 'test-handler'; $data = ['key' => 'value']; - $metadata = ['custom' => 'metadata']; - $message = Message::fromData($handlerName, $data, $metadata); + $message = Message::fromData($handlerName, $data); $this->assertInstanceOf(Message::class, $message); $this->assertEquals($handlerName, $message->getHandlerName()); $this->assertEquals($data, $message->getData()); - $this->assertEquals($metadata, $message->getMetadata()); + $this->assertEquals([], $message->getMetadata()); } } From 58a9463c496d29577f23a4d6302862590236d5fd Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 4 Jun 2026 23:48:24 +0300 Subject: [PATCH 7/8] Restore reusable Redis queue workflows --- .github/workflows/mutation.yml | 14 ++++++++------ .github/workflows/rector.yml | 16 +++++++++------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 4c64b99..1f7ad3d 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -25,9 +25,11 @@ permissions: jobs: mutation: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - - name: Mutation tests - run: make mutation + uses: yiisoft/actions/.github/workflows/roave-infection.yml@master + with: + os: >- + ['ubuntu-latest'] + php: >- + ['8.2'] + secrets: + STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 7bb92d8..f21fb53 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -12,13 +12,15 @@ on: name: rector permissions: - contents: read + contents: write jobs: rector: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - - name: Rector - run: make rector + uses: yiisoft/actions/.github/workflows/rector.yml@master + secrets: + token: ${{ secrets.YIISOFT_GITHUB_TOKEN }} + with: + os: >- + ['ubuntu-latest'] + php: >- + ['8.3'] From 314ef24def847cb1c514a7e94b30fd29f4b0faa5 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 4 Jun 2026 23:50:38 +0300 Subject: [PATCH 8/8] Use Docker-backed Redis queue workflows --- .github/workflows/mutation.yml | 14 ++++++-------- .github/workflows/rector.yml | 16 +++++++--------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 1f7ad3d..4c64b99 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -25,11 +25,9 @@ permissions: jobs: mutation: - uses: yiisoft/actions/.github/workflows/roave-infection.yml@master - with: - os: >- - ['ubuntu-latest'] - php: >- - ['8.2'] - secrets: - STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Mutation tests + run: make mutation diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index f21fb53..7bb92d8 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -12,15 +12,13 @@ on: name: rector permissions: - contents: write + contents: read jobs: rector: - uses: yiisoft/actions/.github/workflows/rector.yml@master - secrets: - token: ${{ secrets.YIISOFT_GITHUB_TOKEN }} - with: - os: >- - ['ubuntu-latest'] - php: >- - ['8.3'] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Rector + run: make rector