| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| phpstan.phar | 2026-03-30 | 26.3 MB | |
| phpstan.phar.asc | 2026-03-30 | 833 Bytes | |
| 2.1.45 source code.tar.gz | 2026-03-30 | 3.9 MB | |
| 2.1.45 source code.zip | 2026-03-30 | 3.9 MB | |
| README.md | 2026-03-30 | 5.1 kB | |
| Totals: 5 Items | 34.1 MB | 0 | |
This release fixes 29 issues!
In other news, we refreshed the on-line playground! You can now set many previously-unavailable config parameters:
This helps you testing out various PHPStan features, and also reproduce issues for bug reports when something goes wrong with these parameters set to their non-default values.
Also, there's a couple of new blogposts on the website:
Improvements 🔧
- More rules about PHPDoc tags declarations now validate stub files (https://github.com/phpstan/phpstan-src/commit/610537afbf02d8e31ae77abd9a258ed3662a0a12)
Bugfixes 🐛
- Fix: errors for argument array template types no longer reported (argument.type) (#5300), [#14138], thanks @VincentLanglet and @staabm!
- Fix: Result of
function_exists()can't be "cached" (#5303), [#14384], thanks @staabm and @VincentLanglet! - Fix: Optional templated args not provided cause unbound template errors (#5175), [#2572], [#7704], [#9360], thanks @staabm and @VincentLanglet!
- Resolve generic parameter defaults that reference other template parameters (#5304), thanks @JanTvrdik!
- Fix: array_filter with assert-if-true callable marks all keys optional (#5097), [#11730], thanks @staabm and @VincentLanglet!
- Fix: assign.readOnlyProperty (#5061), [#12253], thanks @VincentLanglet and @staabm!
- Fix: Bogus write-only error when appending to an array-like object in private class property (#5102), [#6777], thanks @VincentLanglet and @staabm!
- Fix: Cannot use "T is never" in conditional return (#5082), [#9634], [#10938], thanks @VincentLanglet and @staabm!
- Fix: [NAN] === mixed is always evaluated as false (#5321), [#11054], thanks @staabm and @VincentLanglet!
- Fix: Parameter [#2] $callback of function uasort expects callable(Foo, Foo): int, 'strnatcasecmp' given. (#5171), [#11619], thanks @VincentLanglet and @staabm!
- Fix: Does not warn about non-nullable class-property (#5327), [#14393], [#4846], thanks @VincentLanglet and @staabm!
- Fix: Incorrect inference of instance variable modified from callback (#5347), [#8926], [#11417], [#10903], thanks @staabm and @VincentLanglet!
- TypeSpecifier: resolve purity/impurity for CallableParametersAcceptor (#5348), [#12686], [#3770], [#6822], thanks @staabm and @VincentLanglet!
- filter_var: Fix throw on failure with require/force array (#5349), thanks @VincentLanglet!
- Fix: FILTER_FLAG_GLOBAL_RANGE constant not "known" on PHP 8.3, 8.4 (#5334), [#14397], thanks @VincentLanglet and @staabm!
- Fix: Narrowed template on an interface is ignored when generics is not specified (#5339), [#9045], [#7185], [#13204], thanks @VincentLanglet and @staabm!
- Fix: Consequent scope with the same condition (#5056), [#4173], [#12992], [#14227], thanks @VincentLanglet and @staabm!
Performance 🏎️
- Flatten deep BooleanOr chains in TypeSpecifier to avoid O(n^2) recursion (#5324), thanks @SanderMuller!
Internals 🔍
- More named arguments (https://github.com/phpstan/phpstan-src/commit/38036bf482a8bee7537f09def3b002ec559e7c42)
- Simplify StubValidator rule list, introduce
#[ValidatesStubFiles]attribute (https://github.com/phpstan/phpstan-src/commit/b9839ac8d74d667d37b773e85c76a16c0879d637) - StubValidator - call StubFilesProvider on the original DIC, not on the stubValidator one (https://github.com/phpstan/phpstan-src/commit/47f36d8971fd0e1fe6a1f1994f00bf99ecd35dac)
- Added regression test (#5306), [#10924], thanks @staabm!
- Added regression test (#5313), [#4918], thanks @staabm!