Fix update mirrors to also update transport-options, fixes #7672

main
Jordi Boggiano 5 years ago
parent db6882b57f
commit 362ebe4f68
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -1178,7 +1178,7 @@ class Installer
$newReference = $rootRefs[$package->getName()];
}
$this->updatePackageUrl($package, $newSourceUrl, $newPackage->getSourceType(), $newReference, $newPackage->getDistUrl(), $newPackage->getDistType(), $newPackage->getDistSha1Checksum());
$this->updatePackageUrl($package, $newSourceUrl, $newPackage->getSourceType(), $newReference, $newPackage->getDistUrl(), $newPackage->getDistType(), $newPackage->getDistSha1Checksum(), $newPackage);
if ($package instanceof CompletePackage && $newPackage instanceof CompletePackage) {
$package->setAbandoned($newPackage->getReplacementPackage() ?: $newPackage->isAbandoned());
@ -1186,6 +1186,7 @@ class Installer
$package->setDistMirrors($newPackage->getDistMirrors());
$package->setSourceMirrors($newPackage->getSourceMirrors());
$package->setTransportOptions($newPackage->getTransportOptions());
}
}
}

@ -42,7 +42,8 @@ g/g is dev and installed in a different ref than the #ref, so it gets updated an
{
"name": "f/f", "version": "dev-master",
"source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/f/newf", "type": "git" },
"dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/f/newf/tarball/2222222222222222222222222222222222222222", "type": "tar", "shasum": "newsum" }
"dist": { "reference": "2222222222222222222222222222222222222222", "url": "https://api.github.com/repos/f/newf/tarball/2222222222222222222222222222222222222222", "type": "tar", "shasum": "newsum" },
"transport-options": { "foo": "bar2" }
},
{
"name": "g/g", "version": "dev-master",
@ -87,12 +88,14 @@ g/g is dev and installed in a different ref than the #ref, so it gets updated an
{
"name": "f/f", "version": "dev-master",
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/f/f", "type": "git" },
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/f/f/zipball/1111111111111111111111111111111111111111", "type": "zip", "shasum": "oldsum" }
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/f/f/zipball/1111111111111111111111111111111111111111", "type": "zip", "shasum": "oldsum" },
"transport-options": { "foo": "bar" }
},
{
"name": "g/g", "version": "dev-master",
"source": { "reference": "0000000000000000000000000000000000000000", "url": "https://github.com/g/g", "type": "git" },
"dist": { "reference": "0000000000000000000000000000000000000000", "url": "https://api.github.com/repos/g/g/zipball/0000000000000000000000000000000000000000", "type": "zip", "shasum": "oldsum" }
"dist": { "reference": "0000000000000000000000000000000000000000", "url": "https://api.github.com/repos/g/g/zipball/0000000000000000000000000000000000000000", "type": "zip", "shasum": "oldsum" },
"transport-options": { "foo": "bar" }
}
]
--EXPECT-LOCK--
@ -132,7 +135,8 @@ g/g is dev and installed in a different ref than the #ref, so it gets updated an
"name": "f/f", "version": "dev-master",
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/f/newf", "type": "git" },
"dist": { "reference": "1111111111111111111111111111111111111111", "url": "https://api.github.com/repos/f/newf/tarball/1111111111111111111111111111111111111111", "type": "tar", "shasum": "newsum" },
"type": "library"
"type": "library",
"transport-options": { "foo": "bar2" }
},
{
"name": "g/g", "version": "dev-master",

Loading…
Cancel
Save