PHPStan, the popular PHP static analysis tool, has just released version 1.10.6. This latest release brings improvements and bugfixes to the tool.

The bleeding edge features in this release include reporting the narrowing PHPStanTypeType interface via @var and checking invalid PHPDocs in previously unchecked statement types. If you want to adopt these features early, you can include the bleedingEdge.neon config file in your project’s phpstan.neon. However, please note that there are no backwards compatibility guarantees when you include this file, and the behaviour and reported errors can change in minor versions.

Improvements in this release include adding forgotten handling of ClassConst in the InvalidPHPStanDocTagRule and fixing wrong positives about templates in conditional types.

The bugfixes in this release include fixing a false positive with array_combine() on PHP 8+, ignoring Nop nodes in NodeScopeResolver when creating UnreachableStatementNode, and fixing wrong positives about templates in conditional types.

For more information https://github.com/phpstan/phpstan/releases/tag/1.10.6.