Download Latest Version 2.1.20 source code.tar.gz (3.8 MB)
Email in envelope

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

Home / 2.1.19
Name Modified Size InfoDownloads / Week
Parent folder
phpstan.phar 2025-07-21 25.1 MB
phpstan.phar.asc 2025-07-21 833 Bytes
2.1.19 source code.tar.gz 2025-07-21 3.8 MB
2.1.19 source code.zip 2025-07-21 3.8 MB
README.md 2025-07-21 5.2 kB
Totals: 5 Items   32.8 MB 3

Improvements 🔧

  • Remove manual wrapping for error table (#4035), thanks @schlndh!
  • Improve array_search inference (#4014), thanks @VincentLanglet!
  • Improve str_split() return type (#3999), thanks @VincentLanglet!
  • Detect more duplicate array keys (#4116), thanks @VincentLanglet!
  • Add support for multiple identifiers in ignoreErrors configuration (#4080), thanks @janedbal!
  • Fix missing detection of dead code in expressions (#4090), [#13232], [#11909], thanks @staabm!

Bugfixes 🐛

  • Fix IntersectionType::isIterableOnce() (#4106), [#13248], thanks @VincentLanglet!
  • Fix false positive unreachable (#4112), [#7531], thanks @VincentLanglet!
  • Improve array filter return type on PHP 8 (#4123), [#12689], thanks @VincentLanglet!
  • Fix analysis on array_map with named arguments (#3763), [#12317], thanks @takaram!
  • Fix ObjectType::getOffsetValueType() (#4126), [#12125], [#9575], [#9456], [#13144], thanks @VincentLanglet!
  • Fix for respecting rule levels for property.nameNotString (#4117), [#13271]
  • Improve trim on numeric string (#4130), [#10860], thanks @VincentLanglet!
  • Fix intersection with substracted (#4132), thanks @VincentLanglet!
  • Understand at least one argument for non empty array unpacked (#4134), [#10020], [#8506], thanks @VincentLanglet!
  • Handle empty array case via ConstantArrayType::spliceArray() (#4140), [#13279], thanks @herndlm!
  • Fix lowercase string usage in template (#4122), [#12739], thanks @VincentLanglet!
  • Fix "Unsafe use of new static when trait enforces constructor via abstract method" (#4114), [#9654], thanks @VincentLanglet!
  • Nothing is lower than null (#4131), [#10719], [#9141], thanks @VincentLanglet!
  • Hotfix - allow people to override exceptionTypeResolver in neon (https://github.com/phpstan/phpstan-src/commit/e7febc360c027957945e1e8667b412952d0bca12)

Function signature fixes 🤖

  • Improve sys_getloadavg return type (#4107), [#13198], thanks @VincentLanglet!
  • Fix PDO quote return type (#4113), [#10512], thanks @VincentLanglet!
  • Fix pg_lo_import definition (#4120), thanks @VincentLanglet!
  • Update eio function return type (#4124), thanks @VincentLanglet!
  • Update stream_filter_* signatures (#4125), [#12380], thanks @VincentLanglet!
  • Update DomNode return type (#4137), thanks @VincentLanglet!
  • Update Spl methods with side effects (#4129), [#10884], [#9180], thanks @VincentLanglet!
  • Fix odbc definitions (#4119), thanks @VincentLanglet!

Internals 🔍

Source: README.md, updated 2025-07-21