true
如果环境是“测试” ,我如何将“disable_delivery”设置为默认值?这甚至可能吗?
另一个问题是如何根据另一个配置选项(如“用户名”)设置它?
$rootNode
->children()
->scalarNode('method')
->isRequired()
->cannotBeEmpty()
->validate()
->ifNotInArray($methods)
->thenInvalid('The method %s is not supported.')
->end()
->end()
->scalarNode('username')->isRequired()->cannotBeEmpty()->end()
->scalarNode('password')->isRequired()->cannotBeEmpty()->end()
->booleanNode('disable_delivery')->end()
->end()
;