From 2db52ebebab221fe6e5c56cfa730444ad5bc3c2d Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Fri, 18 Sep 2015 12:04:21 +0200 Subject: [PATCH] Also update source type and reference when changing URLs --- src/Composer/Installer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Composer/Installer.php b/src/Composer/Installer.php index a61475f3c..667d60d96 100644 --- a/src/Composer/Installer.php +++ b/src/Composer/Installer.php @@ -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())) {