[FrameworkBundle] Fix configuration errors

This commit is contained in:
Victor Berchet 2012-02-15 00:49:15 +01:00
parent 6745b28b3d
commit 0a176ebc98
2 changed files with 2 additions and 6 deletions

View File

@ -217,15 +217,14 @@ class Configuration implements ConfigurationInterface
->fixXmlConfig('resource')
->children()
->arrayNode('resources')
->addDefaultsIfNotSet()
->defaultValue(array('FrameworkBundle:Form'))
->prototype('scalar')->end()
->validate()
->ifTrue(function($v) {return !in_array('FrameworkBundle:Form', $v); })
->then(function($v){
return array_merge(array('FrameworkBundle:Form'), $v);
})
->end()
->prototype('scalar')->end()
->end()
->end()
->end()
@ -235,7 +234,6 @@ class Configuration implements ConfigurationInterface
->arrayNode('assets_base_urls')
->performNoDeepMerging()
->addDefaultsIfNotSet()
->defaultValue(array('http' => array(), 'ssl' => array()))
->beforeNormalization()
->ifTrue(function($v) { return !is_array($v); })
->then(function($v) { return array($v); })
@ -290,7 +288,6 @@ class Configuration implements ConfigurationInterface
->arrayNode('base_urls')
->performNoDeepMerging()
->addDefaultsIfNotSet()
->defaultValue(array('http' => array(), 'ssl' => array()))
->beforeNormalization()
->ifTrue(function($v) { return !is_array($v); })
->then(function($v) { return array($v); })

View File

@ -54,8 +54,8 @@ class Configuration implements ConfigurationInterface
->fixXmlConfig('resource')
->children()
->arrayNode('resources')
->addDefaultsIfNotSet()
->defaultValue(array('form_div_layout.html.twig'))
->prototype('scalar')->end()
->setExample(array('MyBundle::form.html.twig'))
->validate()
->ifTrue(function($v) { return !in_array('form_div_layout.html.twig', $v); })
@ -63,7 +63,6 @@ class Configuration implements ConfigurationInterface
return array_merge(array('form_div_layout.html.twig'), $v);
})
->end()
->prototype('scalar')->end()
->end()
->end()
->end()