Closed
Description
Description
Couldn't really find any discussion specifically about stringNode, and I'm wondering if it's worthwhile to create a PR. I notice I'm repeating myself quite a lot:
->scalarNode('my_config_string')
->cannotBeEmpty()
->validate()
->ifTrue(fn($v) => !is_string($v))
->thenInvalid('my_config_string must be a string.')
->end()
->end()
I've seen the arguments "cluttered API" and "if we want to encourage the usage of bundle configuration validation, we should make it as easy as possible to use" (see #4714). But what's the verdict of a simple stringNode?
Example
No response