Skip to content

Commit

Permalink
Merge pull request #5 from alex-patterson-webdev/hotfix/1.0.1
Browse files Browse the repository at this point in the history
Add class_exists() to getService() conditiaonl check to ensure we can…
  • Loading branch information
alex-patterson-webdev authored Nov 14, 2020
2 parents dfb5007 + 2e407e1 commit 566e962
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AbstractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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\'.',
Expand Down

0 comments on commit 566e962

Please sign in to comment.