Skip to content

Commit 21d6a3a

Browse files
committed
minor #11896 [PropertyInfo] Mentioned that property types can be extracted from constructor too (javiereguiluz)
This PR was merged into the 4.2 branch. Discussion ---------- [PropertyInfo] Mentioned that property types can be extracted from constructor too Fixes #9382. Commits ------- c4fb36b [PropertyInfo] Mentioned that property types can be extracted from constructor too
2 parents 7bacf00 + c4fb36b commit 21d6a3a

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
@@ -351,8 +351,9 @@ ReflectionExtractor
351351

352352
Using PHP reflection, the :class:`Symfony\\Component\\PropertyInfo\\Extractor\\ReflectionExtractor`
353353
provides list, type and access information from setter and accessor methods.
354-
It can also give the type of a property, and if it is initializable through the
355-
constructor. It supports return and scalar types for PHP 7::
354+
It can also give the type of a property (even extracting it from the constructor
355+
arguments), and if it is initializable through the constructor. It supports
356+
return and scalar types for PHP 7::
356357

357358
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
358359

@@ -371,6 +372,11 @@ constructor. It supports return and scalar types for PHP 7::
371372
// Initializable information
372373
$reflectionExtractor->isInitializable($class, $property);
373374

375+
.. versionadded:: 4.1
376+
377+
The feature to extract the property types from constructor arguments was
378+
introduced in Symfony 4.1.
379+
374380
.. note::
375381

376382
When using the Symfony framework, this service is automatically registered

0 commit comments

Comments
 (0)