Today I gave a talk at TechMeetup Ostrava about how AI changed the way I work on PHPStan. AI tools and trends change from week to week, so instead of tricks that expire with the next model, I tried to share lessons that should last.
It’s been over four months and 16 patch releases since the last minor PHPStan release. Which means it’s about time for the next one! PHPStan 2.3.0 is here.
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!