Closed
Description
On the one hand, ->cannotBeEmpty()
method is accessible since it exists in the base NodeDefinition. On the other hand, arrays are not checked for being empty and don't have an $allowEmptyValue
property.
So I can have:
$treeBuilder
->root('acme')
->children()
->arrayNode('locales')
->isRequired()
->cannotBeEmpty()
->prototype('scalar')->cannotBeEmpty()->end()
->end()
->end()
->end();
and
acme:
locales: []
and no exception will be thrown.