Closed
Description
An issue that somebody found:
$rootNode
->children()
->booleanNode('use_mock')
->isRequired()
->cannotBeEmpty()
->end()
when using: use_mock: false in the config, it will throw a InvalidConfigurationException
: The path "config.use_mock" cannot contain an empty value, but got false.
This will be thrown at line:
where anempty()
check on the boolean false
will actually return true.
Is this a bug, or are there other ways to deal with booleanNodes in this situation?
Gist: https://gist.github.com/jaytaph/08906a3f38ca9f0867f8
(Same issue occurs when using a scalarNode() and using "0" as the config value)