Статанализ — 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

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

На днях у Кирилла Мокевнина вышел пост про то, как он разлюбил динамическую типизацию. Мысль понятная: на больших кодовых базах отсутствие типов начинает дорого стоить. Хочу дополнить аргументом,...

Хабр

RE: https://phpc.social/@jay/115811048552980980

My proposal to Rector was rightfully rejected, so I’m attempting to incorporate it into PHP CS Fixer now 🤞🏻. Here’s the link to my pull request, in case you want to check it out!

https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/9326

#Rector #PHPCSFixer #PHP

Playground

After almost a year since I created it, my PR to #PHPCSFixer that introduces #PHPCompatibility check was merged 🥳. This improves our QA suite with another tool that can catch usage of language features not available on runtimes marked as supported.

https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7844

CI: Introduce PHP compatibility check by Wirone · Pull Request #7844 · PHP-CS-Fixer/PHP-CS-Fixer

Inspired by this finding, bug introduced in #7616, reproduced here - we have invalid return type in code and none of the tools caught this. I thought this is because we run PHPStan on 8.3 which the...

GitHub
is there something like prettier for #php i know #phpcsfixer but i'm really unopinionated and i just want the beautifier to move the brackets in the right place :D. Maybe someone can help me understand that entire thing with #psr and stuff.
PHPStrom kann das hübsch machen, aber ich finde keine Rule für eins der üblichen Tools, so dass wir das automatisieren und in der CI testen können…
Ich kann mir nicht vorstellen dass es da NICHTS gibt… gucke ich falsch? Hat jemand einen Tipp?
#typo3 #phpcs #rector #phpcsfixer #codestyle
Wir räumen eine recht große legacy code base auf. Rector hilft uns dabei sehr, macht aber auch den CodeStyle durcheinander. phpcs kann das meiste sehr gut wieder aufräumen - nur große arrays nicht (TCA, ext_emconf). Rector schreibt alles items in eine laaaaaange Zeile.
#typo3 #phpcs #rector #phpcsfixer #codestyle

Looking for help: does a multiline PHP attribute constructor fixer rule exists for php-cs-fixer?

I would like to transform attributes constructors into multiline, from:
```
#[ORM\ManyToMany(targetEntity: Permission::class, inversedBy: 'group', fetch: 'EAGER')]
private $permission;
```

To:
```
#[ORM\ManyToMany(
targetEntity: Permission::class,
inversedBy: 'group',
fetch: 'EAGER',
)]
private $permission;
```

#php #phpcsfixer #phpcs

My PR got merged, so starting from today @PhpSpec's #Prophecy library uses #PHPCSFixer 🥳. It was created so long ago that it didn't even include parallel runner in the dist config, so I need to make a follow up 😅.

https://github.com/phpspec/prophecy/pull/613

Introduce PHP-CS-Fixer by Wirone · Pull Request #613 · phpspec/prophecy

I did not apply suggested changes because I want to get feedback if you like these changes or not. We can tweak configuration in order to keep more of current conventions (like class instantiation ...

GitHub
Does anybody know a good code formatter for #HTML? I am looking for something like #ESLint Stylistic or #PHPCSFixer. And please don't suggest #Prettier, I know that it can format HTML as well, but I don't like that fact that they introduce changes in major versions that might reformat my entire code causing lots of conflicts in pull requests without the possibility to disable those changes.