Prevent ignore extra keys removing extra keys
'default' => [
'admin' => 'ROLE_ADMIN',
'civility' => 'Mister',
'default' => [
'admin' => 'ROLE_ADMIN',
'civility' => 'Mister',
+ 'languages' => [
+ 'en_gb' => 'English'
+ ],
+ 'locales' => [ 'en_gb' ],
'group' => [ 'User' ]
],
'route' => [
'group' => [ 'User' ]
],
'route' => [
->children()
->arrayNode('class')
->addDefaultsIfNotSet()
->children()
->arrayNode('class')
->addDefaultsIfNotSet()
+ #XXX: ignoreExtraKeys(bool $remove = true)
+ ->ignoreExtraKeys(false)
->children()
->scalarNode('civility')->cannotBeEmpty()->defaultValue($defaults['class']['civility'])->end()
->scalarNode('group')->cannotBeEmpty()->defaultValue($defaults['class']['group'])->end()
->children()
->scalarNode('civility')->cannotBeEmpty()->defaultValue($defaults['class']['civility'])->end()
->scalarNode('group')->cannotBeEmpty()->defaultValue($defaults['class']['group'])->end()
->end()
->arrayNode('default')
->addDefaultsIfNotSet()
->end()
->arrayNode('default')
->addDefaultsIfNotSet()
+ #XXX: ignoreExtraKeys(bool $remove = true)
+ ->ignoreExtraKeys(false)
->children()
->scalarNode('admin')->cannotBeEmpty()->defaultValue($defaults['default']['admin'])->end()
->scalarNode('civility')->cannotBeEmpty()->defaultValue($defaults['default']['civility'])->end()
->children()
->scalarNode('admin')->cannotBeEmpty()->defaultValue($defaults['default']['admin'])->end()
->scalarNode('civility')->cannotBeEmpty()->defaultValue($defaults['default']['civility'])->end()
+ #TODO: see if we can't prevent key normalisation with ->normalizeKeys(false)
+ ->arrayNode('languages')
+ ->treatNullLike([])
+ ->defaultValue($defaults['default']['languages'])
+ ->scalarPrototype()->end()
+ ->end()
+ #TODO: see if we can't prevent key normalisation with ->normalizeKeys(false)
+ ->arrayNode('locales')
+ ->treatNullLike([])
+ ->defaultValue($defaults['default']['locales'])
+ ->scalarPrototype()->end()
+ ->end()
->arrayNode('group')
->treatNullLike([])
->defaultValue($defaults['default']['group'])
->arrayNode('group')
->treatNullLike([])
->defaultValue($defaults['default']['group'])