8000 Last changes to get this PR ready! · symfony/symfony@04298ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 04298ea

Browse files
committed
Last changes to get this PR ready!
1 parent 3151b54 commit 04298ea

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/Symfony/Component/Messenger/CHANGELOG.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ CHANGELOG
1919
* Added a new `SyncTransport` along with `ForceCallHandlersStamp` to
2020
explicitly handle messages synchronously.
2121
* Added `AmqpRoutingKeyStamp` allowing to provide a routing key on message publishing.
22-
* Removed publishing with a `routing_key` option from queue configuration, for
22+
* [BC BREAK] Removed publishing with a `routing_key` option from queue configuration, for
2323
AMQP. Use exchange `default_publish_routing_key` or `AmqpRoutingKeyStamp` instead.
24+
* [BC BREAK] Changed the `queue` option in the AMQP transport DSN to be `queues[name]`. You can
25+
therefore name the queue but also configure `binding_keys`, `flags` and `arguments`.
26+
* [BC BREAK] The methods `get`, `ack`, `nack` and `queue` of the AMQP `Connection`
27+
have a new argument: the queue name.
2428
* Added optional parameter `prefetch_count` in connection configuration,
2529
to setup channel prefetch count.
2630
* New classes: `RoutableMessageBus`, `AddBusNameStampMiddleware`
@@ -74,8 +78,6 @@ CHANGELOG
7478
only. Pass the `auto_setup` connection option to control this.
7579
* Added a `SetupTransportsCommand` command to setup the transports
7680
* Added a Doctrine transport. For example, use the `doctrine://default` DSN (this uses the `default` Doctrine entity manager)
77-
* Added `AmqpRoutingKeyStamp` allowing to provide a routing key on message publishing.
78-
* Deprecated publishing with a routing key from queue configuration, use exchange configuration instead.
7981

8082
4.2.0
8183
-----

src/Symfony/Component/Messenger/Transport/AmqpExt/Connection.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ public function publish(string $body, array $headers = [], int $delay = 0, strin
183183
$this->setup();
184184
}
185185

186-
// TODO - allow flag & attributes to be configured on the message
187-
188186
$this->exchange()->publish(
189187
$body,
190188
$routingKey ?? $this->getDefaultPublishRoutingKey(),
@@ -214,8 +212,6 @@ private function publishWithDelay(string $body, array $headers, int $delay, ?str
214212
$this->setupDelay($delay, $exchangeRoutingKey);
215213
}
216214

217-
// TODO - allow flag & attributes to be configured on the message
218-
219215
$this->getDelayExchange()->publish(
220216
$body,
221217
$this->getRoutingKeyForDelay($delay),
@@ -348,9 +344,6 @@ public function getQueueNames(): array
348344
return array_keys($this->queuesConfiguration);
349345
}
350346

351-
/**
352-
* @internal
353-
*/
354347
public function channel(): \AMQPChannel
355348
{
356349
if (null === $this->amqpChannel) {
@@ -375,7 +368,7 @@ public function channel(): \AMQPChannel
375368
return $this->amqpChannel;
376369
}
377370

378-
private function queue(string $queueName): \AMQPQueue
371+
public function queue(string $queueName): \AMQPQueue
379372
{
380373
if (!isset($this->amqpQueues[$queueName])) {
381374
$queueConfig = $this->queuesConfiguration[$queueName];
@@ -394,7 +387,7 @@ private function queue(string $queueName): \AMQPQueue
394387
return $this->amqpQueues[$queueName];
395388
}
396389

397-
private function exchange(): \AMQPExchange
390+
public function exchange(): \AMQPExchange
398391
{
399392
if (null === $this->amqpExchange) {
400393
$this->amqpExchange = $this->amqpFactory->createExchange($this->channel());

0 commit comments

Comments
 (0)
0