Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions components/property_info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,8 @@ with the ``property_info`` service in the Symfony Framework::
// Type information.
$doctrineExtractor->getTypes($class, $property);

.. _components-property-information-constructor-extractor:

ConstructorExtractor
~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -570,6 +572,7 @@ Creating Your Own Extractors

You can create your own property information extractors by creating a
class that implements one or more of the following interfaces:
:class:`Symfony\\Component\\PropertyInfo\\ConstructorArgumentTypeExtractorInterface`,
:class:`Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface`,
:class:`Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface`,
:class:`Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface`,
Expand All @@ -587,6 +590,11 @@ service by defining it as a service with one or more of the following
* ``property_info.access_extractor`` if it provides access information.
* ``property_info.initializable_extractor`` if it provides initializable information
(it checks if a property can be initialized through the constructor).
* ``property_info.constructor_extractor`` if it provides type information from the constructor argument.

.. versionadded:: 7.3

The ``property_info.constructor_extractor`` tag was introduced in Symfony 7.3.

.. _`PSR-1`: https://www.php-fig.org/psr/psr-1/
.. _`phpDocumentor Reflection`: https://github.com/phpDocumentor/ReflectionDocBlock
Expand Down
12 changes: 12 additions & 0 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2451,6 +2451,18 @@ enabled

**type**: ``boolean`` **default**: ``true`` or ``false`` depending on your installation

with_constructor_extractor
..........................

**type**: ``boolean`` **default**: ``false``

Configures the ``property_info`` service to extract property information from the constructor arguments
using the :ref:`ConstructorExtractor <components-property-information-constructor-extractor>`.

.. versionadded:: 7.3

The ``with_constructor_extractor`` option was introduced in Symfony 7.3.

rate_limiter
~~~~~~~~~~~~

Expand Down