[Config] renamed keepKeys() to normalizeKeys() (refs #6367)
This commit is contained in:
parent
4f0cf08523
commit
8df9b7a2de
@ -76,7 +76,7 @@ class Configuration implements ConfigurationInterface
|
||||
->fixXmlConfig('global')
|
||||
->children()
|
||||
->arrayNode('globals')
|
||||
->keepKeys()
|
||||
->normalizeKeys(false)
|
||||
->useAttributeAsKey('key')
|
||||
->example(array('foo' => '"@bar"', 'pi' => 3.14))
|
||||
->prototype('array')
|
||||
@ -127,7 +127,7 @@ class Configuration implements ConfigurationInterface
|
||||
->scalarNode('auto_reload')->end()
|
||||
->scalarNode('optimizations')->end()
|
||||
->arrayNode('paths')
|
||||
->keepKeys()
|
||||
->normalizeKeys(false)
|
||||
->beforeNormalization()
|
||||
->always()
|
||||
->then(function ($paths) {
|
||||
|
@ -4,7 +4,7 @@ CHANGELOG
|
||||
2.2.0
|
||||
-----
|
||||
|
||||
* added a `keepKeys()` method for array nodes (to avoid key normalization)
|
||||
* added a `normalizeKeys()` method for array nodes (to avoid key normalization)
|
||||
* added numerical type handling for config definitions
|
||||
* added convenience methods for optional configuration sections to ArrayNodeDefinition
|
||||
* added a utils class for XML manipulations
|
||||
|
@ -284,13 +284,15 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables key normalization.
|
||||
* Sets key normalization.
|
||||
*
|
||||
* @param Boolean $bool Whether to enable key normalization
|
||||
*
|
||||
* @return ArrayNodeDefinition
|
||||
*/
|
||||
public function keepKeys()
|
||||
public function normalizeKeys($bool)
|
||||
{
|
||||
$this->normalizeKeys = false;
|
||||
$this->normalizeKeys = (Boolean) $bool;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user