bug #36069 [DI] skip untyped properties in AutowireRequiredPropertiesPass (nicolas-grekas)
This PR was merged into the 5.1-dev branch.
Discussion
----------
[DI] skip untyped properties in AutowireRequiredPropertiesPass
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
048d09213e
[DI] skip untyped properties in AutowireRequiredPropertiesPass
This commit is contained in:
commit
0fb0371029
@ -42,6 +42,9 @@ class AutowireRequiredPropertiesPass extends AbstractRecursivePass
|
||||
|
||||
$properties = $value->getProperties();
|
||||
foreach ($reflectionClass->getProperties() as $reflectionProperty) {
|
||||
if (!$reflectionProperty->hasType()) {
|
||||
continue;
|
||||
}
|
||||
if (false === $doc = $reflectionProperty->getDocComment()) {
|
||||
continue;
|
||||
}
|
||||
|
@ -9,6 +9,11 @@ class PropertiesInjection
|
||||
*/
|
||||
public Bar $plop;
|
||||
|
||||
/**
|
||||
* @required
|
||||
*/
|
||||
public $plip;
|
||||
|
||||
public function __construct(A $a)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user