Improvements 🔧
- Configurable result cache path (https://github.com/phpstan/phpstan-src/commit/518b20dc47138a7347357bf9fcbb6b339973c088), #3755
- StubValidator - analyse only project stub files (https://github.com/phpstan/phpstan-src/commit/f956c6d1dcf46152d29275cda2aad4bf3c81c022)
- Update phpstorm-stubs (https://github.com/phpstan/phpstan-src/commit/fb95fabcb98b2485175e007a9ce74962d7c8be87)
- ResultCacheManager - remove
parametersSchema
before comparing config files (https://github.com/phpstan/phpstan-src/commit/2a87b3af4a2f2e431595971518e99065adb3c2f7)
Bleeding edge 🔪
- Check
DateTime
instantiation (#380), thanks @b1rdex!
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 🐛
- Concat between numeric and empty string produces numeric string (#378), thanks @jlherren!
- Fix array dim fetches with
treatPhpDocTypesAsCertain: false
(https://github.com/phpstan/phpstan-src/commit/a9ec1746ef4143d59278372ee2a8f8fe2764007f), #4099
- Fixed expression assignment throwing away native expression types for
treatPhpDocTypesAsCertain: false
(https://github.com/phpstan/phpstan-src/commit/64da8f9c05f39125e1a9be00c18690aacd284204), #3760
- Result cache - fix result cache save and restore with Neon with statements (https://github.com/phpstan/phpstan-src/commit/602c71877c75faf7efcb0090eb4039a2c3b72d3d), #4125
- Catch more BetterReflection errors (https://github.com/phpstan/phpstan-src/commit/3e8ec5f0d4ecf3df531c9f674345508a8e1e51fa), #4135
- Fixed SimpleXMLElement cast to boolean (https://github.com/phpstan/phpstan-src/commit/83c1e0b830db4f072e4c139b239b546f1acf4276), #3965, #2997
- hrtime(true) returns benevolent union type (https://github.com/phpstan/phpstan-src/commit/2a39e5a41185d892c2b55c130950bfda60f91d10), #3650
Function signature fixes 🤖
- Fix Reflection::getStaticProperties()'s return type (#377), thanks @jlherren!
mysqli_get_client_info()
argument is optional (https://github.com/phpstan/phpstan-src/commit/b01c6c9f71b4e46f6a2505e335dc1000882169ad), #4013
- Fixed
RedisArray::__construct()
(https://github.com/phpstan/phpstan-src/commit/3e956033ad718b56c607f026bd670613db02f151), #3688
- Fix
DateTime
/DateTimeImmutable::getLastErrors()
return types (#380), thanks @b1rdex!
- Use dynamic return type extension for
mb_str_split
(#379), thanks @VincentLanglet!
XMLWriter::*Ns()
can accept null in$prefix
(#383), thanks @spaze!
- Support for numeric string in bc math (#382), thanks @aszenz!
- Fix socket_select's signature https://www.php.net/manual/en/function.socket-select.php (#385), thanks @szepeviktor!
- Fix imageColorAllocate* and imageColorAt return type declarations https://www.php.net/manual/en/function.imagecolorallocate.php#refsect1-function.imagecolorallocate-returnvalues (#386), thanks @mundschenk-at!