Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improving extracting type from constructor#10969

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
LS05 wants to merge2 commits intosymfony:masterfromLS05:improve_property_info_constructor_example
Closed
Changes fromall 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
11 changes: 10 additions & 1 deletioncomponents/property_info.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -370,6 +370,9 @@ Using PHP reflection, the :class:`Symfony\\Component\\PropertyInfo\\Extractor\\R
provides list, type and access information from setter and accessor methods.
It can also give the type of a property, and if it is initializable through the
constructor. It supports return and scalar types for PHP 7.
The component is also able to extract the types of the constructor's parameters.
If the class is a sub-class, then the constructor's properties of the parent
superclass are extracted.

.. note::

Expand DownExpand Up@@ -399,9 +402,15 @@ constructor. It supports return and scalar types for PHP 7.
$reflectionExtractor->isReadable($class, $property);
$reflectionExtractor->isWritable($class, $property);

// Initializable information
// Initializable information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Can be reverted

$reflectionExtractor->isInitializable($class, $property);

// Constructor type information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The dot can also be removed here

$reflectionExtractor->extractFromConstructor($class, $property);
$reflectionExtractor->getTypes($class, $property, [
'enable_constructor_extraction' => true
]);

PhpDocExtractor
~~~~~~~~~~~~~~~

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp