1
0
Fork 0

Correctly avoid partial updates in require commands

The installer does not support partial updates, when
no lock file is present. The check in require command
to prevent a partial update however does not check whether
a lock file is present, but whether a lock file should be written,
which most likely always is true.

This check is now changed to check if a lock file is actually present.
pull/9336/head
Helmut Hummel 2020-10-24 21:34:34 +02:00
parent 37cb6eb40d
commit d1dfd394c1
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@ EOT
// if no lock is present, or the file is brand new, we do not do a
// partial update as this is not supported by the Installer
if (!$this->firstRequire && $composer->getConfig()->get('lock')) {
if (!$this->firstRequire && $composer->getLocker()->isLocked()) {
$install->setUpdateAllowList(array_keys($requirements));
}