1.12.6
版本发布时间: 2024-10-06 23:06:59
phpstan/phpstan最新发布版本:1.12.6(2024-10-06 23:06:59)
Bleeding edge 🔪
- Added absent type checks about
@phpstan-assert
PHPDoc tags (https://github.com/phpstan/phpstan-src/commit/ca0a7e9955397eef453b38c94ac67ba6faf7356b), #11780
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 nikic/php-parser to v4.19.4 (https://github.com/phpstan/phpstan-src/commit/0b9ce98cfad4a1f7e98e85c2cbd813025dbafa77)
- Process
ClassConstFetch::$class
when it's a Name node (https://github.com/phpstan/phpstan-src/commit/712c33e02ea2d95542cd333a493e276b22399773) - Process
ClassConstFetch::$name
(https://github.com/phpstan/phpstan-src/commit/b38c852c7c9e1e49baa0dc8700dd13df531d0938) - Fix unused private property is not sometimes detected (#3539), #11802, thanks @staabm!
Bugfixes 🐛
- Fixes for
lowercase-string
- Keep lowercase when trim (#3491), thanks @VincentLanglet!
- Add support for str_repeat and str_pad for lowercase string (#3490), thanks @VincentLanglet!
- Update ReplaceFunctionsDynamicReturnTypeExtension for lowercase-string (#3489), thanks @VincentLanglet!
- Update parse_str for lowercase string (#3492), thanks @VincentLanglet!
- More precise
IntegerRangeType::toString()
(#3475), thanks @staabm! - Add support for lowercase-string on parse_url() (#3493), thanks @VincentLanglet!
- Improve Vsprintf inference (#3496, #3501), thanks @VincentLanglet!
- Offset access on lowercase-string is lowercase-string (#3502), thanks @staabm!
- IntegerType::toString() is lowercase (#3510), thanks @VincentLanglet!
- Handle lowercase string in sprintf (#3498), thanks @VincentLanglet!
- Update composer/pcre (https://github.com/phpstan/phpstan-src/commit/3cdac94e67bf8e508b150e9ee0e3075b3105ad19), #11786
- Fix a few regex class parsing usecases (#3488), thanks @mvorisek!
- Fix preg_match_all with PREG_SET_ORDER does not see capture group as optional (#3506), #11661, thanks @staabm!
- Fix false-positive with preg_match(): Strict comparison using === between '' and non-falsy-string…ween '' and non-falsy-string (#3509), #11744, thanks @staabm!
Function signature fixes 🤖
- functionMap: a bit more precise get_defined_constants (#3537), thanks @janedbal!
- token_name() returns non-empty-string (#3540), thanks @staabm!
- curl_multi_getcontent() can return null (#3527), thanks @staabm!
- Update SplFileInfo::getPathInfo return type (#3487), thanks @DannyvdSluijs!
- Update return type of
spl_autoload_functions
on PHP8.0+ (#2810), thanks @ManuelHu!
Internals 🔍
- Fix missing ltrim in regex parse (#3495), thanks @mvorisek!
- Un-deprecate ConstantTypeHelper (https://github.com/phpstan/phpstan-src/commit/3a83f6bec7eb4724d4f1b6c2dedbfe46c0b1112a)
- Introduce
Scope::getMaybeDefinedVariables()
(#3521), #11772, thanks @ruudk! - TypeInferenceTestCase: allow asserting array offset certainty (#3503), thanks @ruudk!
- Simplify preserveKeys TrinaryLogic creation in two extensions (#3516), thanks @herndlm!
- Add
Type::sliceArray()
(#3514) (#3514), thanks @herndlm! - Set normalized in BenevolentUnionType (#3522), thanks @herndlm!
- Refactor RegexGroupParser for more immutability and less pass-by-ref (#3508), thanks @staabm!
1、 phpstan.phar 22.5MB
2、 phpstan.phar.asc 833B