It would be easier to configure PHPStan exception rules correctly if warnings were emitted for potential misconfigurantions. Consider the following configuration file:
parameters:
exceptionRules:
checkedExceptions: # or uncheckedExceptions
- FooException
methodThrowTypeDeclarations:
Bar:
barMethod:
- BarException
functionThrowTypeDeclarations:
bazFunction:
- BazException
includes:
- vendor/pepakriz/phpstan-exception-rules/extension.neon
A warning should be shown when
- FooException does not exist.
- FooException does not implement Throwable.
- Bar does not exist.
- Bar::barMethod does not exist.
- BarException does not exist.
- BarException does not implement Throwable.
- bazFunction does not exist.
- BazException does not exist.
- BazException does not implement Throwable.
It would be easier to configure PHPStan exception rules correctly if warnings were emitted for potential misconfigurantions. Consider the following configuration file:
A warning should be shown when