Skip to content

Commit 659e443

Browse files
committed
Merge branch '5.0'
* 5.0: Add note about special handling of 'name' argument
2 parents 1f2cb0b + 86a526a commit 659e443

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/config/definition.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,13 @@ In order to maintain the array keys use the ``useAttributeAsKey()`` method::
346346
->end()
347347
;
348348

349+
.. note::
350+
351+
In YAML, the ``'name'`` argument of ``useAttributeAsKey()`` has a special
352+
meaning and refers to the key of the map (``sf_connection`` and ``default``
353+
in this example). If a child node was defined for the ``connections`` node
354+
with the key ``name``, then that key of the map would be lost.
355+
349356
The argument of this method (``name`` in the example above) defines the name of
350357
the attribute added to each XML node to differentiate them. Now you can use the
351358
same YAML configuration shown before or the following XML configuration:

0 commit comments

Comments
 (0)