Improvements 🔧
ExceptionTypeResolver
as an interface allowing for custom implementations (phpstan/phpstan-src@a125304, phpstan/phpstan-src@dec03af), #5044- Stub for
RecursiveArrayIterator
(phpstan/phpstan-src@8c33955) - RuleTestCase - throw internal errors (phpstan/phpstan-src@93806cb)
- Updated BetterReflection (phpstan/phpstan-src@de00c86)
Bleeding edge 🔪
- Backward Compatible PHPStan API rules (phpstan/phpstan-src@8a05e0d)
- Inspect types for missing typehints recursively (phpstan/phpstan-src@2f456b9), #5148
- Inspect prefixed PHPDocs for invalid types recursively (phpstan/phpstan-src@003d235), #3723
- Inspect unresolvable types in PHPDoc recursively (phpstan/phpstan-src@1de5de8), #3753
- Intersect array key type with
int|string
(phpstan/phpstan-src@724c8ba), #3753 - Detect unresolvable return type after generic function call (phpstan/phpstan-src@9070c5b)
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
Bugfixes 🐛
- Editor URL - fix for traits (phpstan/phpstan-src@bb841d2), #5030
- Allow
TARGET_PROPERTY
attributes on promoted properties (#528), #4418, thanks @dbrekelmans! - More verbose messages for
IntegerRangeType
(phpstan/phpstan-src@d23b4b7) - Throw type in result cache (phpstan/phpstan-src@30ec3a0), #5056
- Result cache - fix noticing changed extended interfaces (phpstan/phpstan-src@d53a9a1), #5056
- Correct VerbosityLevel in TooWide*ReturnType rules (phpstan/phpstan-src@838d1e4), #5095, #4967, #3748
- CallToFunctionStamentWithoutSideEffectsRule - do not report PHPStan testing functions (phpstan/phpstan-src@6eaf6c2)
- Turns out static property can be accessed on trait too (phpstan/phpstan-src@688a87f), #5143
- Reset ObjectType caches after stub validation (phpstan/phpstan-src@33c9bdc), #5153
- TypeCombinator - fix intersecting BenevolentUnionType (phpstan/phpstan-src@57e3cbf)
Function signature fixes 🤖
- Fix
implode()
with named arguments (phpstan/phpstan-src@18f8473), #5018 intdiv()
throw extension (#527), thanks @VincentLanglet!- Add
SimpleXMLElement
constructor throw type extension (#532), thanks @VincentLanglet! - functionMap - remove duplicate keys (phpstan/phpstan-src@e1efa03), #5049
uopz_set_hook
fixes (phpstan/phpstan-src@4effc89)- Fix Date throw type extensions (#531), thanks @VincentLanglet!
- Fixed signatures of
gmp_div
,odbc_exec
andunregister_tick_function
(#533), thanks @danielmarschall! - Updated
phpstorm-stubs
(phpstan/phpstan-src@bba6631) - Updated PHP 8 stubs (phpstan/phpstan-src@fcb5c12, phpstan/phpstan-src@1aa9af8, phpstan/phpstan-src@63f40f1, phpstan/phpstan-src@10a833f), #5137
- Update return type hint for
stream_bucket_make_writeable
(#537), thanks @bytestream! - Make second parameter of
toPHP
optional (#543), thanks @franmomu! - Revert Incorrect return type for
SplFileObject::fgetcsv()
(#479), thanks @VincentLanglet! - Correct the signature of
mysqli_get_client_version()
(#545), thanks @johnbillion! - Dynamic return type for
number_format
(#553), thanks @BackEndTea! - Reflection throw type extensions (#552), thanks @VincentLanglet!