Skip to content

Commit

Permalink
ARCH-414 Allow both binding types, restore the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Namaka committed Nov 15, 2024
1 parent cdbf805 commit abcaaa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,9 @@ public function testRetryAffectsOnlyOriginalQueue()
'default_publish_routing_key' => 'topic_routing_key',
],
'queues' => [
'A' => ['bindings' => [
"binding1" => ['key' => "name1", "arguments" => ['arg1' => 'val1', 'arg2' => 'val2']],
"binding2" => ['key' => "name2", "arguments" => ['arg3' => 'val3', 'arg4' => 'val4']]
]],

'B' => ['bindings' => [
"binding1" => ['key' => "name3", "arguments" => ['arg1' => 'val1', 'arg2' => 'val2']],
"binding2" => ['key' => "name4", "arguments" => ['arg3' => 'val3', 'arg4' => 'val4']]
]],
]
'A' => ['binding_keys' => ['topic_routing_key']],
'B' => ['binding_keys' => ['topic_routing_key']],
],
]);
$connection->setup();
$connection->purgeQueues();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,12 @@ private static function validateOptions(array $options): void
}

if (0 < \count($deprecatedQueueOptions = array_intersect(array_keys($queue), self::DEPRECATED_BINDING_KEYS))) {
trigger_deprecation('symfony/messenger', '5.10', 'Deprecated queue option(s) "%s" passed to the AMQP Messenger transport. The "%s" option(s) should be used rather than "%s".', implode('", "', $deprecatedQueueOptions), implode('", ', self::NEW_QUEUE_OPTIONS), implode('", ', self::DEPRECATED_BINDING_KEYS));
if (0 < \count($newQueueOptions = array_intersect(array_keys($queue), self::NEW_QUEUE_OPTIONS))) {
throw new LogicException(sprintf('New "%s" and deprecated "%s" option(s) passed to the AMQP Messenger transport', implode('", "', $newQueueOptions), implode('", "', $deprecatedQueueOptions)));
}
}

if (0 < \count($invalidQueueOptions = array_diff(array_keys($queue), array_merge(self::AVAILABLE_QUEUE_OPTIONS, self::NEW_QUEUE_OPTIONS)))) {
if (0 < \count($invalidQueueOptions = array_diff(array_keys($queue), array_merge(self::AVAILABLE_QUEUE_OPTIONS, self::NEW_QUEUE_OPTIONS, self::DEPRECATED_BINDING_KEYS)))) {
throw new LogicException(sprintf('Invalid queue option(s) "%s" passed to the AMQP Messenger transport.', implode('", "', $invalidQueueOptions)));
}

Expand Down

0 comments on commit abcaaa7

Please sign in to comment.