PHPStan v0.12.55 Release Notes
Release Date: 2020-11-14 // over 3 years ago-
👌 Improvements 🔧
- Support for match expression (PHP 8)
- 👌 Support for nullsafe operator (PHP 8)
- 👍 Check for no longer supported
(unset)
cast (PHP 8) (phpstan/phpstan-src@56471f6) current()
dynamic return type extension (phpstan/phpstan-src@dafba25), #2539- OffsetAccessWithoutDimForReadingRule cannot be ignored (phpstan/phpstan-src@450592c)
- ⚡️ Updated
jetbrains/phpstorm-stubs
(phpstan/phpstan-src@fa8a365) - Detect parameter type widening violation before PHP 7.2 (phpstan/phpstan-src@456f443)
- 👌 Improve comparison operators (#372), thanks @jlherren!
- Check also AssignRef in all assignment rules (phpstan/phpstan-src@1639213)
- ⚙ Running with
--debug -vvv
will show how much memory each file consumes (phpstan/phpstan-src@29f8938)
🛠 Bugfixes 🐛
- 🛠 Fix
range()
with string arguments (phpstan/phpstan-src@67a905a), #2378 - Assertions done on a variable used in a closure should be transferred inside the closure (phpstan/phpstan-src@36dac3d)
- More precise spaceship operator type (phpstan/phpstan-src@1a4f8b3)
- 🔀 Merging scopes in root scope - create maybe-existent variables from the other scope too (phpstan/phpstan-src@310cb83), #4070
- Int and float toString() produces numeric-string (#371), #4005, thanks @b1rdex!
- 🛠 Fix unreachable statement after switch with conditional break (phpstan/phpstan-src@46c39e8), #4076
- Fix detecting unused constructor parameters when func_get_args() is involved (phpstan/phpstan-src@37c6bbc), #1917
- Support ARRAY_FILTER_USE_KEY and ARRAY_FILTER_USE_BOTH (phpstan/phpstan-src@138cabd), #3132
- 🛠 Fixed compatibility with PHP 7.1 (phpstan/phpstan-src@98b5509)
- Parallel analysis - listen to error on Encoder (phpstan/phpstan-src@1fd761d, phpstan/phpstan-src@95101a0, phpstan/phpstan-src@14928bf)
- 🛠 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 (phpstan/phpstan-src@9afec60), #4084
🍱 Function signature fixes 🤖
- Add "base64" as key for
stream_get_meta_data
(#369), thanks @SvenRtbg! - PDOStatement::getColumnMeta can return false (phpstan/phpstan-src@9d5f053)
- ceil() never returns int (#373), thanks @jlherren!