This PR was merged into the 2.3 branch.
Discussion
----------
[Routing] Fixed correct class name in thrown exception (fixes #17388)
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #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
This commit is contained in:
commit
54442313ae
@ -120,7 +120,7 @@ abstract class AnnotationClassLoader implements LoaderInterface
|
||||
|
||||
$class = new \ReflectionClass($class);
|
||||
if ($class->isAbstract()) {
|
||||
throw new \InvalidArgumentException(sprintf('Annotations from class "%s" cannot be read as it is abstract.', $class));
|
||||
throw new \InvalidArgumentException(sprintf('Annotations from class "%s" cannot be read as it is abstract.', $class->getName()));
|
||||
}
|
||||
|
||||
if ($annot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass)) {
|
||||
|
Reference in New Issue
Block a user