Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 85528c7

Browse filesBrowse files
committed
review feedback
1 parent 69de65c commit 85528c7
Copy full SHA for 85528c7

File tree

3 files changed

+10
-6
lines changed
Filter options

3 files changed

+10
-6
lines changed

‎src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpReceiver.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Bridge/Amqp/Transport/AmqpReceiver.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* @author Samuel Roze <samuel.roze@gmail.com>
2828
*/
29-
class AmqpReceiver implements ReceiverInterface, QueueReceiverInterface, MessageCountAwareInterface
29+
class AmqpReceiver implements QueueReceiverInterface, MessageCountAwareInterface
3030
{
3131
private $serializer;
3232
private $connection;

‎src/Symfony/Component/Messenger/Tests/WorkerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Tests/WorkerTest.php
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ public function testWorkerWithMultipleReceivers()
249249

250250
public function testWorkerLimitQueues()
251251
{
252-
$receiver1 = $this->createMock(QueueReceiverInterface::class);
253-
$receiver1->expects($this->once())
252+
$receiver = $this->createMock(QueueReceiverInterface::class);
253+
$receiver->expects($this->once())
254254
->method('getFromQueues')
255255
->with(['foo'])
256256
->willReturn([new Envelope(new DummyMessage('message1'))])
@@ -261,8 +261,9 @@ public function testWorkerLimitQueues()
261261
$dispatcher = new EventDispatcher();
262262
$dispatcher->addSubscriber(new StopWorkerOnMessageLimitListener(1));
263263

264-
$worker = new Worker([$receiver1], $bus, $dispatcher);
264+
$worker = new Worker([$receiver], $bus, $dispatcher);
265265
$this->expectException(RuntimeException::class);
266+
$this->expectExceptionMessage();
266267
$worker->run(['queues' => ['foo']]);
267268
}
268269

@@ -273,8 +274,9 @@ public function testWorkerLimitQueuesUnsupported()
273274

274275
$bus = $this->getMockBuilder(MessageBusInterface::class)->getMock();
275276

276-
$worker = new Worker([$receiver1, $receiver2], $bus);
277+
$worker = new Worker(['transport1' => $receiver1, 'transport2' => $receiver2], $bus);
277278
$this->expectException(RuntimeException::class);
279+
$this->expectExceptionMessage('Receiver for transport2 does not implement '.QueueReceiverInterface::class);
278280
$worker->run(['queues' => ['foo']]);
279281
}
280282

‎src/Symfony/Component/Messenger/Transport/Receiver/QueueReceiverInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Transport/Receiver/QueueReceiverInterface.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
* Some transports may have multiple queues. This interface is used to read from only some queues.
1818
*
1919
* @author David Buchmann <mail@davidbu.ch>
20+
*
21+
* @experimental in 5.3
2022
*/
21-
interface QueueReceiverInterface
23+
interface QueueReceiverInterface extends ReceiverInterface
2224
{
2325
/**
2426
* Get messages from the specified queue names instead of consuming from all queues.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.