Major new feature ๐
New exceptions-related rules
- Differentiate between checked and unchecked exceptions
- Enforce declaring thrown checked exceptions in
@throws
- Report extra exceptions in
@throws
that aren't actually thrown
Read this article for more details ยป
Improvements ๐ง
- Update
composer/xdebug-handler
(phpstan/phpstan-src@0b6b602)
Bugfixes ๐
- TypeSpecifier - fix assignments in type-narrowing functions (phpstan/phpstan-src@b2bf703), #4982, #4761, #3331, #3446, #2640, #2413, #3106
- Fix
throw
expression throw point (phpstan/phpstan-src@1e4f2e1) - Generics - fix handling optional parameter (phpstan/phpstan-src@7306405)
- BenevolentUnionType - be benevolent about TrinaryLogic methods (phpstan/phpstan-src@eeb08ba)
- FileTypeMapper - fix PHPDocs after anonymous class (phpstan/phpstan-src@00ff86b), #4985
Function signature fixes ๐ค
- Updated
getopt()
return type (phpstan/phpstan-src@94b6c03), #4987, thanks @dktapps!