File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Bundle/TwigBundle/DependencyInjection Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ private function addGlobalsSection(ArrayNodeDefinition $rootNode)
76
76
->fixXmlConfig ('global ' )
77
77
->children ()
78
78
->arrayNode ('globals ' )
79
- ->keepKeys ( )
79
+ ->normalizeKeys ( false )
80
80
->useAttributeAsKey ('key ' )
81
81
->example (array ('foo ' => '"@bar" ' , 'pi ' => 3.14 ))
82
82
->prototype ('array ' )
@@ -127,7 +127,7 @@ private function addTwigOptions(ArrayNodeDefinition $rootNode)
127
127
->scalarNode ('auto_reload ' )->end ()
128
128
->scalarNode ('optimizations ' )->end ()
129
129
->arrayNode ('paths ' )
130
- ->keepKeys ( )
130
+ ->normalizeKeys ( false )
131
131
->beforeNormalization ()
132
132
->always ()
133
133
->then (function ($ paths ) {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ CHANGELOG
4
4
2.2.0
5
5
-----
6
6
7
- * added a ` keepKeys ()` method for array nodes (to avoid key normalization)
7
+ * added a ` normalizeKeys ()` method for array nodes (to avoid key normalization)
8
8
* added numerical type handling for config definitions
9
9
* added convenience methods for optional configuration sections to ArrayNodeDefinition
10
10
* added a utils class for XML manipulations
Original file line number Diff line number Diff line change @@ -284,13 +284,15 @@ public function ignoreExtraKeys()
284
284
}
285
285
286
286
/**
287
- * Disables key normalization.
287
+ * Sets key normalization.
288
+ *
289
+ * @param Boolean $bool Whether to enable key normalization
288
290
*
289
291
* @return ArrayNodeDefinition
290
292
*/
291
- public function keepKeys ( )
293
+ public function normalizeKeys ( $ bool )
292
294
{
293
- $ this ->normalizeKeys = false ;
295
+ $ this ->normalizeKeys = ( Boolean ) $ bool ;
294
296
295
297
return $ this ;
296
298
}
You can’t perform that action at this time.
0 commit comments