I need to define an array node with a given default value in a bundle's semantic configuration. This currently looks like:
$node->arrayNode('foo')
->prototype('scalar')->end()
->defaultValue(array('1', '2', '3'))
->end();
I want to give the user the option to override this array with null like:
my_bundle:
foo: ~
I cannot use empty arrays ([] or array()) instead of null given that [] should have different semantics from null.
Is this possible or are there any non-ugly workarounds? Currently I just get an exception:
InvalidTypeException: Invalid type for path "my_bundle.foo". Expected array, but got NULL