Skip to content

Commit 5444231

Browse files
committed
bug symfony#17389 [Routing] Fixed correct class name in thrown exception (fixes symfony#17388) (robinvdvleuten)
This PR was merged into the 2.3 branch. Discussion ---------- [Routing] Fixed correct class name in thrown exception (fixes symfony#17388) | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#17388 | License | MIT | Doc PR | This fixes the thrown exception. Instead of the complete file contents, the class name is used in the exception message. Commits ------- c847feb Fixed correct class name in thrown exception
2 parents e489bba + c847feb commit 5444231

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Routing/Loader/AnnotationClassLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function load($class, $type = null)
120120

121121
$class = new \ReflectionClass($class);
122122
if ($class->isAbstract()) {
123-
throw new \InvalidArgumentException(sprintf('Annotations from class "%s" cannot be read as it is abstract.', $class));
123+
throw new \InvalidArgumentException(sprintf('Annotations from class "%s" cannot be read as it is abstract.', $class->getName()));
124124
}
125125

126126
if ($annot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass)) {

0 commit comments

Comments
 (0)