| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| phpstan.phar | 2025-11-11 | 25.6 MB | |
| phpstan.phar.asc | 2025-11-11 | 833 Bytes | |
| 2.1.32 source code.tar.gz | 2025-11-11 | 3.9 MB | |
| 2.1.32 source code.zip | 2025-11-11 | 3.9 MB | |
| README.md | 2025-11-11 | 12.4 kB | |
| Totals: 5 Items | 33.4 MB | 0 | |
Improvements 🔧
- [PHP 8.5] Pipe operator support (https://github.com/phpstan/phpstan-src/commit/e9df52e53e35d58f06b36996c3c06d92020011c9)
- [PHP 8.5] Report deprecated casts (https://github.com/phpstan/phpstan-src/commit/d0a77d12587389bb76bed430c9d23a1cda41459c)
- [PHP 8.5] Report deprecated backtick operator (https://github.com/phpstan/phpstan-src/commit/9405233e26ed633018f875d3c648d154a389616d)
- [PHP 8.5] Added PHP_BUILD_DATE type (#4468), thanks @staabm!
- [PHP 8.5] Global constants support attributes (https://github.com/phpstan/phpstan-src/commit/6958f86247d639accaa6c8fbd79560e37f916d3d)
- [PHP 8.5] Add support for FILTER_THROW_ON_FAILURE for filter_var (#4495), thanks @canvural!
- [PHP 8.5] Add
array_firstandarray_lastreturn type extensions (#4499) (#4499), thanks @canvural! - [PHP 8.5] Support for deprecated traits (https://github.com/phpstan/phpstan-src/commit/f0675a7b6578f4c93d915be5e356554a3c373b24)
- [PHP 8.5] Support for
#[Override]on properties (https://github.com/phpstan/phpstan-src/commit/8b85e62de107c5a5ebaddbe42ea3f077f71a6a5d) - [PHP 8.5] clone with support (https://github.com/phpstan/phpstan-src/commit/5a9471ae58ccbd842417142c2b8984d860400570)
- [PHP 8.5] Support for
Closure::getCurrent()(https://github.com/phpstan/phpstan-src/commit/e3ac5ee8cfac0b3319c3667b7e123de2ad8aaf1b) - [PHP 8.5] Support for casts in constant (initializer) expressions (https://github.com/phpstan/phpstan-src/commit/df5ede59e2f9df1cae6d9e2ce5107600203ca56d)
- [PHP 8.5] Support for first class callables in constant expressions (initializers) (https://github.com/phpstan/phpstan-src/commit/f436abf03f7d5ae887645c9c80f5c215060388da)
- [PHP 8.5] Support for static Closures in constant expressions (initializers) (https://github.com/phpstan/phpstan-src/commit/ab704f48435bf053605dfc5cc8aa1d36a466e0b4)
- [PHP 8.5] Support for asymmetric visibility in static properties (https://github.com/phpstan/phpstan-src/commit/8b2b97ff186c3be2333a76ba85a2b998cc36eafd)
- NodeCallbackInvoker interface to invoke all PHPStan rules on a synthetic AST node (#4429)
- The interface NodeCallbackInvoker can be typehinted in 2nd parameter of
Rule::processNode() - See full [explanation](https://apiref.phpstan.org/2.1.x/source-src.Analyser.NodeCallbackInvoker.html#32
- CompositeRule can be used to test rules using NodeCallbackInvoker (#4438), thanks @staabm!
- InvalidIncDecOperationRule - make aware of deprecation of
--(PHP 8.3) and++(PHP 8.5) on non-numeric strings (https://github.com/phpstan/phpstan-src/commit/0ff7e4419c565a16366d8c5bf4febb723f0b5ada) - InvalidIncDecOperationRule - make aware of more deprecations (https://github.com/phpstan/phpstan-src/commit/3d6bbe4b24c2b5cb0ace4707de8d92e7d5391cbf)
- InvalidPromotedPropertiesRule - report
finalin promoted property on PHP < 8.5 (https://github.com/phpstan/phpstan-src/commit/e5de6b8c545663dde92a970a6169473f31c9b5b1) - The
(void)cast is supported only on PHP 8.5 and later. (https://github.com/phpstan/phpstan-src/commit/53b87e0a09ac5ef7feabe24eccdc078549deb509) - Rules about
#[NoDiscard]report errors only on PHP 8.5+, errors are non-ignorable (https://github.com/phpstan/phpstan-src/commit/d00b76927fc32aaa4ebaa8ea35cb80b4f496a9db) - Rules about
#[NoDiscard]report when call is in(void)cast but should not (https://github.com/phpstan/phpstan-src/commit/099b87a7f219a9c7e36eb64c613e8e4fff697252) - Understand always-overwritten arrays in foreach (#4534), [#2273], [#13730]
- Support writing to array in foreach with value-by-ref (#4537)
- Report unknown parameter for implicit variadic methods (#4481) (#4481), [#13719], thanks @VincentLanglet!
- IgnoreErrorExtension is a valid conditional tag (#4488), thanks @staabm!
- Reduce file-parsing in ResultCacheManager (#4491), thanks @staabm!
- Faster AutowiredAttributeServicesExtension->processParameters() (#4489) (#4489), thanks @staabm!
- Detect duplicated args passed to a variadic parameter (#4498), [#13710], thanks @takaram!
- Add support for statement in conditional tags (#4512), thanks @VincentLanglet!
- Include identifier in
gitlaberror format (#4421), thanks @spawnia! - PropertyInClassRule - move supportsPropertyHooks check to bottom to have more errors reported (https://github.com/phpstan/phpstan-src/commit/6ccdba2d64f03e89147e45c3c6f5fc0ec6711eae)
- TooWideMethodThrowTypeRule - new opt-in option for reporting too-wide implicit (inherited)
@throws(https://github.com/phpstan/phpstan-src/commit/b6a2e0fc440c902f76ee268230e4bd1c4eee1b33), [#13696], [#13671]
Bugfixes 🐛
- Fixed infinite recursion with late-resolvable types (https://github.com/phpstan/phpstan-src/commit/7f3ad701f605441d454a1af957d20556d0691d3b), [#13685]
- Infer
non-empty-list/arrayafterarray_key_exists($i, $arr)(#4440) (#4440), thanks @staabm! !array_key_exists()should implyarrayfor PHP8+ (#4417), [#6209], [#13301], thanks @staabm!- Invalidate native expression types after clearstatcache call (#4448) (#4448), [#11484], thanks @VincentLanglet!
- Use the same scalar limit for sprintf and concat (#4454), [#13378], thanks @VincentLanglet!
- Handle impure/throw point of inherited constructors of anonymous classes (#4455), [#13698], thanks @takaram!
- Adjust a bunch of places for first-class callables and nullsafe operators (https://github.com/phpstan/phpstan-src/commit/e437c5ad60d3ea6c24cf4fd4c79f5957ec110d67)
- Fix sprintf() types and placeholders (#4463), thanks @staabm!
- Fix return type inference from immediately invoked closure (https://github.com/phpstan/phpstan-src/commit/3702305075f4cf04670e73ea2ec836b22bb9c0b3)
- Fix crashes in ParametersAcceptorSelector (#4467), [#13714], thanks @staabm!
- Fix null coalesce false positive for multi-dimensional array in loop (#4475), thanks @schlndh!
- Fix type of clone expression (https://github.com/phpstan/phpstan-src/commit/020adb548011c098cdb2e061019346b0a838c6a4)
- Ensure that JetBrains terminal sees correct relative path (#4479), [#13697], thanks @caufang!
- Fix for losing
array_key_existsinference when adding a false condition (#4473) (#4473), [#11276], thanks @staabm! - Fix filter var on uncertainty flags (#4418), [#11485], thanks @VincentLanglet!
- TestCaseSourceLocatorFactory - skip polyfills based on PHP version (https://github.com/phpstan/phpstan-src/commit/f63b42370cff76ec2ed3bfe6b6a1365c63022b7c)
- Fix
composerAutoloaderProjectPathsarray so that the items always refer to dir with composer.json in it (#4522), https://github.com/phpstan/phpstan-doctrine/issues/646 - Add support for union of constant integer for filter_var (#4519), thanks @VincentLanglet!
- Child class of parent class that uses a trait with a constant can redeclare the constant with a different value (https://github.com/phpstan/phpstan-src/commit/9f415ae87a4a60c74572820be7b9d5dcd22c905e), [#13119]
Function signature fixes 🤖
- Make
BcMath\Number::$valuenumeric-string(#4505), thanks @schlndh!
Internals 🔍
- SimultaneousTypeTraverserTest for improved UnionType implementation (https://github.com/phpstan/phpstan-src/commit/0bddac1501c823782d5fde25f75a61c8d0135189)
- Fix
BenevolentUnionType::traverseSimultaneously()(https://github.com/phpstan/phpstan-src/commit/856a9f1aab354e52ec1211753299bac6c40853d1) - Improve
IntersectionType::traverseSimultaneously()for arrays (https://github.com/phpstan/phpstan-src/commit/0693e5aff60577310b71bfe10a1bf2c2d09f86d4) - Changelog generator: Use better API to associate commit with a merged PR (https://github.com/phpstan/phpstan-src/commit/e153fa49fdb5ed1087c0f8ded5b9c946c03eb0f4)
- Use GraphQL to find autoclosed issues when a PR is merged (https://github.com/phpstan/phpstan-src/commit/2f693989d0afebd85bf2e8403e65ddf7c89a5742)
- GenerateFactory - allow setting the result type in attribute, override create method return type (#4429)
- Narrow errors array type to list (#4445), thanks @staabm!
- No memory_limit for tests as PHPUnit recommends (#4449)
- Compute allowedArrayType only once (#4453), thanks @VincentLanglet!
- Narrow types (#4465), thanks @staabm!
- Revert "MemoryCacheStorage - var_export the data to reproduce certain issues" (https://github.com/phpstan/phpstan-src/commit/b490e0e5e2253bbf32a91308aa3991592eec3936)
- Use faster case-insensitve string comparison (#4482), thanks @staabm!
- Tests about consuming TOKEN_END (https://github.com/phpstan/phpstan-src/commit/d393a1d7f99cb74c42fced0be94e5baf69c40d81)
- Composite action for downgrading code (#4485)
- Setup mutation testing (#4480), thanks @staabm!
- Fix 25x "Offset X might not exist on..." in FileTypeMapperTest (#4501), thanks @staabm!
- Enable reportPossiblyNonexistentConstantArrayOffset (#4500), thanks @staabm!
- Narrow args to list wherever possible (#4503), thanks @staabm!
- Utilize
array_last()(#4504) (#4504), thanks @staabm! - Move
TypeCombinator::intersect()out of loop (#4509), thanks @staabm! - Fix possibly undefined offset access in tests (#4502), thanks @staabm!
- Rework issue-bot so that it does not output the entire matrix to GITHUB_OUTPUT (#4510)
- Issue bot - reintroduce analysing PHP 7.2 (#4511)
- Merge similar dynamic return type extensions into a single class (#4514), thanks @takaram!
- Method
Scope::getAnonymousFunctionReflection()always returns ClosureType (https://github.com/phpstan/phpstan-src/commit/a9aae86dff12a0c0ba0a26b6e531c94162095d00) - Simplify ConstantArrayTypeBuilder (#4529), thanks @staabm!
- Prevent duplicate work (#4531), thanks @staabm!
- Run phpstan-deprecation-rules in issue-bot (#4533)
- Add
#[CoversNothing](#4535), thanks @staabm!