Skip to content

Commit

Permalink
Issue #58821: [DependencyInjection] Support interfaces in ContainerBu…
Browse files Browse the repository at this point in the history
…ilder::getReflectionClass().
  • Loading branch information
donquixote authored and nicolas-grekas committed Nov 20, 2024
1 parent 0c199da commit e5ca16d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ContainerBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public function getReflectionClass(?string $class, bool $throw = true): ?\Reflec
$resource = new ClassExistenceResource($class, false);
$classReflector = $resource->isFresh(0) ? false : new \ReflectionClass($class);
} else {
$classReflector = class_exists($class) ? new \ReflectionClass($class) : false;
$classReflector = class_exists($class) || interface_exists($class, false) ? new \ReflectionClass($class) : false;
}
} catch (\ReflectionException $e) {
if ($throw) {
Expand Down

0 comments on commit e5ca16d

Please sign in to comment.