Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6263e48

Browse files
committed
[Messenger] rename auto-setup amqp option into auto_setup
1 parent 0034a0f commit 6263e48

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/Symfony/Component/Messenger/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ CHANGELOG
4949
both no longer have `$isDebug` arguments.
5050
* [BC BREAK] The Amqp Transport now automatically sets up the exchanges
5151
and queues by default. Previously, this was done when in "debug" mode
52-
only. Pass the `auto-setup` connection option to control this.
52+
only. Pass the `auto_setup` connection option to control this.
5353

5454
4.2.0
5555
-----

src/Symfony/Component/Messenger/Tests/Transport/AmqpExt/ConnectionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,13 @@ public function testItCanDisableTheSetup()
228228
$amqpQueue->expects($this->never())->method('declareQueue');
229229
$amqpQueue->expects($this->never())->method('bind');
230230

231-
$connection = Connection::fromDsn('amqp://localhost/%2f/messages?queue[routing_key]=my_key', ['auto-setup' => 'false'], $factory);
231+
$connection = Connection::fromDsn('amqp://localhost/%2f/messages?queue[routing_key]=my_key', ['auto_setup' => 'false'], $factory);
232232
$connection->publish('body');
233233

234-
$connection = Connection::fromDsn('amqp://localhost/%2f/messages?queue[routing_key]=my_key', ['auto-setup' => false], $factory);
234+
$connection = Connection::fromDsn('amqp://localhost/%2f/messages?queue[routing_key]=my_key', ['auto_setup' => false], $factory);
235235
$connection->publish('body');
236236

237-
$connection = Connection::fromDsn('amqp://localhost/%2f/messages?queue[routing_key]=my_key&auto-setup=false', [], $factory);
237+
$connection = Connection::fromDsn('amqp://localhost/%2f/messages?queue[routing_key]=my_key&auto_setup=false', [], $factory);
238238
$connection->publish('body');
239239
}
240240

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class Connection
8282
* * routing_key_pattern: The pattern of the routing key (Default: "delay_%delay%")
8383
* * queue_name_pattern: Pattern to use to create the queues (Default: "delay_queue_%delay%")
8484
* * exchange_name: Name of the exchange to be used for the retried messages (Default: "retry")
85-
* * auto-setup: Enable or not the auto-setup of queues and exchanges (Default: true)
85+
* * auto_setup: Enable or not the auto-setup of queues and exchanges (Default: true)
8686
* * loop_sleep: Amount of micro-seconds to wait if no message are available (Default: 200000)
8787
*/
8888
public function __construct(array $connectionConfiguration, array $exchangeConfiguration, array $queueConfiguration, AmqpFactory $amqpFactory = null)
@@ -373,11 +373,11 @@ private function clear(): void
373373

374374
private function shouldSetup(): bool
375375
{
376-
if (!\array_key_exists('auto-setup', $this->connectionConfiguration)) {
376+
if (!\array_key_exists('auto_setup', $this->connectionConfiguration)) {
377377
return true;
378378
}
379379

380-
if (\in_array($this->connectionConfiguration['auto-setup'], [false, 'false'], true)) {
380+
if (\in_array($this->connectionConfiguration['auto_setup'], [false, 'false'], true)) {
381381
return false;
382382
}
383383

0 commit comments

Comments
 (0)