Composer 2 · Autoloading and production
Install for production
Install without development packages and with an optimized autoloader.
composer install --no-dev --optimize-autoloader
Official Composer 2 documentation
More autoloading and production commands
- Regenerate the autoloader
- Optimize the autoloader
- Run a script
- Allow a plugin
- Clear Composer's cache
- Install a tool globally
All autoloading and production commands · Composer 2 cheatsheet