#phpstan

2026-02-28

We made AND and OR-conditions faster to analyse in #phpstan.

In some codebases this has some serious perf implications :-)

ignace nyamagana buteranyamsprod@phpc.social
2026-02-26

@SenseException so after a bit of tweaking I moved from #PHPStan v1 level max to barely PHPStan v2 with level 4
just 🤯

ignace nyamagana buteranyamsprod@phpc.social
2026-02-21

#funfacts I updated the league/uri mono repo to use #PHPStan v2 instead of v1 currently for fun locally. The package is developed with level max.

The result from a clean pass in v1 I got more than 200 errors in v2 🤯 .

The question is should I really clean them all 🤔

2026-02-19

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

2026-02-16

#phpstan über das alte System laufen lassen. Alte Libs wie #phpids sollte ich dann wohl doch noch ersetzen oder standalone auf PHP8 migrieren.

#developer #development #php

2026-02-16

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)...

2026-02-14

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.

2026-02-12

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:
phpstan.org/r/0dc9fe34-0c60-42

dominik schwinddominik@nona.social
2026-02-11

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.

2026-02-05

Статанализ — must-have для проектов с Codex/ClaudeCode

На днях у Кирилла Мокевнина вышел пост про то, как он разлюбил динамическую типизацию. Мысль понятная: на больших кодовых базах отсутствие типов начинает дорого стоить. Хочу дополнить аргументом, который в 2026 году уже стал прям must-have: статанализ и типы — это лучший self-check для AI-агента . Современные агенты для разработки (Claude Code на Opus 4.5 и ChatGPT Codex 5.2 High) хорошо пишут код. Ошибок уровня «переменная не объявлена», «импорт забыл», «опечатка в имени метода» по сути уже почти нет. Основные промахи чаще про другое:

habr.com/ru/articles/993004/

#статистический_анализ #статический_анализ_кода #ruff #phpstan #phpcsfixer #php #python #go #codex #claude_code

2026-01-31

In case your daily #phpstan run takes minutes instead of seconds you likely don’t utilize the result cache.

Find solutions at staabm.github.io/2023/10/21/ph

Niklas Rosenqvistnsrosenqvist
2026-01-26

The other night I made this little tool that validates 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 to make sure that the static analysis is correctly informed. Published it on in case anyone else would find it useful too: packagist.org/packages/nsrosen

2026-01-25

After ~6 weeks of collaboration we released a blazing fast #PHPStan version - static analysis on steroids.

staabm.github.io/2026/01/25/ph

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst