You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It allows to disable the exception check for all the method of classes extending PHPUnit\Framework\TestCase.
This was pretty useful because I did want to annotate every method of src folder, but would avoid to pollute my tests directory with this ; even if I use phpstan on both src and tests directory for all the other rules.
Would it be possible to introduce a new option under the exceptions key of phpstan config in order to do something similar.
Like an uncheckedMethod, uncheckedClasses or something like this ?
The text was updated successfully, but these errors were encountered:
You can now implement any logic you want using your own custom ExceptionTypeResolver. You can even ask for DefaultExceptionTypeResolver in the constructor as a fallback :)
Feature request
Hi @ondrejmirtes
I recently try the new feature of phpstan about exceptions, seems like it works well, great job.
When I was using https://github.com/pepakriz/phpstan-exception-rules, I used the following config:
It allows to disable the exception check for all the method of classes extending
PHPUnit\Framework\TestCase
.This was pretty useful because I did want to annotate every method of
src
folder, but would avoid to pollute mytests
directory with this ; even if I use phpstan on bothsrc
andtests
directory for all the other rules.Would it be possible to introduce a new option under the
exceptions
key of phpstan config in order to do something similar.Like an
uncheckedMethod
,uncheckedClasses
or something like this ?The text was updated successfully, but these errors were encountered: