Skip to content

Commit

Permalink
bug #36069 [DI] skip untyped properties in AutowireRequiredProperties…
Browse files Browse the repository at this point in the history
…Pass (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
-------

048d092 [DI] skip untyped properties in AutowireRequiredPropertiesPass
  • Loading branch information
fabpot committed Mar 16, 2020
2 parents 693cf11 + 048d092 commit 0fb0371
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -42,6 +42,9 @@ protected function processValue($value, bool $isRoot = false)

$properties = $value->getProperties();
foreach ($reflectionClass->getProperties() as $reflectionProperty) {
if (!$reflectionProperty->hasType()) {
continue;
}
if (false === $doc = $reflectionProperty->getDocComment()) {
continue;
}
Expand Down
Expand Up @@ -9,6 +9,11 @@ class PropertiesInjection
*/
public Bar $plop;

/**
* @required
*/
public $plip;

public function __construct(A $a)
{
}
Expand Down

0 comments on commit 0fb0371

Please sign in to comment.