Speed Up Your CI with phpunit-slow-test-detector to Find Slow Tests

TL;DR: Use ergebnis/phpunit-slow-test-detector to surface your slow PHPUnit tests, then use that as a metric for parallelizing or splitting your test jobs. ergebnis/phpunit-slow-test-detector: A PHPUnit extension that detects and reports slow tests exceeding a configured threshold The “which tests are slowing down CI?” problem Your CI tests are slow. They keep getting slower, and waiting after every push gets old fast. But when you actually try to speed things up, you can see that “the whole thing takes 5 minutes” — yet “okay, but which tests are dragging it down?” doesn’t jump out at you. You might have a vague hunch that “the tests touching the DB are probably the suspects,” but you haven’t actually measured anything. ...

June 19, 2026 · nojimage

Create Project-Specific PHPStan and PHPCS Rules with AI Agents

TL;DR: Writing rules for AI agents helps, but AI is non-deterministic — violations will slip through. Enforce project-specific constraints with custom PHPStan/PHPCS rules for mechanical checking. Let an AI agent draft the custom rules for you, and you can implement them quickly. CLAUDE.md Alone Isn’t Enough If you’re using an AI agent like Claude Code, you probably write project rules in CLAUDE.md or rule files. Things like: “Use ‘Plan’ instead of the old term ‘Course’ everywhere in the code” “DateTime::createFromTimestamp() must always receive a timezone as the second argument” “Core domain classes must not call infrastructure directly” The agent respects these rules and writes compliant code — most of the time. But AI is non-deterministic. The same instruction doesn’t always produce the same output. When the context gets long or the agent is in the middle of a complex refactoring, it can “accidentally” generate code that violates the rules, even though they’re written right there in the rule files. ...

April 10, 2026 · nojimage