Composer 2 · Autoloading and production
Optimize the autoloader
Generate a class map for faster autoloading in production.
composer dump-autoload --optimize
Official Composer 2 documentation
More autoloading and production commands
- Regenerate the autoloader
- Install for production
- Run a script
- Allow a plugin
- Clear Composer's cache
- Install a tool globally
All autoloading and production commands · Composer 2 cheatsheet