2.4.0
New features
- enforceEnumMatchRule: new rule enforcing usage of
match ($enum)
instead of exhaustive elseifs for enums (#94)- it tries to improve "too smart" enum analysis of PHPStan 1.10+, see reasoning
- forbidAssignmentNotMatchingVarDoc: ability to allow narrowing by config
allowNarrowing: true
(#92)- see differences with new native PHPStan check in readme
- forbidUselessNullableReturn: support also functions and closures (#97, #99)
- enforceListReturn: support also functions (#96)
Fixes
- forbidUnusedException: fix false positive within match arm (#90)
Improvements
Dependencies
phpstan/phpstan
now requires at least 1.10.0 (was 1.9.1, see #84)