Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash in sandbox #4135

Closed
staabm opened this issue Nov 27, 2020 · 4 comments
Closed

crash in sandbox #4135

staabm opened this issue Nov 27, 2020 · 4 comments

Comments

@staabm
Copy link
Contributor

staabm commented Nov 27, 2020

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.

@ondrejmirtes
Copy link
Member

Fixed phpstan/phpstan-src@3e8ec5f

@staabm
Copy link
Contributor Author

staabm commented Nov 27, 2020

ohh wow that was fast <3.

could you give me a hint what I might miss, when phpstan reports Unable to resolve the template type T?

@ondrejmirtes
Copy link
Member

As with anything - reproduce it on phpstan.org so I can take a look.

@github-actions
Copy link

github-actions bot commented May 6, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants