Closed
Description
The AnnotationFileLoader
interprets ClassName::class
syntax as start of class definition and treats next token (if it's a string) as a class name.
Example:
trait Foo
{
public function doBar()
{
$baz = self::class; // this is parsed as a beginning of class definition
if (true) {
}
}
}
AnnotationFileLoader
will find "true" as a name of a class in that file.
This will result in "Class true does not exist" exception thrown from \Symfony\Component\Routing\Loader\AnnotationClassLoader::load
.