From 9cb8f045b377cfa10a1441435f8dab133c1b5723 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Tue, 28 Feb 2017 12:59:24 -0500 Subject: [PATCH] Removing more composer update functionality. --- readme/updating-blt.md | 30 +++--------------------------- src/Composer/Plugin.php | 12 ------------ 2 files changed, 3 insertions(+), 39 deletions(-) diff --git a/readme/updating-blt.md b/readme/updating-blt.md index eb108b6f0..3fe4a4926 100644 --- a/readme/updating-blt.md +++ b/readme/updating-blt.md @@ -21,39 +21,15 @@ If you are already using BLT via Composer, you can update to the latest version ### Modifying update behavior -By default BLT will modify your project's composer.json to conform with the [upstream composer.json template](https://github.com/acquia/blt/blob/8.x/template/composer.json). If you'd like to prevent a specific package or key in composer.json from being modified, use the `composer-exclude-merge` option: +By default BLT will modify a handful of files in your project to conform to the [upstream template](https://github.com/acquia/blt/blob/8.x/template). If you'd like to prevent this, set `extra.blt.update` to `false` in `composer.json`: "extra": { "blt": { - "update": true, - "composer-exclude-merge": { - "require": [ - "drupal/acsf", - "drupal/acquia_connector", - "drupal/memcache", - "drupal/search_api", - "drupal/search_api_solr" - ], - "require-dev": "*" - } + "update": true } } -This would prevent the merging of any upstream updates to the composer.json configuration for a handful of modules in `require` and all packages in `require-dev`. - -A few other examples of valid usage: - - "extra": { - "blt": { - "update": false, - } - } - "extra": { - "blt": { - "update": true, - "composer-exclude-merge": "*" - } - } +Please not that if you choose to do this, it is your responsibility to track upstream changes. This is very likely to cause issues when you upgrade BLT to a new version. ## Updating from a non-Composer-managed (very old) version diff --git a/src/Composer/Plugin.php b/src/Composer/Plugin.php index c6ac70db4..d4cafcf04 100644 --- a/src/Composer/Plugin.php +++ b/src/Composer/Plugin.php @@ -133,18 +133,6 @@ protected function executeBltUpdate($version) { } elseif ($options['blt']['update']) { $this->io->write('Updating BLT templated files...'); - - // Rsyncs, updates composer.json, project.yml, executes scripted updates for version delta. - $pre_composer_json = md5_file($this->getRepoRoot() . DIRECTORY_SEPARATOR . 'composer.json'); - $success = $this->executeCommand('blt update', [], TRUE); - if (!$success) { - $this->io->write("BLT update script failed! Run `blt update -verbose` to retry."); - } - $post_composer_json = md5_file($this->getRepoRoot() . DIRECTORY_SEPARATOR . 'composer.json'); - - if ($pre_composer_json != $post_composer_json) { - $this->io->write('Your composer.json file was modified by BLT, you MUST run "composer update" to re-process and update dependencies.'); - } } else { $this->io->write('Skipping update of BLT templated files');