It’s been almost a year and a half since we last bumped the minor version. Although we released many improvements in the 2.1.x series, grouped together in over 55 releases, we also cooked up some bigger changes people have been asking for for a long time.
PHPStan is known for finding bugs in your code. But that’s not all it can do. When PHPStan analyses your codebase, it builds a detailed model of every class, method, property, type, and relationship.
PHP silently casts array keys. This is one of the oldest and most well-known quirks in the language.
PHP 8.5 has been out for a while now, and so has PHPStan’s support for it. PHPStan 2.1.32, released back in November 2025, shipped with over 17 PHP 8.5-related changes.
Recently I’ve wanted to implement support for the @internal PHPDoc tag. The good news was there was already a similar set of rules in phpstan-deprecation-rules for the @deprecated tag.
Today’s PHPStan 2.1 brings full understanding of flagship PHP 8.4 features like property hooks, asymmetric visibility, and the #[Deprecated] attribute. As usual I’m going to describe what considerations went into supporting these language features in PHPStan.
This is the upgrading guide for PHPStan 2.0.
PHPStan 1.0 was released a little over three years ago. I’m happy to report the project is thriving!
After three years since the initial PHPStan 1.0 release, we’re getting closer to PHPStan 2.0. After sifting through my list of ideas for the new major version, I realized I can move some of them forward and release them in 1.x series and hide them behind the Bleeding Edge config toggle, so they can be enjoyed by PHPStan users sooner.
If you find that PHPStan reports different code on your machine and in continuous integration build system, here are the steps to follow to get rid of this problem.