1
0
Fork 0

Ensure dist url/type/checksum remain the same when doing lock hash updates, refs #11787

pull/11791/head
Jordi Boggiano 2024-01-10 13:33:49 +01:00
parent ca433076b1
commit 042a8c2128
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,9 @@ class LockTransaction extends Transaction
if ($package->getName() === $presentPackage->getName() && $package->getVersion() === $presentPackage->getVersion()) { if ($package->getName() === $presentPackage->getName() && $package->getVersion() === $presentPackage->getVersion()) {
if ($presentPackage->getSourceReference() && $presentPackage->getSourceType() === $package->getSourceType()) { if ($presentPackage->getSourceReference() && $presentPackage->getSourceType() === $package->getSourceType()) {
$package->setSourceDistReferences($presentPackage->getSourceReference()); $package->setSourceDistReferences($presentPackage->getSourceReference());
$package->setDistUrl($presentPackage->getDistUrl());
$package->setDistType($presentPackage->getDistType());
$package->setDistSha1Checksum($presentPackage->getDistSha1Checksum());
} }
if ($presentPackage->getReleaseDate() !== null && $package instanceof Package) { if ($presentPackage->getReleaseDate() !== null && $package instanceof Package) {
$package->setReleaseDate($presentPackage->getReleaseDate()); $package->setReleaseDate($presentPackage->getReleaseDate());