Skip to content

Crash reading annotation from anonymous classes #71

@marcospassos

Description

@marcospassos

This problem was quite tricky to track.

PHPStan analyses anonymous classes using eval. When the ReflectionClass of an anonymous class is created, it retains the line on which the eval occurred, rather than the line where the class was declared. It causes the ThrowsAnnotationReader to crash when attempting to read the annotations for anonymous classes.

I'll provide a PR with a hotfix in the next few days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions