Avoid updating the lock hash if there is no lock
parent
a39f57bcd7
commit
f1163bdbd4
|
@ -216,7 +216,7 @@ EOT
|
|||
$io->write('<info>No requirements to update in '.$composerJsonPath.'.</info>');
|
||||
}
|
||||
|
||||
if (!$dryRun && $composer->getLocker()->isLocked() && $changeCount > 0) {
|
||||
if (!$dryRun && $composer->getLocker()->isLocked() && $composer->getConfig()->get('lock') && $changeCount > 0) {
|
||||
$composer->getLocker()->updateHash($composerJson);
|
||||
}
|
||||
|
||||
|
|
|
@ -554,7 +554,7 @@ EOT
|
|||
|
||||
if (!$dryRun) {
|
||||
$this->updateFile($this->json, $requirements, $requireKey, $removeKey, $sortPackages);
|
||||
if ($locker->isLocked()) {
|
||||
if ($locker->isLocked() && $composer->getConfig()->get('lock')) {
|
||||
$stabilityFlags = RootPackageLoader::extractStabilityFlags($requirements, $composer->getPackage()->getMinimumStability(), []);
|
||||
$locker->updateHash($this->json, function (array $lockData) use ($stabilityFlags) {
|
||||
foreach ($stabilityFlags as $packageName => $flag) {
|
||||
|
|
Loading…
Reference in New Issue