PHPStan v0.12.59 Release Notes
Release Date: 2020-12-07 // about 4 years ago-
๐ Bugfixes ๐
- Ignore NeverType in subtractable types (#389), thanks @jlherren!
- Try fixing CpuCoreCounter problem (phpstan/phpstan-src@0e32301), #4147
- is_a(): specify class-string types if allow_string: true (#392), #4124, thanks @jiripudil!
- CallableType: accept [class-string, constant-string] array as callable (#394), #2880, thanks @jiripudil!
- ๐ is_a(): support class-string in parameter $class (#393), #2799, thanks @jiripudil!
- ๐ Support "null" and "false" pseudotypes in native unions (#400), #4198, #4179, thanks @jiripudil!
๐ฑ Function signature fixes ๐ค
Previous changes from v0.12.58
-
๐ Improvements ๐ง
- ๐ง Configurable result cache path (phpstan/phpstan-src@518b20d), #3755
- StubValidator - analyse only project stub files (phpstan/phpstan-src@f956c6d)
- โก๏ธ Update phpstorm-stubs (phpstan/phpstan-src@fb95fab)
- ๐ ResultCacheManager - remove
parametersSchema
before comparing config files (phpstan/phpstan-src@2a87b3a)
๐ฑ Bleeding edge ๐ช
๐ 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
(phpstan/phpstan-src@a9ec174), #4099 - ๐ Fixed expression assignment throwing away native expression types for
treatPhpDocTypesAsCertain: false
(phpstan/phpstan-src@64da8f9), #3760 - โช Result cache - fix result cache save and restore with Neon with statements (phpstan/phpstan-src@602c718), #4125
- ๐ Catch more BetterReflection errors (phpstan/phpstan-src@3e8ec5f), #4135
- ๐ Fixed SimpleXMLElement cast to boolean (phpstan/phpstan-src@83c1e0b), #3965, #2997
- hrtime(true) returns benevolent union type (phpstan/phpstan-src@2a39e5a), #3650
๐ฑ Function signature fixes ๐ค
- ๐ Fix Reflection::getStaticProperties()'s return type (#377), thanks @jlherren!
mysqli_get_client_info()
argument is optional (phpstan/phpstan-src@b01c6c9), #4013- ๐ Fixed
RedisArray::__construct()
(phpstan/phpstan-src@3e95603), #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!