From 2e407e1033aafd0cb0d3ba43b5206ceedf97c510 Mon Sep 17 00:00:00 2001 From: Alex Patterson Date: Sat, 14 Nov 2020 00:21:51 +0000 Subject: [PATCH] Add class_exists() to getService() conditiaonl check to ensure we can correctly resolve non-registered services that should be automatically registered --- src/AbstractFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AbstractFactory.php b/src/AbstractFactory.php index f98ff23..1c8c044 100755 --- a/src/AbstractFactory.php +++ b/src/AbstractFactory.php @@ -55,7 +55,7 @@ protected function getService(ContainerInterface $container, string $name, strin ); } - if (!$container->has($name)) { + if (!$container->has($name) && !class_exists($name, true)) { throw new ServiceNotFoundException( sprintf( 'The required \'%s\' dependency could not be found while creating service \'%s\'.',