1
0
Fork 0

Reset composer to load the new requirements, fixes #3511

pull/2581/merge
Jordi Boggiano 2014-12-05 11:58:21 +00:00
parent 6340f4ca58
commit d249d0c121
3 changed files with 19 additions and 0 deletions

View File

@ -68,6 +68,15 @@ abstract class Command extends BaseCommand
$this->composer = $composer;
}
/**
* Removes the cached composer instance
*/
public function resetComposer()
{
$this->composer = null;
$this->getApplication()->resetComposer();
}
/**
* @return IOInterface
*/

View File

@ -125,6 +125,8 @@ EOT
$updateDevMode = !$input->getOption('update-no-dev');
// Update packages
$this->resetComposer();
$composer = $this->getComposer();
$composer->getDownloadManager()->setOutputProgress(!$input->getOption('no-progress'));
$io = $this->getIO();

View File

@ -219,6 +219,14 @@ class Application extends BaseApplication
return $this->composer;
}
/**
* Removes the cached composer instance
*/
public function resetComposer()
{
$this->composer = null;
}
/**
* @return IOInterface
*/