Skip to content

Commit

Permalink
Making requirement for composer.lock update after BLT update more clear.
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed Dec 5, 2016
1 parent b55e1b4 commit 3039522
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Composer/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,14 @@ protected function executeBltUpdate($version) {
$this->io->write('<info>Updating BLT templated files...</info>');

// 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('<comment>This may have modified your composer.json and require a subsequent `composer update`</comment>');
$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('<error>Your composer.json dependencies were modified, you MUST run "composer update" to update your composer.lock file. This is not an error.</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`.
Expand Down

0 comments on commit 3039522

Please sign in to comment.