File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,18 @@ inside the current node. According to the prototype definition in the example
190
190
above, it is possible to have multiple connection arrays (containing a ``driver ``,
191
191
``host ``, etc.).
192
192
193
+ .. versionadded :: 3.3
194
+ The ``castToArray() `` helper was added in Symfony 3.3.
195
+
196
+ Sometimes, to improve the user experience of your application or bundle, you may
197
+ allow to use a simple string or numeric value where an array value is required.
198
+ Use the ``castToArray() `` helper to turn those variables into arrays::
199
+
200
+ ->arrayNode('hosts')
201
+ ->beforeNormalization()->castToArray()->end()
202
+ // ...
203
+ ->end()
204
+
193
205
Array Node Options
194
206
~~~~~~~~~~~~~~~~~~
195
207
@@ -750,8 +762,7 @@ A validation rule also requires a "then" part:
750
762
- ``thenUnset() ``
751
763
752
764
Usually, "then" is a closure. Its return value will be used as a new value
753
- for the node, instead
754
- of the node's original value.
765
+ for the node, instead of the node's original value.
755
766
756
767
Processing Configuration Values
757
768
-------------------------------
You can’t perform that action at this time.
0 commit comments