spatie/laravel-auto-discoverer
Fast, cached discovery of PHP structures in your codebase. Find classes, interfaces, traits, and enums by conditions like “implements interface” or “uses trait,” and get rich metadata. Ideal for automation, registration, and scanning in production.
OldModel to migrate to NewModel."@Injectable"). Lowers dev time for internal tools.StructureScout) accelerates repeated scans in production (e.g., warm-up during deployments). Critical for CLI tools or scheduled jobs.isAbstract, attributes) to enable smarter IDE plugins, documentation generators, or testing frameworks.Discover::in(app_path('Modules/{tenant}'))) to avoid global scans.glob() or get_declared_classes() instead.ignored_files config is static.ts-morph).php-parser or nikic/php-parser.For Executives: *"This package lets us automate tedious code discovery tasks—like finding all custom payment processors or deprecated APIs—without writing custom scripts. It’s like Google Search for your codebase, but for developers. For example, we could:
For Engineers: *"This is a Swiss Army knife for class discovery in PHP/Laravel. Key perks:
Discover::in(app_path())->classes()->implementing(Serializable::class)->get().StructureScout) makes repeated scans instant in production.@Cacheable in app/Commands.->parallel() (requires amphp/parallel).php artisan structure-scouts:cache) and config publishing.
Use cases:@Middleware.OldService.PluginInterface.
Trade-off: Adds ~100KB to your vendor dir. Worth it for complex discovery needs."*How can I help you explore Laravel packages today?