8000 bug #21639 [DI] Set getter edges as lazy (nicolas-grekas) · symfony/symfony@444b37d · GitHub
[go: up one dir, main page]

Skip to content

Commit 444b37d

Browse files
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
2 parents d7aec48 + 279f6a2 commit 444b37d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/Symfony/Component/DependencyInjection/Compiler/AnalyzeServiceReferencesPass.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,16 @@ protected function processValue($value, $isRoot = false)
104104
}
105105
$this->lazy = false;
106106

107-
if ($this->onlyConstructorArguments) {
108-
$this->processValue($value->getFactory());
109-
$this->processValue($value->getArguments());
110-
} else {
111-
parent::processValue($value, $isRoot);
107+
$this->processValue($value->getFactory());
108+
$this->processValue($value->getArguments());
109+
110+
if (!$this->onlyConstructorArguments) {
111+
$this->processValue($value->getProperties());
112+
$this->lazy = true;
113+
$this->processValue($value->getOverriddenGetters());
114+
$this->lazy = false;
115+
$this->processValue($value->getMethodCalls());
116+
$this->processValue($value->getConfigurator());
112117
}
113118
$this->lazy = $lazy;
114119

0 commit comments

Comments
 (0)
0