fix: Update DefaultContainer if needed
This commit is contained in:
@@ -166,9 +166,9 @@ final class DefaultContainer implements Container
|
|||||||
try {
|
try {
|
||||||
$reflection = $this->reflectionProvider->getClass($className);
|
$reflection = $this->reflectionProvider->getClass($className);
|
||||||
|
|
||||||
// Check if class is instantiable using framework's method
|
// Check if class is instantiable using the framework's method
|
||||||
if (! $reflection->isInstantiable()) {
|
if (! $reflection->isInstantiable()) {
|
||||||
$this->throwDetailedBindingException($class, $reflection);
|
$this->throwDetailedBindingException($class/*, $reflection*/);
|
||||||
}
|
}
|
||||||
|
|
||||||
$dependencies = $this->dependencyResolver->resolveDependencies($className);
|
$dependencies = $this->dependencyResolver->resolveDependencies($className);
|
||||||
@@ -199,7 +199,7 @@ final class DefaultContainer implements Container
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function throwDetailedBindingException(string $class, $reflection): never
|
private function throwDetailedBindingException(string $class/*, $reflection*/): never
|
||||||
{
|
{
|
||||||
$availableBindings = array_keys($this->bindings->getAllBindings());
|
$availableBindings = array_keys($this->bindings->getAllBindings());
|
||||||
$dependencyChain = implode(' -> ', $this->resolving);
|
$dependencyChain = implode(' -> ', $this->resolving);
|
||||||
|
|||||||
Reference in New Issue
Block a user