Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 90b9009

Browse filesBrowse files
committed
[Messenger] Messenger options were merged with numbers as keys.
Now keys will not be considered as irrelevant. Test that proves options merged correctly.
1 parent 8076c2f commit 90b9009
Copy full SHA for 90b9009

File tree

2 files changed

+40
-0
lines changed
Filter options

2 files changed

+40
-0
lines changed

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,7 @@ function ($a) {
12671267
->scalarNode('dsn')->end()
12681268
->scalarNode('serializer')->defaultNull()->info('Service id of a custom serializer to use.')->end()
12691269
->arrayNode('options')
1270+
->useAttributeAsKey('option')
12701271
->normalizeKeys(false)
12711272
->defaultValue([])
12721273
->prototype('variable')

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
+39Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,45 @@ public function testLockMergeConfigs()
278278
);
279279
}
280280

281+
public function testMessengerMergeConfigsTransportOptions()
282+
{
283+
$processor = new Processor();
284+
$configuration = new Configuration(true);
285+
$config = $processor->processConfiguration($configuration, [
286+
[
287+
'messenger' => [
288+
'transports' => [
289+
'async' => [
290+
'dsn' => 'foo',
291+
'options' => [
292+
'auto_setup' => true,
293+
],
294+
],
295+
],
296+
],
297+
],
298+
[
299+
'messenger' => [
300+
'transports' => [
301+
'async' => [
302+
'options' => [
303+
'wait_time' => 20,
304+
],
305+
],
306+
],
307+
],
308+
],
309+
]);
310+
311+
$this->assertEquals(
312+
[
313+
'auto_setup' => true,
314+
'wait_time' => 20,
315+
],
316+
$config['messenger']['transports']['async']['options']
317+
);
318+
}
319+
281320
public function testItShowANiceMessageIfTwoMessengerBusesAreConfiguredButNoDefaultBus()
282321
{
283322
$expectedMessage = 'You must specify the "default_bus" if you define more than one bus.';

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.