Download Latest Version 2.1.30 source code.tar.gz (3.9 MB)
Email in envelope

Get an email when there's a new version of PHPStan

Home / 2.1.30
Name Modified Size InfoDownloads / Week
Parent folder
phpstan.phar 2025-10-02 25.4 MB
phpstan.phar.asc 2025-10-02 833 Bytes
2.1.30 source code.tar.gz 2025-10-02 3.9 MB
2.1.30 source code.zip 2025-10-02 3.9 MB
README.md 2025-10-02 3.8 kB
Totals: 5 Items   33.1 MB 9

Improvements 🔧

  • Alternative solution to disable cloning with --prefer-source that does not need another repository (https://github.com/phpstan/phpstan/commit/0eb327e751d90cd80c06d9a4c3aea8161cbbd251)
  • TableErrorFormatter: Link path in JetBrain IDEs (#4369), thanks @vrana!
  • Improve ConstantArrayType inference (#4376), thanks @staabm!
  • use string instead of __stringandstringable in printf parameter error message (#4377), thanks @schlndh!
  • Inherit PHPDoc return type in child method with narrower native return type (#4384), [#12481], [#11364], [#10600], [#13588]
  • Rely on RuleLevelHelper in InvalidKeyInArrayItemRule (#4379), thanks @VincentLanglet!

Bugfixes 🐛

  • False positive "non-empty-array<int, int> might not be a list" when change existing list key (#4351), [#13035], thanks @staabm!
  • Remove duplicate method in error message (#4371), [#12557], thanks @VincentLanglet!
  • Fix "Offset (int|string) might not exist on array" after array_keys($arr) (#4381), [#12926], thanks @staabm!
  • Fix "offset might not exist" false-positives when offset is a expression (#4372), [#9494], [#12115], [#12805], [#12931], [#13214], [#13039], [#13538], thanks @staabm!
  • Skip deep expression when root expression changes while scope generalization (#4390), thanks @staabm!
  • When assigning nested array offset, union the value with empty array if the offset might be nonexistent (https://github.com/phpstan/phpstan-src/commit/23dc4e7633fa23dcbd20135872aa53551af2e00e), [#12078], [#10640], [#10025], [#6173]
  • Fix ArrayType::hasOffsetValueType (#4387), thanks @VincentLanglet!
  • Fix regression about appending [] to existing offsets (https://github.com/phpstan/phpstan-src/commit/f88023141d28f6e119e5470c32cae472bb4c4093), [#10438]

Function signature fixes 🤖

  • add bcround function signature for PHP 8.4 (#4367), [#13364], thanks @themasch!
  • Remove stream_get_meta_data from delta file (#4360), thanks @miken32!
  • Add stream_socket_{client,server} stubs for @param-out (#4391), [#12622], [#13605], thanks @msbit!

Internals 🔍

Source: README.md, updated 2025-10-02