Reset composer to load the new requirements, fixes #3511
parent
6340f4ca58
commit
d249d0c121
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -219,6 +219,14 @@ class Application extends BaseApplication
|
|||
return $this->composer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the cached composer instance
|
||||
*/
|
||||
public function resetComposer()
|
||||
{
|
||||
$this->composer = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return IOInterface
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue