Make sure update mirrors/--lock keeps the release date of the original reference when dev versions have newer commits, refs #9812
parent
0ab4013788
commit
e6cede4a61
|
@ -93,12 +93,13 @@ class LockTransaction extends Transaction
|
|||
// we do not reset references if the currently present package didn't have any, or if the type of VCS has changed
|
||||
if ($updateMirrors && !isset($this->presentMap[spl_object_hash($package)])) {
|
||||
foreach ($this->presentMap as $presentPackage) {
|
||||
if ($package->getName() == $presentPackage->getName() &&
|
||||
$package->getVersion() == $presentPackage->getVersion() &&
|
||||
$presentPackage->getSourceReference() &&
|
||||
$presentPackage->getSourceType() === $package->getSourceType()
|
||||
) {
|
||||
$package->setSourceDistReferences($presentPackage->getSourceReference());
|
||||
if ($package->getName() == $presentPackage->getName() && $package->getVersion() == $presentPackage->getVersion()) {
|
||||
if ($presentPackage->getSourceReference() && $presentPackage->getSourceType() === $package->getSourceType()) {
|
||||
$package->setSourceDistReferences($presentPackage->getSourceReference());
|
||||
}
|
||||
if ($presentPackage->getReleaseDate()) {
|
||||
$package->setReleaseDate($presentPackage->getReleaseDate());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ g/g is dev and installed in a different ref than the #ref, so it gets updated an
|
|||
"name": "a/a", "version": "dev-master",
|
||||
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/a/newa", "type": "git" },
|
||||
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/a/newa/zipball/1111111111111111111111111111111111111111", "type": "zip" },
|
||||
"time": "2021-03-27T14:32:16+00:00",
|
||||
"time": "2021-03-14T16:24:37+00:00",
|
||||
"type": "library"
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue