class CircularDependencyException extends Exception implements ContainerExceptionInterface

Properties

protected string[] $dependencyChain

The dependency chain that forms the cycle.

protected bool $sealed

Whether the chain has been sealed (cycle is complete).

Methods

void
addDefinitionName(string $name)

Add a definition name to the dependency chain.

array
getDependencyChain()

Get the dependency chain that forms the cycle.

Details

at line 31
void addDefinitionName(string $name)

Add a definition name to the dependency chain.

As the exception bubbles up through resolve() calls, each level prepends its abstract name. The chain is sealed once the same name appears twice, indicating the full cycle has been captured (e.g., A -> B -> C -> A).

Parameters

string $name

Return Value

void

at line 51
array getDependencyChain()

Get the dependency chain that forms the cycle.

Return Value

array