Skip to content

Commit d8363f5

Browse files
committed
minor #11866 [PropertyInfo] Mentioned the phpDoc collection type (javiereguiluz)
This PR was squashed before being merged into the 4.2 branch (closes #11866). Discussion ---------- [PropertyInfo] Mentioned the phpDoc collection type This fixes #10338. Commits ------- e03b128 [PropertyInfo] Mentioned the phpDoc collection type
2 parents 30c8fcb + e03b128 commit d8363f5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

components/property_info.rst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,16 @@ 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 SomeClass<DateTime>``, ``@var SomeClass<integer,string>``,
323+
``@var Doctrine\Common\Collections\Collection<App\Entity\SomeEntity>``, etc.)
324+
325+
.. versionadded:: 4.2
326+
327+
The support of phpDocumentor collection types was introduced in Symfony 4.2.
321328

322329
Type::getCollectionKeyType() & Type::getCollectionValueType()
323330
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -497,3 +504,4 @@ service by defining it as a service with one or more of the following
497504
.. _`symfony/serializer`: https://packagist.org/packages/symfony/serializer
498505
.. _`symfony/doctrine-bridge`: https://packagist.org/packages/symfony/doctrine-bridge
499506
.. _`doctrine/orm`: https://packagist.org/packages/doctrine/orm
507+
.. _`phpDocumentor`: https://www.phpdoc.org/

0 commit comments

Comments
 (0)