Bleeding edge 🔪
- More precise
file()
flags args (#2476, #2482), thanks @staabm! - Non-static methods cannot be used as static callables in PHP 8+ (#2420), thanks @staabm!
- More precise
flock()
operation flags (#2477), thanks @staabm! - Rule for
call_user_func()
(#2479), thanks @staabm!
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 🔧
- Add return type extension for
constant()
(#2474), thanks @herndlm! - Dynamic
assert()
throw type extension (#2427), thanks @patrickkusebauch! - Update nikic/PHP-Parser (phpstan/phpstan-src@79b3034)
- PHP 8.3:
json_validate()
stub (phpstan/phpstan-src@828b269), thanks @staabm! - Implement
call_user_func()
DynamicFunctionReturnTypeExtension (#2479), thanks @staabm!
Bugfixes 🐛
- Add support for math with constant numeric string (#2209), #8803, #8827, thanks @VincentLanglet!
- Use case insensitive matching to detect usages of private methods (#2484), #8346, thanks @stof!
- fix array_splice with non-array replacement (#2457), thanks @schlndh!
- Resolve key and value type of partially non-iterable types when entering foreach (phpstan/phpstan-src@cb5a2b4), #9535, #4907, #8924, #5998
- Foreach can append to the array but it does not change the number of iterations (phpstan/phpstan-src@27085c5), #4612
- MutatingScope - process left side of BooleanAnd and BooleanOr before getting type of the whole expression (phpstan/phpstan-src@989dd6f), #5365, #6551, #7491, #4004, #2499
- MutatingScope - process ternary cond before getting type of the whole expression (phpstan/phpstan-src@faba805)
- Fix processing switch with complex case conditions (phpstan/phpstan-src@f6b34f2), #5326
- Fix ClassConstFetch Identical specification with Yoda conditions (#2498), #9542, thanks @herndlm!
Function signature fixes 🤖
- Update functionMap for ext-mongodb 1.16 (#2473), thanks @alcaeus!
- Add false to the
db2_num_rows()
return type (#2456), thanks @morozov! - More precise
ignore_user_abort()
return type (#2489), thanks @staabm!
Internals 🔍
- Type projections, part 1: call-site variance in GenericObjectType (#2471), thanks @jiripudil!
- Test PHP 8.3 (#2486)
- Cleanup NodeScopeResolver (#2499), thanks @staabm!