Skip to content

1.7.0

Compare
Choose a tag to compare
@phpstan-bot phpstan-bot released this 23 May 15:17
· 230 commits to 1.7.x since this release
509b3d6

This release closes 25 issues! 🥳

Major new features 🚀

Bleeding edge 🔪

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 🔧

  • Allow setting error format in configuration file (#841), thanks @ruudk!
  • Deprecated PHPStan\Type\ConstantTypeHelper::getTypeFromValue(). Instead of going from runtime value -> PHPStan type, use PHPStan\Reflection\InitializerExprTypeResolver::getType() to go from Expr -> PHPStan type. In case you have Scope available, use Scope::getType().
  • Read default values from php-8-stubs and jetbrains/phpstorm-stubs (phpstan/phpstan-src@7ce177e)
  • Normalize named arguments when calling extensions (#1301, #1313), #5866, thanks @staabm!
  • implement str-case functions return type extension (#1325), thanks @staabm!
  • ClearResultCacheCommand: allow --debug flag (phpstan/phpstan-src@5f5b96d)

Bugfixes 🐛

Function signature fixes 🤖

  • Replace var_export() extension with conditional-type stub (#1244), thanks @staabm!
  • Use conditional types for is_a() via stub (#1310) (#1310, #1311), #4371, thanks @staabm!
  • Narrow the type for the mb_ereg_replace_callback() callable. (#1316), thanks @johnbillion!
  • Add an array shape for the elements returned by DateTimeZone::getTransitions(). (#1315), thanks @johnbillion!
  • Fix incorrect argument for RedisCluster::getOption() and RedisCluster::setOption() (#1334), thanks @taka-oyama!