I am building a composer.json file for my project which involves core Drupal, contributed Drupal modules, Drupal related libraries, core CiviCRM. All initialisation of the empty prototype and customisation is done with both Drupal modules and CiviCRM extensions, whichever seems easier.

The question is how do we install and upgrade the core CiviCRM code? composer search reveals that civicrm is not part of packagist, but I do see a composer.json and a bower.json file in the civicrm folder.

Before I start trying out doing it on my own, could you please give me some hints and examples how I could do this. My goal is that composer update would take care of upgrading both drupal and CiviCRM code, without following the usual documented upgrade instructions.

  • having CiviCRM available for install by composer is a topic under discussion right now, as the D8 version is being worked on and since CiviCRM and Drupal 8 have Symfony of different version, it looks like it may be necessary for the class autoload May 11, 2017 at 19:45
  • Presently I am working with and writing Composer scripts and use drush to glue things together. Civicrm is added as a tar based package. When finished, only the Civicrm version number needs to be changed to cause an upgrade. I will post the result here.
    – ñull
    May 15, 2017 at 19:01
  • @ñull Can you post your final script as an answer? I am working though the same process of trying to migrate a drush make file to composer for Drupal7 and CiviCRM 4.7.
    – lolcode
    May 6, 2018 at 21:44
  • Instructions are too extensive to post here and the formatting here is very limited. Also, meanwhile the project moved on and we migrate now fully to a Drupal 8 solution to meet our rather HR than CRM requirements. Also I no longer receive funding for this. I will contact you at freeform.
    – ñull
    May 9, 2018 at 9:59


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.