sandermuller/richter
Richter is a lightweight Laravel package for measuring the magnitude of your code: benchmark execution time, memory usage, and queries with a clean API. Compare implementations, catch performance regressions, and keep your app fast. Easy to install and fits naturally into your test suite.
$fillable combined with $guarded) and middleware tier-3 hazards (a guard a group both appends and removes) mean the tool's ranking of dangerous surfaces is now more trustworthy. This supports decisions about where to spend remediation effort first across legacy Laravel code, especially mass-assignment and auth-middleware ordering.bootstrap/app.php call order, reads group('name', [...]), and correctly hides Kernel groups when withMiddleware is used. If we are migrating from Kernel.php to bootstrap/app.php, analysis results now reflect real runtime ordering — usable as evidence in upgrade sequencing and regression-risk discussions.new of a non-dispatchable class in an accumulated job array is no longer unresolved) and false negatives (a spread in a dispatched array now is an unresolved dispatch site; changed ShouldQueue/Dispatchable classes outside \Jobs\ read unresolved). Use this to map job dependencies and decide where queue refactors carry hidden coupling — but treat unresolved as an investigation prompt, not a defect.StructArmed, raised symplify/phpstan-rules floor, strict process faking in tests). That strengthens the case for buying/adopting over building bespoke PHPStan rules, while the pre-1.0 pace of semantic changes argues against deep coupling to its output format.Consider adoption when:
bootstrap/app.php style) and want risk-ranked, entry-point-oriented analysis (routes, commands, task slices) rather than generic lint output.Look elsewhere when:
For executives: This is a low-cost, actively maintained static analyzer purpose-built for Laravel. Rather than replacing security review, it converts "unknown risk" into a ranked, explained list of the surfaces that matter — routes, commands, model mass-assignment, middleware ordering, and job dispatch paths. The current release is about trustworthiness: risk causes are now visible in the HTML report, and several parsing and grading bugs that distorted rankings have been fixed. Recommendation: pilot in advisory mode on one or two services, measure triage time and findings accepted as real, then decide on a merge gate.
For engineering: It slots into the existing PHPStan/QA pipeline. This release improves model-hazard parsing, aligns middleware analysis with Laravel 11+ bootstrap/app.php semantics (including group() and withMiddleware), and reduces both false positives and false negatives in dispatch resolution. Costs to plan for: pin the version in CI, expect a one-time graph-cache rebuild (format 28), and treat report deltas after upgrades as tooling changes requiring re-baselining rather than code regressions. Not a breaking change; no migration work beyond cache invalidation.
How can I help you explore Laravel packages today?