Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Cheatsheet of composer commands

Initialize new composer.json

composer init

Install all dependencies specified in composer.json

composer install

Add new required dependency to project

composer require DEPENDENCY

Add new required dev depenendency to project

composer require --dev DEV_DEPENDENCY

Update version of package

composer update

Rebuild autoloaders

composer dump

Remove dependency from project

composer remove DEPENDENCY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.