diff --git a/src/Composer/Repository/Vcs/GitLabDriver.php b/src/Composer/Repository/Vcs/GitLabDriver.php index 3db305641..8c4d6e25a 100644 --- a/src/Composer/Repository/Vcs/GitLabDriver.php +++ b/src/Composer/Repository/Vcs/GitLabDriver.php @@ -175,7 +175,7 @@ class GitLabDriver extends VcsDriver */ public function getDist($identifier) { - $url = $this->getApiUrl().'/repository/archive.zip?sha='.$identifier; + $url = $this->getApiUrl().'/repository/archive.zip?ref='.$identifier; return array('type' => 'zip', 'url' => $url, 'reference' => $identifier, 'shasum' => ''); } diff --git a/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php b/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php index 02d40813b..e377bf523 100644 --- a/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php +++ b/tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php @@ -144,7 +144,7 @@ JSON; $reference = 'c3ebdbf9cceddb82cd2089aaef8c7b992e536363'; $expected = array( 'type' => 'zip', - 'url' => 'https://gitlab.com/api/v3/projects/mygroup%2Fmyproject/repository/archive.zip?sha='.$reference, + 'url' => 'https://gitlab.com/api/v3/projects/mygroup%2Fmyproject/repository/archive.zip?ref='.$reference, 'reference' => $reference, 'shasum' => '', );