tomasvotruba/class-leak
Finds class leaks in PHP apps: detects classes unintentionally pulled into your runtime via autoloading, service container or tests. Helps trim dependencies, speed up CI, and keep boundaries clean by reporting unexpected class usage with clear, actionable output.
Architecture fit: The tool uses static analysis to detect unused classes, but Laravel's heavy reliance on dynamic class loading (service container bindings, facade calls, route definitions, config-driven instantiations) creates significant blind spots. It will miss classes loaded via app()->make(), config(), or variable class names (new $className), which are common in Laravel patterns
How can I help you explore Laravel packages today?