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

Skip to content

Commit 46811fd

Browse files
bug #24199 [DI] Fix non-instantiables auto-discovery (nicolas-grekas)
This PR was merged into the 3.3 branch. Discussion ---------- [DI] Fix non-instantiables auto-discovery | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24195 | License | MIT | Doc PR | - Commits ------- 8b7c7c1 [DI] Fix non-instantiables auto-discovery
2 parents cdb5326 + 8b7c7c1 commit 46811fd

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)