imanghafoori/laravel-microscope
Laravel Microscope is a static analysis tool that scans your Laravel app for bugs, code smells, and missed best practices without running it. It detects unused controllers and views, missing imports, dead routes, and more, so you can fix issues early.
enforce:imports) and FQCN validation (check:fqcn) make adoption a near-zero-cost decision versus 2–4 weeks of internal tooling.--except-file= / --except-folder= flags let you scope a first pass to the code you're actually touching.--except-file= / --except-folder= exclusions to grandfather noisy or non-conforming areas, then tighten the baseline over successive sprints.For executives (business framing): We can reduce maintenance cost and regression risk at effectively zero license cost by adding an automated code-health scan to our deployment pipeline. It flags unused code we're paying to maintain and catches broken wiring before it reaches customers — improving release confidence without adding headcount or test-writing effort. The latest release also enforces import and class-reference consistency, which reduces review churn and makes the codebase cheaper to hand off between teams.
For engineering (practical framing): A drop-in dev dependency (MIT, actively maintained) that statically analyzes the Laravel app and reports dead classes, orphaned views, unreachable routes, and convention violations. Version 1.0.403 adds check:fqcn and enforce:imports for class-reference and import hygiene, --except-file= / --except-folder= for scoped rollouts and suppression, and meaningful performance gains. It requires no test authoring, runs standalone or in CI, and gives us a concrete cleanup list. It complements — not replaces — PHPUnit/PHPStan; treat it as a lint layer for framework wiring. Recommend a pilot run on one service using the new exclusion flags to grandfather existing noise: measure findings and false-positive rate, then decide which checks become blocking in CI.
How can I help you explore Laravel packages today?