1
0
Fork 0

Also update source type and reference when changing URLs

pull/4428/head
Matthias Pigulla 2015-09-18 12:04:21 +02:00
parent 0cbf679f21
commit 2db52ebeba
1 changed files with 2 additions and 0 deletions

View File

@ -1023,7 +1023,9 @@ class Installer
$newPackage = $pool->literalToPackage($matches[0]);
// update the dist and source URLs
$package->setSourceType($newPackage->getSourceType());
$package->setSourceUrl($newPackage->getSourceUrl());
$package->setSourceReference($newPackage->getSourceReference());
// only update dist url for github/bitbucket dists as they use a combination of dist url + dist reference to install
// but for other urls this is ambiguous and could result in bad outcomes
if (preg_match('{^https?://(?:(?:www\.)?bitbucket\.org|(api\.)?github\.com)/}', $newPackage->getDistUrl())) {