[AsseticBundle] fixed definition of filter configs

This commit is contained in:
Kris Wallsmith 2011-04-01 07:52:41 -07:00
parent c9c66db108
commit 347b66a2b6

View File

@ -48,6 +48,8 @@ class Configuration
->scalarNode('sass')->defaultNull()->end()
->scalarNode('yui')->defaultNull()->end()
->end()
// bundles
->fixXmlConfig('bundle')
->children()
->arrayNode('bundles')
@ -65,13 +67,21 @@ class Configuration
->end()
->end()
->end()
// filters
->fixXmlConfig('filter')
->children()
->arrayNode('filters')
->addDefaultsIfNotSet()
->requiresAtLeastOneElement()
->useAttributeAsKey('name')
->prototype('array')->end()
->prototype('variable')
->treatNullLike(array())
->validate()
->ifTrue(function($v) { return !is_array($v); })
->thenInvalid('The assetic.filters config %s must be either null or an array.')
->end()
->end()
->end()
->end()
;