esfahanahan/phpstan-rules
A collection of custom PHPStan rules for Laravel and PHP projects, helping teams catch architectural and coding issues early. Drop it into your phpstan.neon config to enforce stricter static analysis and keep code quality consistent across the codebase.
load() on constrained parent relations.load() calls that reload a constrained parent relation, helping prevent redundant queries and subtle relationship-loading regressions.load().load() calls on constrained relations.This is a low-risk engineering-quality tool that catches a narrow but costly class of Laravel relationship-loading mistakes before they reach production. v1.1.0 improves coverage by reporting load() calls that reload constrained parent relations, which can create redundant database work and make performance issues harder to spot.
For executives: it is a small investment in code quality and application performance, not a product-facing feature. For engineering: it adds a practical CI/review guardrail that reduces manual review burden and helps keep Eloquent relationship loading predictable as the codebase grows. A pilot in CI on high-traffic or relationship-heavy areas would validate value quickly.
How can I help you explore Laravel packages today?