|
@@ -195,12 +195,7 @@ class Configuration implements ConfigurationInterface
|
|
|
->ifTrue(function($v){ return !is_array($v); })
|
|
|
->then(function($v){ return array($v); })
|
|
|
->end()
|
|
|
- ->prototype('scalar')
|
|
|
- ->beforeNormalization()
|
|
|
- ->ifTrue(function($v) { return is_array($v) && isset($v['value']); })
|
|
|
- ->then(function($v){ return $v['value']; })
|
|
|
- ->end()
|
|
|
- ->end()
|
|
|
+ ->prototype('scalar')->end()
|
|
|
->end()
|
|
|
->scalarNode('cache')->end()
|
|
|
->scalarNode('cache_warmer')->defaultFalse()->end()
|
|
@@ -213,13 +208,8 @@ class Configuration implements ConfigurationInterface
|
|
|
->beforeNormalization()
|
|
|
->ifTrue(function($v){ return !is_array($v); })
|
|
|
->then(function($v){ return array($v); })
|
|
|
- ->end()
|
|
|
- ->prototype('scalar')
|
|
|
- ->beforeNormalization()
|
|
|
- ->ifTrue(function($v) { return is_array($v) && isset($v['id']); })
|
|
|
- ->then(function($v){ return $v['id']; })
|
|
|
- ->end()
|
|
|
->end()
|
|
|
+ ->prototype('scalar')->end()
|
|
|
->end()
|
|
|
->end()
|
|
|
->fixXmlConfig('loader')
|
|
@@ -237,18 +227,11 @@ class Configuration implements ConfigurationInterface
|
|
|
->arrayNode('packages')
|
|
|
->useAttributeAsKey('name')
|
|
|
->prototype('array')
|
|
|
- ->children()
|
|
|
- ->scalarNode('version')->defaultNull()->end()
|
|
|
- ->end()
|
|
|
->fixXmlConfig('base_url')
|
|
|
->children()
|
|
|
+ ->scalarNode('version')->defaultNull()->end()
|
|
|
->arrayNode('base_urls')
|
|
|
- ->prototype('scalar')
|
|
|
- ->beforeNormalization()
|
|
|
- ->ifTrue(function($v) { return is_array($v) && isset($v['value']); })
|
|
|
- ->then(function($v){ return $v['value']; })
|
|
|
- ->end()
|
|
|
- ->end()
|
|
|
+ ->prototype('scalar')->end()
|
|
|
->end()
|
|
|
->end()
|
|
|
->end()
|
|
@@ -300,12 +283,7 @@ class Configuration implements ConfigurationInterface
|
|
|
->children()
|
|
|
->arrayNode('namespaces')
|
|
|
->useAttributeAsKey('prefix')
|
|
|
- ->prototype('scalar')
|
|
|
- ->beforeNormalization()
|
|
|
- ->ifTrue(function($v) { return is_array($v) && isset($v['namespace']); })
|
|
|
- ->then(function($v){ return $v['namespace']; })
|
|
|
- ->end()
|
|
|
- ->end()
|
|
|
+ ->prototype('scalar')->end()
|
|
|
->end()
|
|
|
->end()
|
|
|
->end()
|