Skip to content

Commit 332844e

Browse files
committed
revert circular dep
1 parent 9f986ce commit 332844e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/Illuminate/Container/Container.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -842,9 +842,9 @@ public function build($concrete)
842842
return $this->notInstantiable($concrete);
843843
}
844844

845-
if (in_array($concrete, $this->buildStack)) {
846-
throw new CircularDependencyException("Circular dependency detected while resolving [{$concrete}].");
847-
}
845+
// if (in_array($concrete, $this->buildStack)) {
846+
// throw new CircularDependencyException("Circular dependency detected while resolving [{$concrete}].");
847+
// }
848848

849849
$this->buildStack[] = $concrete;
850850

tests/Container/ContainerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -564,13 +564,13 @@ public function testContainerCanResolveClasses()
564564
$this->assertInstanceOf(ContainerConcreteStub::class, $class);
565565
}
566566

567-
public function testContainerCanCatchCircularDependency()
568-
{
569-
$this->expectException(CircularDependencyException::class);
567+
// public function testContainerCanCatchCircularDependency()
568+
// {
569+
// $this->expectException(CircularDependencyException::class);
570570

571-
$container = new Container;
572-
$container->get(CircularAStub::class);
573-
}
571+
// $container = new Container;
572+
// $container->get(CircularAStub::class);
573+
// }
574574
}
575575

576576
class CircularAStub

0 commit comments

Comments
 (0)