Skip to content

Commit d636cab

Browse files
committed
Made the rdkafka global config node a variableNode with an empty array as default
1 parent a4becbe commit d636cab

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

pkg/rdkafka/Symfony/RdKafkaTransportFactory.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ public function addConfiguration(ArrayNodeDefinition $builder)
4444
->scalarNode('dsn')
4545
->info('The kafka DSN. Other parameters are ignored if set')
4646
->end()
47-
->arrayNode('global')
48-
->children()
49-
->scalarNode('metadata.broker.list')->end()
50-
->end()
51-
->end()
47+
->variableNode('global')->defaultValue([])->end()
5248
->arrayNode('topics')
5349
->prototype('scalar')->end()
5450
->end()

pkg/rdkafka/Tests/Symfony/RdKafkaTransportFactoryTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public function testShouldAllowAddConfiguration()
5050
$this->assertEquals([
5151
'topics' => [],
5252
'commit_async' => false,
53+
'global' => [],
5354
], $config);
5455
}
5556

@@ -67,6 +68,7 @@ public function testShouldAllowAddConfigurationAsString()
6768
'dsn' => 'kafkaDSN',
6869
'topics' => [],
6970
'commit_async' => false,
71+
'global' => [],
7072
], $config);
7173
}
7274

0 commit comments

Comments
 (0)