Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Microscope Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Quality-gate investment: Decide whether to add a lint/static-analysis stage to CI that catches broken routes, orphaned Blade views, mismatched controller actions, dead classes, and — new in v1.0.403 — fully-qualified-class-name and import-convention drift without writing a single test. The package is effectively a "free test suite" for wiring-level and style-level correctness.
  • Build vs. buy: Avoid commissioning custom static-analysis scripts, bespoke CI checks, or a homegrown import-linting ruleset. The MIT license, Laravel-native checks, and now first-class import enforcement (enforce:imports) and FQCN validation (check:fqcn) make adoption a near-zero-cost decision versus 2–4 weeks of internal tooling.
  • Tech-debt roadmap prioritization: Use its "unused class / unused view / unused route" reports to quantify dead code, and the new import/FQCN checks to quantify convention debt. That gives a defensible, data-backed cleanup backlog for sprints instead of gut-feel estimates.
  • Upgrade risk assessment: Before a Laravel major-version bump or framework refactor, run it to surface broken references and convention drift — informing whether to schedule a hardening sprint. The new --except-file= / --except-folder= flags let you scope a first pass to the code you're actually touching.
  • Legacy acquisition audit: When inheriting or acquiring a Laravel codebase, run it as a cheap due-diligence scan to estimate remediation cost — including inconsistent import hygiene, which is a reliable proxy for overall codebase discipline.
  • Onboarding accelerator: New engineers get an automated map of what's actually wired up versus what's cruft, plus a codified statement of the project's import conventions, reducing ramp time and review nitpicks.

When to Consider This Package

  • You run a Laravel codebase of non-trivial size (roughly 50+ classes, multiple route files, many Blade views) where manual wiring review no longer scales.
  • Your CI already exists and you want additional signal without expanding test authoring time. The v1.0.403 performance improvements and the new exclusion flags make the runtime-cost tradeoff easier to justify.
  • You need static, convention-level checks — not runtime behavior or integration coverage. Adoption now covers both wiring correctness and import/FQCN consistency, so it can double as a lightweight style gate.
  • You want a ratchet strategy: adopt the new --except-file= / --except-folder= exclusions to grandfather noisy or non-conforming areas, then tighten the baseline over successive sprints.
  • You are auditing legacy or inherited code and need a fast, low-effort inventory of unused/broken elements.
  • Look elsewhere when: the project isn't Laravel; you need real behavioral/unit test coverage; you already run deep type analysis (PHPStan/Larastan) with overlap you don't want to duplicate; the codebase is tiny enough that manual review is trivial; or your team's conventions deviate heavily from Laravel defaults — though the new per-file/per-folder exclusions materially reduce this risk and make a pilot far more tractable. Still confirm CI runtime cost against your pipeline budget, and verify whether the new commands are report-only or auto-fixing before you wire them into a blocking gate.

How to Pitch It (Stakeholders)

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ably/pubsub-server
mstfkhazaal/defender
mfonte/base62x
karnoweb/metapilot
tobya/bcsapiwrapper
swalker2/cpanel
vish4395/laravel-translation-manager
morningtrain/economic
teksite/systeminfo-laravel
atomcms/voting
run6/weather
siokas/laravelembeddirectives
adamlien/pkuuids
gilsonsouza/lara-doc-generator
manelgavalda/enrollment_mobile
unabomber/timezone
delatbabel/contacts
astritzeqiri/g-recaptcha
kevinongko/laravel-genode
developeruz/laravel-analytics