You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you try to load an abstract class with annotations, the following code throws an exception;
$class = new \ReflectionClass($class);
if ($class->isAbstract()) {
thrownew \InvalidArgumentException(sprintf('Annotations from class "%s" cannot be read as it is abstract.', $class));
}
But the $class variable is now a ReflectionClass instance and the complete class file contents are shown in the exception.
The text was updated successfully, but these errors were encountered:
#17388) (robinvdvleuten)
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
When you try to load an abstract class with annotations, the following code throws an exception;
But the $class variable is now a ReflectionClass instance and the complete class file contents are shown in the exception.
The text was updated successfully, but these errors were encountered: