Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
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
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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:: | ||
| @@ -399,9 +402,15 @@ constructor. It supports return and scalar types for PHP 7. | ||
| $reflectionExtractor->isReadable($class, $property); | ||
| $reflectionExtractor->isWritable($class, $property); | ||
| // Initializable information. | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Can be reverted | ||
| $reflectionExtractor->isInitializable($class, $property); | ||
| // Constructor type information. | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
| ~~~~~~~~~~~~~~~ | ||