1
我在应用程序/ config.yml以下部分:Symfony3配置TreeBuilder作为
bp_image:
types:
user_avatar:
width: 200
height: 200
upload_path: '%kernel.root_dir%/../web/uploads'
在我的包的配置文件
我:
$rootNode = $treeBuilder->root('bp_image');
$rootNode
->fixXmlConfig('type')
->children()
->arrayNode('types')
->requiresAtLeastOneElement()
->useAttributeAsKey('name')
->prototype('array')
->children()
->variableNode('width')->end()
->variableNode('height')->end()
->variableNode('upload_path')->end()
->end()
->end()
->end()
->end();
当我尝试处理配置的Symfony抛出以下异常:
InvalidConfigurationException in ArrayNode.php line 317:
Unrecognized option "user_avatar" under "bp_image"
任何想法我做错了什么?