composer/class-map-generator
Generate PHP class maps by scanning directories for classes/interfaces/traits/enums and mapping symbols to file paths. Supports simple one-shot map creation or incremental scans with sortable results and reporting of ambiguous class resolutions.
composer dump-autoload) may suffice for standard PSR-4 use cases.bootstrap/cache).SplClassLoader or ComposerAutoloader).Illuminate/Filesystem) for path scanning.AppServiceProvider::boot()) to preload maps.ClassMapGeneratorService) to abstract the underlying logic.Illuminate/Foundation/Application to resolve paths dynamically.Log::warning).Cache::remember) to store maps.filesystem.updated) to refresh maps.spatie/fork)?composer require composer/class-map-generator.Illuminate/Filesystem for path scanning (e.g., storage_path(), app_path()).Cache and Filesystem caches (e.g., bootstrap/cache/classmap.php).Artisan::command() to include class map generation (e.g., php artisan classmap:generate).storage/app/uploads) for dynamic classes.ClassMapGenerator::createMap() to scan a single directory (e.g., app/Modules).ClassMapGeneratorService) for dependency injection.AppServiceProvider to pre-generate maps on app start.bootstrap/cache and invalidate on file changes (e.g., using File::lastModified()).ComposerAutoloader::getClassMap() to integrate with existing autoloading.How can I help you explore Laravel packages today?