1
0
Fork 0

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

pull/8257/head
Jordi Boggiano 2019-07-31 18:43:18 +02:00
parent db6882b57f
commit 362ebe4f68
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 10 additions and 5 deletions

View File

@ -1178,7 +1178,7 @@ class Installer
$newReference = $rootRefs[$package->getName()]; $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) { if ($package instanceof CompletePackage && $newPackage instanceof CompletePackage) {
$package->setAbandoned($newPackage->getReplacementPackage() ?: $newPackage->isAbandoned()); $package->setAbandoned($newPackage->getReplacementPackage() ?: $newPackage->isAbandoned());
@ -1186,6 +1186,7 @@ class Installer
$package->setDistMirrors($newPackage->getDistMirrors()); $package->setDistMirrors($newPackage->getDistMirrors());
$package->setSourceMirrors($newPackage->getSourceMirrors()); $package->setSourceMirrors($newPackage->getSourceMirrors());
$package->setTransportOptions($newPackage->getTransportOptions());
} }
} }
} }

View File

@ -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", "name": "f/f", "version": "dev-master",
"source": { "reference": "2222222222222222222222222222222222222222", "url": "https://github.com/f/newf", "type": "git" }, "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", "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", "name": "f/f", "version": "dev-master",
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/f/f", "type": "git" }, "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", "name": "g/g", "version": "dev-master",
"source": { "reference": "0000000000000000000000000000000000000000", "url": "https://github.com/g/g", "type": "git" }, "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-- --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", "name": "f/f", "version": "dev-master",
"source": { "reference": "1111111111111111111111111111111111111111", "url": "https://github.com/f/newf", "type": "git" }, "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" }, "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", "name": "g/g", "version": "dev-master",