1.10.15
版本发布时间: 2023-05-09 23:30:55
phpstan/phpstan最新发布版本:1.12.6(2024-10-06 23:06:59)
Bleeding edge 🔪
- InvalidPhpDocTagValueRule: include PHPDoc line number in the error message (https://github.com/phpstan/phpstan-src/commit/a04e0be832900749b5b4ba22e2de21db8bfa09a0)
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
Improvements 🔧
- Update phpdoc-parser to 1.20.4
- Changelog
- Notable changes:
- CallableTypeNode - support object shape in return type
- CallableTypeNode - support
$this
in return type - CallableTypeNode - support ConstTypeNode in return type
- Implement IniGetReturnTypeExtension (#2362), #3063, thanks @staabm!
- PHPStan\Node\ClassMethod is covered by BC promise (https://github.com/phpstan/phpstan-src/commit/1036d199c8ef24c62ca5026c911c0af6ef6d9058), #9249
- Enforce magic
__serialize()
and__unserialize()
return types (#2372), thanks @staabm! - Report
?->
call on always-null (https://github.com/phpstan/phpstan-src/commit/74d1c9a1ca1cd6199a8771444e9bc4d6b7737f46), #9284
Bugfixes 🐛
- Fix object shapes with interfaces and final classes (https://github.com/phpstan/phpstan-src/commit/f199980c3c436636cae59502da178c4c804efb38)
- Fix
ConstantFloatType::toPhpDocNode()
for whole numbers ending with 0 (#2355), thanks @rvanvelzen! - Add type for ini_get() 'default_socket_timeout' and 'precision' (#2365), thanks @staabm!
- Fix Docker detection (https://github.com/phpstan/phpstan-src/commit/8d0c032d19cd6ca9bb8462f8cf74362b2b4a6ae9)
- strval accepts Stringable (https://github.com/phpstan/phpstan-src/commit/3a4cd59e46e72fe26119ab356e62a288367643d4), #9283
-
CURLOPT_HTTPHEADER
should not accept a dictionary (#2369), #9263, thanks @staabm!
Function signature fixes 🤖
-
intval()
andfloatval()
should handle non-scalar values (#2351), thanks @dravnic! - More precise
strval()
family function signatures (#2354), thanks @dravnic!
Internals 🔍
- Allow referencing StringAlwaysAcceptingObjectWithToStringType in functionMap (https://github.com/phpstan/phpstan-src/commit/670d04d817134929a48e9313525a328f648fa422)
1、 phpstan.phar 20.74MB
2、 phpstan.phar.asc 833B