Improvements 🔧
- Support for match expression (PHP 8)
- Support for nullsafe operator (PHP 8)
- Check for no longer supported
(unset)
cast (PHP 8) (https://github.com/phpstan/phpstan-src/commit/56471f6c5e8c933e9098443e5f7492eca9cfc9ed)
current()
dynamic return type extension (https://github.com/phpstan/phpstan-src/commit/dafba25bd501931a5076b721ffff5906a2e6cc05), #2539
- OffsetAccessWithoutDimForReadingRule cannot be ignored (https://github.com/phpstan/phpstan-src/commit/450592cf774363e0eb5d44a190c0c1f234993258)
- Updated
jetbrains/phpstorm-stubs
(https://github.com/phpstan/phpstan-src/commit/fa8a365e03f95023c4d9ab1709db6e2cecd76ec6)
- Detect parameter type widening violation before PHP 7.2 (https://github.com/phpstan/phpstan-src/commit/456f4435ae304fa1a115d7768f6d6326af25b4ec)
- Improve comparison operators (#372), thanks @jlherren!
- Check also AssignRef in all assignment rules (https://github.com/phpstan/phpstan-src/commit/16392131928ed7ada416484b6443f5bc8e709ae0)
- Running with
--debug -vvv
will show how much memory each file consumes (https://github.com/phpstan/phpstan-src/commit/29f89385724a5dc5bbb66e515cb182c5d60a4634)
Bugfixes 🐛
- Fix
range()
with string arguments (https://github.com/phpstan/phpstan-src/commit/67a905a920ce590ac38be7a85f3642c00441b9a7), #2378
- Assertions done on a variable used in a closure should be transferred inside the closure (https://github.com/phpstan/phpstan-src/commit/36dac3de0330aff1b276f6c4e0dfa65f56588437)
- More precise spaceship operator type (https://github.com/phpstan/phpstan-src/commit/1a4f8b3e8659e7ecd2efbb26e96ade42a2c709fb)
- Merging scopes in root scope - create maybe-existent variables from the other scope too (https://github.com/phpstan/phpstan-src/commit/310cb839326b462d75ccb000ea2d77b4c58950ae), #4070
- Int and float toString() produces numeric-string (#371), #4005, thanks @b1rdex!
- Fix unreachable statement after switch with conditional break (https://github.com/phpstan/phpstan-src/commit/46c39e8d456a44eb3bdcea1a65d5c05bef1ae3e0), #4076
- Fix detecting unused constructor parameters when func_get_args() is involved (https://github.com/phpstan/phpstan-src/commit/37c6bbc8ec643c9ac27a962086d84d749870588f), #1917
- Support ARRAY_FILTER_USE_KEY and ARRAY_FILTER_USE_BOTH (https://github.com/phpstan/phpstan-src/commit/138cabd75aa923eff9f320675e905dafc2c3dc49), #3132
- Fixed compatibility with PHP 7.1 (https://github.com/phpstan/phpstan-src/commit/98b5509441032c004b44219e2214c4cce067d89c)
- Parallel analysis - listen to error on Encoder (https://github.com/phpstan/phpstan-src/commit/1fd761d139902f419fb3f7ee0313309e9c951aec, https://github.com/phpstan/phpstan-src/commit/95101a01350698ecaa447fbf791516b8f0a5ccee, https://github.com/phpstan/phpstan-src/commit/14928bf41fbe80ba68ab484e138138442d1cef4a)
- Fix IntegerRangeType overflowing (#372), #4010, thanks @jlherren!
- Add missing pre/post inc/dec type specifiers in conditions (#372), thanks @jlherren!
- Map phpDoc parameter names for native methods because stub parameter names might be different (https://github.com/phpstan/phpstan-src/commit/9afec60a1caa9eaa5799fb1bb8dd5a17776f02a9), #4084
Function signature fixes 🤖
- Add "base64" as key for
stream_get_meta_data
(#369), thanks @SvenRtbg!
- PDOStatement::getColumnMeta can return false (https://github.com/phpstan/phpstan-src/commit/9d5f0534753ae507f0c55f817667fc5a2d916349)
- ceil() never returns int (#373), thanks @jlherren!