oro/phpstan-rules
Oro PHPStan Rules adds custom static analysis checks to PHPStan for Laravel and PHP projects, helping teams catch risky patterns, enforce coding standards, and improve code quality early in CI. Lightweight and easy to integrate.
Adopt when:
Look elsewhere when:
phpstan/phpstan-strict-rules, framework extensions, and a coding-standard package instead — those are maintained by larger communities with faster release cadence.To executives: This is a small, free, MIT-licensed add-on to our existing static analysis tooling. It automates enforcement of architectural conventions that today consume senior engineer review time, and it gives us a measurable quality metric release over release. Cost is near zero; the risk is maintenance, which we mitigate by pinning the version and treating it as replaceable. Recommendation is a time-boxed pilot on one team, with a go/no-go based on violation signal quality.
To engineering: It is a set of PHPStan rules extracted from Oro's own products. Value is in the encoded conventions and as a template for writing our own rules — not in the rules themselves unless we are on Oro. Low adoption and a single maintainer mean we pin it, vendor it if needed, and do not treat it as a load-bearing dependency. The real win is proving the pattern: once we have one custom rule in CI, we can codify our own architectural decisions the same way.
Framing to avoid: presenting this as a security or correctness tool. It is a consistency tool. Its ROI is review time and onboarding speed, and it should be measured that way.
How can I help you explore Laravel packages today?