Skip to content

Commit 864be0a

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: Add note about special handling of 'name' argument
2 parents 7bbf35e + ddd1bed commit 864be0a

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
@@ -350,6 +350,13 @@ In order to maintain the array keys use the ``useAttributeAsKey()`` method::
350350
->end()
351351
;
352352

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

0 commit comments

Comments
 (0)