I want to achieve the following configuration structure:
app:
integrations:
some: true
random: true
options: true
user_can_make_these_up: true
Where I already added some defaults: mykey: true and myotherkey: false
So in this case the compiled configuration should be:
[
mykey => true,
myotherkey => false,
some => true,
random => true,
options => true,
user_can_make_these_up => true,
]
I tried the following:
$rootNode
->children()
->arrayNode('integrations')
->ignoreExtraKeys()
->addDefaultsIfNotSet()
->children()
->booleanNode('mykey')->defaultTrue()->end()
->end()
->end()
->end();
But then I get an error “Unrecognized option “mykey” under “app”. Available option is “integrations”.”
What am I doing wrong?