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

main
Jordi Boggiano 4 years ago
parent 4468248c46
commit 87006774b1
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -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>');

Loading…
Cancel
Save