From 3039522a746040ecb216238db68cf7bc40dfca68 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Mon, 5 Dec 2016 11:54:14 -0500 Subject: [PATCH] Making requirement for composer.lock update after BLT update more clear. --- src/Composer/Plugin.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Composer/Plugin.php b/src/Composer/Plugin.php index c93e368337..7248f00b09 100644 --- a/src/Composer/Plugin.php +++ b/src/Composer/Plugin.php @@ -132,8 +132,14 @@ protected function executeBltUpdate($version) { $this->io->write('Updating BLT templated files...'); // Rsyncs, updates composer.json, project.yml, executes scripted updates for version delta. + $pre_composer_json = json_decode($this->getRepoRoot() . DIRECTORY_SEPARATOR . 'composer.json', TRUE); $this->executeCommand('blt update'); - $this->io->write('This may have modified your composer.json and require a subsequent `composer update`'); + $post_composer_json = json_decode($this->getRepoRoot() . DIRECTORY_SEPARATOR . 'composer.json', TRUE); + + $output = $this->executeCommand('composer validate --no-check-all'); + if (strstr($output, 'The lock file is not up to date')) { + $this->io->write('Your composer.json dependencies were modified, you MUST run "composer update" to update your composer.lock file. This is not an error.'); + } // @todo check if require or require-dev changed. If so, run `composer update`. // @todo if require and require-dev did not change, but something else in composer.json changed, execute `composer update --lock`.