Skip to content

Commit

Permalink
Make connection configuration mergable (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasnet authored Apr 26, 2017
1 parent 173a9d9 commit acf2276
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,31 +112,32 @@ public function getConfigTreeBuilder()
->info('Use this setting to define path console path.')
->end()
->scalarNode('cache_handler')->isRequired()->info('Cache handler.')->end()
->arrayNode('connections')->prototype('array')
->children()
->scalarNode('driver')->isRequired()->cannotBeEmpty()
->validate()
->ifNotInArray($drivers)
->thenInvalid('Invalid queue driver "%s". Supported drivers are ' . implode(', ', $drivers))
->arrayNode('connections')
->useAttributeAsKey('name')
->prototype('array')
->children()
->scalarNode('driver')->isRequired()->cannotBeEmpty()
->validate()
->ifNotInArray($drivers)
->thenInvalid('Invalid queue driver "%s". Supported drivers are ' . implode(', ', $drivers))
->end()
->end()
->scalarNode('queue')->end()
->scalarNode('key')->end()
->scalarNode('client')->end()
->integerNode('retry_after')->end()
->scalarNode('secret')->end()
->scalarNode('region')->end()
->booleanNode('persistent')->defaultFalse()->end()
->scalarNode('host')->end()
->scalarNode('repository')->end()
->scalarNode('prefix')->end()
->scalarNode('endpoint')->end()
->integerNode('timeout')->end()
->integerNode('port')->end()
->end()
->scalarNode('queue')->end()
->scalarNode('key')->end()
->scalarNode('client')->end()
->integerNode('retry_after')->end()
->scalarNode('secret')->end()
->scalarNode('region')->end()
->booleanNode('persistent')->defaultFalse()->end()
->scalarNode('host')->end()
->scalarNode('repository')->end()
->scalarNode('prefix')->end()
->scalarNode('endpoint')->end()
->integerNode('timeout')->end()
->integerNode('port')->end()
->end()
->end()
->end()
;
->end();

return $treeBuilder;
}
Expand Down

0 comments on commit acf2276

Please sign in to comment.