Skip to content

crash in sandbox #4135

@staabm

Description

@staabm

Bug report

I am in the process of reproducing a issue we see in rectorphp/rector#4708
in which I try to find out why we get a Unable to resolve the template type T in call to method Rector\\Core\\PhpParser\\Node\\BetterNodeFinder\:\:findFirstParentInstanceOf\(\) error.

while creating a re-production case in the demo sandbox, I can see a error

Internal error: Provided node "Base" is not class, but "interface" Run PHPStan with --debug option and post the stack trace to: https://github.com/phpstan/phpstan/issues/new

I know my code is not "well" but it should at least not crash phpstan :)

Code snippet that reproduces the problem

https://phpstan.org/r/071bc230-81fa-40f4-b1bf-76360cf34e85

Expected output

I guess this shouldn't error that fatal :).

maybe the sandbox should even report the underlying error (run phpstan itself with --debug) - so all information at hand could just be put into this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions