Skip to content

Commit 395169c

Browse files
committed
Fix tests for PHP 8.2
1 parent cba3241 commit 395169c

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060

6161
strategy:
6262
matrix:
63-
php: [ '8.2', '8.3', '8.4' ]
63+
php: [ '8.2', '8.3', '8.4', '8.5' ]
6464

6565
services:
6666
rabbitmq:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.4-cli
1+
FROM php:8.2-cli
22

33
LABEL org.opencontainers.image.authors="Vitalii Zhuk <v.zhuk@fivelab.org>"
44

tests/Functional/Adapter/LoopConsumerTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public function shouldSuccessProcessOnStopAfterNExecutes(): void
243243

244244
$consumer = new LoopConsumer($this->queueFactory, $this->messageHandler, new LoopConsumerConfiguration(1));
245245
$consumer->setEventDispatcher($eventDispatcher = new EventDispatcher());
246-
$eventDispatcher->addListener(ProcessedMessageEvent::class, new StopAfterNExecutesListener($eventDispatcher, 5)->onProcessedMessage(...));
246+
$eventDispatcher->addListener(ProcessedMessageEvent::class, (new StopAfterNExecutesListener($eventDispatcher, 5))->onProcessedMessage(...));
247247

248248
$this->runConsumer($consumer);
249249

tests/Functional/Adapter/SingleConsumerTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function shouldSuccessConsumeIfMessageHandlerNackWithRequeueMessage(): vo
117117

118118
$consumer = new SingleConsumer($this->queueFactory, $handler, new ConsumerConfiguration());
119119
$consumer->setEventDispatcher($eventDispatcher = new EventDispatcher());
120-
$eventDispatcher->addListener(ProcessedMessageEvent::class, new StopAfterNExecutesListener($eventDispatcher, 2)->onProcessedMessage(...));
120+
$eventDispatcher->addListener(ProcessedMessageEvent::class, (new StopAfterNExecutesListener($eventDispatcher, 2))->onProcessedMessage(...));
121121

122122
$this->runConsumer($consumer);
123123

tests/Functional/Adapter/SpoolConsumerTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public function shouldSuccessProcessOnStopAfterNExecutes(): void
358358

359359
$consumer = new SpoolConsumer($this->queueFactory, $this->messageHandler, new SpoolConsumerConfiguration(100, 1));
360360
$consumer->setEventDispatcher($eventDispatcher = new EventDispatcher());
361-
$eventDispatcher->addListener(ProcessedMessageEvent::class, new StopAfterNExecutesListener($eventDispatcher, 5)->onProcessedMessage(...));
361+
$eventDispatcher->addListener(ProcessedMessageEvent::class, (new StopAfterNExecutesListener($eventDispatcher, 5))->onProcessedMessage(...));
362362

363363
$this->runConsumer($consumer);
364364

0 commit comments

Comments
 (0)