Drupal and Composer install or update
Using composer and drupal, even d7, is great. But an update or install can leave you with a broken drupal registry.
So here is a workflow that is pretty bullet proof.
In this example drupal's composer folder where composer.json lives is located in /var/www/drupal/sites/default/files/composer
So in there is composer.json and composer.lock
So when you need to install a new composer library and you updated your json file you can runcd /var/www/drupal/ drush composer-rebuild-file composer --working-dir=/var/www/drupal/sites/default/files/composer update
If you get an broken registry issue the typically happens when you rundrush composer-manager update
You can clear that up withdrush rr
And then use composer directly as I did above to update/install your composer related files.
本文开发（php）相关术语:php代码审计工具 php开发工程师 移动开发者大会 移动互联网开发 web开发工程师 软件开发流程 软件开发工程师