General composer documentation.
Add a new library to composer.json and composer.lock. This will install it as well.
If you are working on a subcheckout you will need to make sure every other sub-checkout has the lib installed by updating their composer files then runnin composer install
.
composer require [library/name]
# Real example:
composer require drupal/link_field_autocomplete_filter
If there is not a composer.lock file present composer will install the libraries and create one.
If there is a composer.lock file present it will install libraries according that that.
Update a module while respecting the semantic versioning.
composer update drupal/webform
Update a module to a different semantic version. This will automatically update composer.lock.
composer require drupal/webform:dev-5x
First uninstall using through the CMS. Then composer. You do not need to specify the version number.
composer remove drupal/pathauto
svn update
on target environmentcomposer install
drush updb
fixperm .
Sometimes during composer install
if a module had a patch but no longer composer will ask how it should handle code changes that patch caused in the effect module. You can almost always choose to overwrite that code.