[DI] Fix non-instantiables auto-discovery

This commit is contained in:
Nicolas Grekas 2017-09-14 10:50:29 +02:00
parent 0256e5981c
commit 8b7c7c179b

View File

@ -133,7 +133,7 @@ abstract class FileLoader extends BaseFileLoader
throw new InvalidArgumentException(sprintf('Expected to find class "%s" in file "%s" while importing services from resource "%s", but it was not found! Check the namespace prefix used with the resource.', $class, $path, $pattern));
}
if (!$r->isInterface() && !$r->isTrait() && !$r->isAbstract()) {
if ($r->isInstantiable()) {
$classes[] = $class;
}
}