mattiasgeniar/phpunit-query-count-assertions
Add PHPUnit/Pest assertions to count and analyze SQL queries in tests. Catch N+1 issues, duplicate queries, slow queries, missing indexes (EXPLAIN), row count problems, and Laravel lazy loading. Supports Laravel 11/12, Doctrine DBAL 4, and Phalcon 6+.
with() for eager loading) and no regressions have been observed.assertQueryCount() and define query budgets. No custom code, no dependencies—just clear assertions that enforce performance guardrails for critical paths, ensuring regressions are blocked in PRs, not in production."How can I help you explore Laravel packages today?