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

PHPStan is saying expectThrowable wants Exception classes based on _generated\Throwable instead of simply PHP's Throwable #18

Closed
Rockylars opened this issue Dec 8, 2021 · 0 comments · Fixed by #19

Comments

@Rockylars
Copy link
Contributor

Rockylars commented Dec 8, 2021

Hey there, this is in relation to #13. This may be similar to #9 which is from our prior colleague.
image

I would expect that expectThrowable would simply accept Throwable. It is impossible for us to make copies of every error class just so that it works with this weird new Throwable. If i look at your code, i can see that you're also expecting the PHP one. Something may just have gone wrong by using the use statement instead of the backslash.

@Rockylars Rockylars changed the title PHPStan is saying expectThrowable wants _generated\Throwable instead of simply PHP's Throwable PHPStan is saying expectThrowable wants Exception classes based on _generated\Throwable instead of simply PHP's Throwable Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant