Skip to content

Commit 08ae842

Browse files
melkamarjaviereguiluz
authored andcommitted
Add note about special handling of 'name' argument
Fixes !13422
1 parent 3e6ea42 commit 08ae842

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
@@ -357,6 +357,10 @@ In order to maintain the array keys use the ``useAttributeAsKey()`` method::
357357
->end()
358358
;
359359

360+
.. note::
361+
362+
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.
363+
360364
The argument of this method (``name`` in the example above) defines the name of
361365
the attribute added to each XML node to differentiate them. Now you can use the
362366
same YAML configuration shown before or the following XML configuration:

0 commit comments

Comments
 (0)