Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Routing][Bug] File contents of class is used in exception message #17388

Closed
@robinvdvleuten

Description

@robinvdvleuten

When you try to load an abstract class with annotations, the following code throws an exception;

$class = new \ReflectionClass($class);
if ($class->isAbstract()) {
    throw new \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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions