Skip to content

Commit 23464e2

Browse files
committed
Fix: Routing key may be generated twice
1 parent 8345275 commit 23464e2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/DI/Helpers/ExchangesHelper.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ public function getConfigSchema(): Schema
3232
'arguments' => Expect::array(),
3333
'queueBindings' => Expect::arrayOf(
3434
Expect::structure([
35-
'routingKey' => Expect::arrayOf(
36-
Expect::string()
37-
)->default([''])->before(fn(string|array $input): array => (array)$input),
35+
'routingKey' => Expect::anyOf(
36+
Expect::string(),
37+
Expect::arrayOf(
38+
Expect::string()
39+
)
40+
)->default([''])->castTo('array'),
3841
'noWait' => Expect::bool(false),
3942
'arguments' => Expect::array(),
4043
])->castTo('array'),

0 commit comments

Comments
 (0)