I’m setting up bundle’s configuration, I’m using Configuration class. I’m having my_node node which has a list child and I want to set a default value for it.
Thing is that I want to set value from parameter. When I’m trying to call defaultValue with parameter name it throws InvalidArgumentException with the default value of an array node has to be an array.
->arrayNode(‘my_node’)
->children()
->arrayNode('list')
->prototype('scalar')->end()
->defaultValue([‘foo’, ‘bar’]) //this works
->defaultValue(‘%some_parameter%’) //this does not
->end()
->end()
->end()
Any ideas how can I achieve that?