New release: PHPStan 1.12.33 https://github.com/phpstan/phpstan/releases/tag/1.12.33 #phpstan
New release: PHPStan 1.12.33 https://github.com/phpstan/phpstan/releases/tag/1.12.33 #phpstan
We made AND and OR-conditions faster to analyse in #phpstan.
In some codebases this has some serious perf implications :-)
@SenseException so after a bit of tweaking I moved from #PHPStan v1 level max to barely PHPStan v2 with level 4
just 🤯
New release: PHPStan 2.1.40 https://github.com/phpstan/phpstan/releases/tag/2.1.40 #phpstan
this week I am on vacation from my primary job..
@misterdeviling and me working thru #PHPStan issues and we can look back on a pretty successfull week.
Lots of fixed issues and merged contributons. some multi year old bugs fixed.
Its a lot of fun
I just figured out neither #phpstan nor #phpcodesniffer reported that a class was differrent from the file it is in. I bet it's a setting somewhere that my quick search didn't find...
BTW #PHPStorm with the defaults didn't report it either... (again may be there's a checkbox somewhere in the settings)...
I love solving puzzles..
today I found out that a #phpstan container cache invalidates when you resize your bash/shell window. also when jumping between directories using `cd`.
not intentional of course. lets see what we can do about that.
Starting with #phpstan 2.1.39 in case we know constants are deprecated only in certain php versions, we no longer error about them, when used in a `if (PHP_VERSION_ID < 80400) {`-like condition.
see E_STRICT before PHP 8.4:
https://phpstan.org/r/0dc9fe34-0c60-4254-9174-f37e910cb4cf
Sometimes I admire PHP. I'm currently working with a pretty old codebase and the developers then threw every possible type you can imagine at a function and it somehow worked.
I made the mistake of adding a bit of strong typing and now everything is falling apart.
And there's a special kind of talent that manages to trigger 1000+ errors in #phpstan in less than 200 lines of code.
New release: PHPStan 2.1.39 https://github.com/phpstan/phpstan/releases/tag/2.1.39 #phpstan
Статанализ — must-have для проектов с Codex/ClaudeCode
На днях у Кирилла Мокевнина вышел пост про то, как он разлюбил динамическую типизацию. Мысль понятная: на больших кодовых базах отсутствие типов начинает дорого стоить. Хочу дополнить аргументом, который в 2026 году уже стал прям must-have: статанализ и типы — это лучший self-check для AI-агента . Современные агенты для разработки (Claude Code на Opus 4.5 и ChatGPT Codex 5.2 High) хорошо пишут код. Ошибок уровня «переменная не объявлена», «импорт забыл», «опечатка в имени метода» по сути уже почти нет. Основные промахи чаще про другое:
https://habr.com/ru/articles/993004/
#статистический_анализ #статический_анализ_кода #ruff #phpstan #phpcsfixer #php #python #go #codex #claude_code
In case your daily #phpstan run takes minutes instead of seconds you likely don’t utilize the result cache.
Find solutions at https://staabm.github.io/2023/10/21/phpstan-result-cache-gotchas.html
New release: PHPStan 2.1.38 https://github.com/phpstan/phpstan/releases/tag/2.1.38 #phpstan
The other night I made this little #PHP tool that validates #PHPDoc annotations against the actual method signature, to make sure that they are compatible and don't drift apart over time.
I use it as a quick check before running #PHPStan to make sure that the static analysis is correctly informed. Published it on #Packagist in case anyone else would find it useful too: https://packagist.org/packages/nsrosenqvist/phpdoc-validator
After ~6 weeks of collaboration we released a blazing fast #PHPStan version - static analysis on steroids.
https://staabm.github.io/2026/01/25/phpstan-on-steroids.html
New release: PHPStan 2.1.37 https://github.com/phpstan/phpstan/releases/tag/2.1.37 #phpstan
New release: PHPStan 2.1.36 https://github.com/phpstan/phpstan/releases/tag/2.1.36 #phpstan
New release: PHPStan 2.1.35 https://github.com/phpstan/phpstan/releases/tag/2.1.35 #phpstan