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
190190above, it is possible to have multiple connection arrays (containing a ``driver ``,
191191``host ``, etc.).
192192
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+
193205Array Node Options
194206~~~~~~~~~~~~~~~~~~
195207
@@ -750,8 +762,7 @@ A validation rule also requires a "then" part:
750762- ``thenUnset() ``
751763
752764Usually, "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.
755766
756767Processing Configuration Values
757768-------------------------------
You can’t perform that action at this time.
0 commit comments