Skip to content

Commit 371c4d4

Browse files
committed
minor #20752 [FrameworkBundle] Mention the property_info.with_constructor_extractor option (HypeMC)
This PR was merged into the 7.3 branch. Discussion ---------- [FrameworkBundle] Mention the `property_info.with_constructor_extractor` option Closes #20533 Commits ------- 4043a28 [FrameworkBundle] Mention the `property_info.with_constructor_extractor` option
2 parents 6a1f533 + 4043a28 commit 371c4d4

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

components/property_info.rst

+8
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,8 @@ with the ``property_info`` service in the Symfony Framework::
538538
// Type information.
539539
$doctrineExtractor->getTypes($class, $property);
540540

541+
.. _components-property-information-constructor-extractor:
542+
541543
ConstructorExtractor
542544
~~~~~~~~~~~~~~~~~~~~
543545

@@ -570,6 +572,7 @@ Creating Your Own Extractors
570572

571573
You can create your own property information extractors by creating a
572574
class that implements one or more of the following interfaces:
575+
:class:`Symfony\\Component\\PropertyInfo\\ConstructorArgumentTypeExtractorInterface`,
573576
:class:`Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface`,
574577
:class:`Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface`,
575578
:class:`Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface`,
@@ -587,6 +590,11 @@ service by defining it as a service with one or more of the following
587590
* ``property_info.access_extractor`` if it provides access information.
588591
* ``property_info.initializable_extractor`` if it provides initializable information
589592
(it checks if a property can be initialized through the constructor).
593+
* ``property_info.constructor_extractor`` if it provides type information from the constructor argument.
594+
595+
.. versionadded:: 7.3
596+
597+
The ``property_info.constructor_extractor`` tag was introduced in Symfony 7.3.
590598

591599
.. _`PSR-1`: https://www.php-fig.org/psr/psr-1/
592600
.. _`phpDocumentor Reflection`: https://github.com/phpDocumentor/ReflectionDocBlock

reference/configuration/framework.rst

+12
Original file line numberDiff line numberDiff line change
@@ -2451,6 +2451,18 @@ enabled
24512451

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

2454+
with_constructor_extractor
2455+
..........................
2456+
2457+
**type**: ``boolean`` **default**: ``false``
2458+
2459+
Configures the ``property_info`` service to extract property information from the constructor arguments
2460+
using the :ref:`ConstructorExtractor <components-property-information-constructor-extractor>`.
2461+
2462+
.. versionadded:: 7.3
2463+
2464+
The ``with_constructor_extractor`` option was introduced in Symfony 7.3.
2465+
24542466
rate_limiter
24552467
~~~~~~~~~~~~
24562468

0 commit comments

Comments
 (0)