1.10.48
版本发布时间: 2023-12-08 22:35:18
phpstan/phpstan最新发布版本:1.12.6(2024-10-06 23:06:59)
Bleeding edge 🔪
- TooWideMethodReturnTypehintRule - always report for final methods (https://github.com/phpstan/phpstan-src/commit/c30e9a484c8245b8126cd63444607ca74d2af761)
- LogicalXorConstantConditionRule (https://github.com/phpstan/phpstan-src/commit/3a12724fd636b1bcf36c22b36e8f765d97150895, https://github.com/phpstan/phpstan-src/commit/3b011f6524254dad0f16840fdcfdbe7421548617), #7539
- NoopRule - report top-level
xor
because that's probably not what the user intended to do (https://github.com/phpstan/phpstan-src/commit/a1fffb3346e09f1e8e8d987d4282263295a55142), #10267 - Report unused results of
and
andor
(https://github.com/phpstan/phpstan-src/commit/1d8fff637d70a9e9ed3f11dee5d61b9f796cbf1a) - Report unused result of ternary (https://github.com/phpstan/phpstan-src/commit/9664f7a9d2223c07e750f0dfc949c3accfa6b65e)
- Report unused results of
&&
and||
(https://github.com/phpstan/phpstan-src/commit/cf2c8bbd9ebd2ebe300dbd310e136ad603d7def3)
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 🔧
- Narrow
ReflectionEnum::getName()
afterReflectionEnum::isBacked()
(#2806), #10192, thanks @franmomu! - Any variable can exist after include/require (https://github.com/phpstan/phpstan-src/commit/0a3a968b86773a54e102baee4f63d39a556c97fc), https://github.com/phpstan/phpstan/discussions/10252
Bugfixes 🐛
- ResolvedPhpDocBlock: fix parent return tag merging (#2803), #6462, #10208, #3580, #4396, thanks @janedbal!
- Merge in-foreach scope even for non-iterable expr (https://github.com/phpstan/phpstan-src/commit/942afbf060419bae5977651bff3102b63ea42206)
- TooWideMethodReturnTypehintRule - never report in a trait (https://github.com/phpstan/phpstan-src/commit/e0eb85028d55ebab32be614631639c142b37daa6)
- Narrowing list type with
count()
results in type loss (#2811), #10264, thanks @staabm! - Fix LevelsTestCase for PHPUnit 10 (https://github.com/phpstan/phpstan-src/commit/fa5d5f958b051b088fb0824d377a091273d6436c)
Function signature fixes 🤖
- Update return type information for
SimpleXMLElement::addChild
(#2808), #10269, thanks @DaveLiddament!
1、 phpstan.phar 21.4MB
2、 phpstan.phar.asc 833B