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
This commit is contained in:
commit
46811fdd01
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user