Skip to content

Commit ca2b291

Browse files
authored
Update Container.php
1 parent c1e6c57 commit ca2b291

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Illuminate/Container/Container.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ public function build($concrete, $withoutLazyFor = [])
11671167
}
11681168

11691169
if (! in_array($concrete, $withoutLazyFor) && ! empty($reflector->getAttributes(Lazy::class))) {
1170-
return proxy($concrete, fn () => $this->build($concrete, [$concrete]));
1170+
return proxy($concrete, fn () => $this->build($concrete, array_push($withoutLazyFor, $concrete)));
11711171
}
11721172

11731173
$dependencies = $constructor->getParameters();
@@ -1244,7 +1244,6 @@ protected function resolveDependencies(array $dependencies)
12441244

12451245
$result = null;
12461246

1247-
//
12481247
if (! is_null($attribute = Util::getContextualAttributeFromDependency($dependency))) {
12491248
$result = $this->resolveFromAttribute($attribute, $dependency->getType());
12501249
}

0 commit comments

Comments
 (0)