Skip to content

Commit 29945c6

Browse files
authored
Add note about special handling of 'name' argument
Fixes !13422
1 parent dc69db9 commit 29945c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/config/definition.rst

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

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

0 commit comments

Comments
 (0)