bug #21639 [DI] Set getter edges as lazy (nicolas-grekas)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Set getter edges as lazy

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Fixes tests

Commits
-------

279f6a2 [DI] Set getter edges as lazy
This commit is contained in:
Nicolas Grekas 2017-02-17 07:19:49 +01:00
commit 444b37d575

View File

@ -104,11 +104,16 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass implements Repe
}
$this->lazy = false;
if ($this->onlyConstructorArguments) {
$this->processValue($value->getFactory());
$this->processValue($value->getArguments());
} else {
parent::processValue($value, $isRoot);
$this->processValue($value->getFactory());
$this->processValue($value->getArguments());
if (!$this->onlyConstructorArguments) {
$this->processValue($value->getProperties());
$this->lazy = true;
$this->processValue($value->getOverriddenGetters());
$this->lazy = false;
$this->processValue($value->getMethodCalls());
$this->processValue($value->getConfigurator());
}
$this->lazy = $lazy;