Skip to content

Commit 54d3512

Browse files
Fix #464: Delete property maxPriority
1 parent cd7c266 commit 54d3512

File tree

5 files changed

+10
-30
lines changed

5 files changed

+10
-30
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
Yii2 Queue Extension Change Log
22
===============================
33

4-
2.3.6 under development
4+
3.0.0 under development
55
-----------------------
66

77
- Enh #372: Add ability to configure keepalive and heartbeat for AMQP and AMQP interop (vyachin)
8+
- Enh #464: Delete property `maxPriority` (skolkin-worker)
89

910

1011
2.3.5 November 18, 2022

UPGRADE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Upgrading Instructions
44
This file contains the upgrade notes. These notes highlight changes that could break your
55
application when you upgrade the package from one version to another.
66

7+
Upgrade to 3.0.0
8+
----------------
9+
10+
* The `maxPriority` property was removed from [amqp_interop](docs/guide/driver-amqp-interop.md).
11+
Use property `queueOptionalArguments` argument `x-max-priority`.
12+
713
Upgrade to 2.1.1
814
----------------
915

src/ErrorEvent.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/drivers/amqp_interop/Queue.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,6 @@ class Queue extends CliQueue
227227
* @var string
228228
*/
229229
public $driver = self::ENQUEUE_AMQP_LIB;
230-
/**
231-
* This property should be an integer indicating the maximum priority the queue should support. Default is 10.
232-
*
233-
* @var int
234-
*/
235-
public $maxPriority = 10;
236230
/**
237231
* The property contains a command class which used in cli.
238232
*
@@ -458,10 +452,7 @@ protected function setupBroker()
458452

459453
$queue = $this->context->createQueue($this->queueName);
460454
$queue->setFlags($this->queueFlags);
461-
$queue->setArguments(array_merge(
462-
['x-max-priority' => $this->maxPriority],
463-
$this->queueOptionalArguments
464-
));
455+
$queue->setArguments($this->queueOptionalArguments);
465456
$this->context->declareQueue($queue);
466457

467458
$topic = $this->context->createTopic($this->exchangeName);

tests/app/config/main.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
'host' => getenv('RABBITMQ_HOST') ?: 'localhost',
9595
'user' => getenv('RABBITMQ_USER') ?: 'guest',
9696
'password' => getenv('RABBITMQ_PASSWORD') ?: 'guest',
97+
'queueOptionalArguments' => ['x-max-priority' => 10],
9798
'queueName' => 'queue-interop',
9899
'exchangeName' => 'exchange-interop',
99100
],

0 commit comments

Comments
 (0)