1
0
Fork 0

Avoid requiring a lock file to run composer remove, fixes #9439

pull/9461/head
Jordi Boggiano 2020-11-11 14:46:10 +01:00
parent 4468248c46
commit 87006774b1
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 6 additions and 1 deletions

View File

@ -253,13 +253,18 @@ EOT
->setApcuAutoloader($apcu, $apcuPrefix)
->setUpdate(true)
->setInstall(!$input->getOption('no-install'))
->setUpdateAllowList($packages)
->setUpdateAllowTransitiveDependencies($updateAllowTransitiveDependencies)
->setIgnorePlatformRequirements($ignorePlatformReqs)
->setRunScripts(!$input->getOption('no-scripts'))
->setDryRun($dryRun)
;
// if no lock is present, we do not do a partial update as
// this is not supported by the Installer
if ($composer->getLocker()->isLocked()) {
$install->setUpdateAllowList($packages);
}
$status = $install->run();
if ($status !== 0) {
$io->writeError("\n".'<error>Removal failed, reverting '.$file.' to its original content.</error>');