From be201924cd9f3f22c21399047d8740ba55025d83 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 10 Apr 2017 18:46:38 +0200 Subject: [PATCH] Revert "Changes the query string parameter `sha` to `ref` to reflect the GitLab API" Fixes #6344, refs #6198 This reverts commit 8a496cd2a7811bea674e1e34cf8ad0deaf3265d7. --- src/Composer/Repository/Vcs/GitLabDriver.php | 2 +- tests/Composer/Test/Repository/Vcs/GitLabDriverTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Repository/Vcs/GitLabDriver.php b/src/Composer/Repository/Vcs/GitLabDriver.php index 99e324b30..dd2a74494 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?ref='.$identifier; + $url = $this->getApiUrl().'/repository/archive.zip?sha='.$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 ed43972bd..fa0cd6ac2 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?ref='.$reference, + 'url' => 'https://gitlab.com/api/v3/projects/mygroup%2Fmyproject/repository/archive.zip?sha='.$reference, 'reference' => $reference, 'shasum' => '', );