Skip to content

2.0.3

Choose a tag to compare

@phpstan-bot phpstan-bot released this 28 Nov 22:21
· 78 commits to 2.0.x since this release
46b4d35

This release includes improvements and fixes from PHPStan 1.12.12.

Bleeding edge 🔪

  • Check that values passed to array_sum/product are castable to number (level 5) (#3658), #11883, thanks @schlndh!

If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:

includes:
	- vendor/phpstan/phpstan/conf/bleedingEdge.neon

Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more

Improvements 🔧

Bugfixes 🐛

Function signature fixes 🤖

  • 3rd parameter of htmlentities and htmlspecialchars allows null (#3644), thanks @sreichel!
  • Update curl_setopt string values and allow nullable (#3634), thanks @xPaw!* bccomp: more precise return type (#3647), thanks @claudepache!

Internals 🔍

  • FunctionCallParametersCheck: Add native parameter type (#3641), thanks @staabm!
  • Refactor TryRemove/Accepts for DateTime|DateTimeImmutable and Exception|Error (#3654), thanks @VincentLanglet!
  • Implement Scope::getPhpVersion() (#3642), thanks @staabm!
  • Non-capturing catch support detection is scope PHP-version dependent (#3663), #12114, thanks @staabm!
  • Remove shortArraySyntax definition in Printer::__construct() (#3680), thanks @samsonasik!