Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8b7c7c1

Browse files
[DI] Fix non-instantiables auto-discovery
1 parent 0256e59 commit 8b7c7c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/DependencyInjection/Loader/FileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private function findClasses($namespace, $pattern, $excludePattern)
133133
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));
134134
}
135135

136-
if (!$r->isInterface() && !$r->isTrait() && !$r->isAbstract()) {
136+
if ($r->isInstantiable()) {
137137
$classes[] = $class;
138138
}
139139
}

0 commit comments

Comments
 (0)