Skip to content

Commit b4427d2

Browse files
committed
[PropertyInfo] Mentioned the phpDoc collection type
1 parent dfa984b commit b4427d2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

components/property_info.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,15 @@ a collection - a non-scalar value capable of containing other values. Currently
315315
this returns ``true`` if:
316316

317317
* The :ref:`built-in PHP data type <components-property-info-type-builtin>`
318-
is ``array``, or
318+
is ``array``;
319319
* The mutator method the property is derived from has a prefix of ``add``
320-
or ``remove`` (which are defined as the list of array mutator prefixes).
320+
or ``remove`` (which are defined as the list of array mutator prefixes);
321+
* The phpDocumentor annotation is of type "collection" (e.g.
322+
``@var Iterator<DateTime>``, ``@var \Iterator<integer,string>``, etc.)
323+
324+
.. versionadded:: 4.2
325+
326+
The support of phpDocumentor collection types was introduced in Symfony 4.2.
321327

322328
Type::getCollectionKeyType() & Type::getCollectionValueType()
323329
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)