Improvements 🔧
- Support
@pure
and@phpstan-pure
annotations (#412), thanks @b1rdex!
- Support
@impure
and@phpstan-impure
(#412)
- It closes these issues: #3746, #3844, #4301, #2105, #929, #1826
Bleeding edge 🔪
- Detect stub file added multiple times (https://github.com/phpstan/phpstan-src/commit/4a82eec4044e900be192096d58f04b4e2be80a0a)
- BooleanAndConstantConditionRule - check LogicalAnd (https://github.com/phpstan/phpstan-src/commit/40a76e88d0866f7d541e0e43364de07c5a94c465)
- BooleanOrConstantConditionRule - check LogicalOr (https://github.com/phpstan/phpstan-src/commit/ae9a558484dc4f330873e962b8dc1b2d18f0c9b7)
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.
Bugfixes 🐛
- Fix return type of arrow function (https://github.com/phpstan/phpstan-src/commit/e9b783a5e427dcd058ea72f07cb1ce44b8ee8ba7), #4339
- Apply conditional expressions for non-empty arrays inside foreach (https://github.com/phpstan/phpstan-src/commit/35db779fac3363f3f083ccf04d441e88ba0bd3ac), #4343
Function signature fixes 🤖
- Updated return values for
zip_open()
(#419), #4341, thanks @spud!
- Updated PHP 8 stubs (https://github.com/phpstan/phpstan-src/commit/d586b939265af336cfec3ec4d712a41146a46322)
- Improved
setcookie()
andsetrawcookie()
signatures (https://github.com/phpstan/phpstan-src/commit/ccb1d4d4141b23ba87c1762294f54da219d930b1), #4348
array_combine()
dynamicExtension (#418), thanks @VincentLanglet!
array_rand()
return type extension (#417), thanks @VincentLanglet!
- Update
ctype_*
function signature (#421), thanks @BackEndTea!