فهرست منبع

Don't use branch names for downloads since they could change and break the checksum

Jordi Boggiano 13 سال پیش
والد
کامیت
90f22ac749
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/Packagist/WebBundle/Repository/Repository/GitHubRepository.php

+ 1 - 1
src/Packagist/WebBundle/Repository/Repository/GitHubRepository.php

@@ -49,7 +49,7 @@ class GitHubRepository implements RepositoryInterface
     {
         $repoData = $this->getRepositoryData();
         if ($repoData['repository']['has_downloads']) {
-            $label = array_search($identifier, (array) $this->tags) ?: array_search($identifier, (array) $this->branches) ?: $identifier;
+            $label = array_search($identifier, (array) $this->tags) ?: $identifier;
             $url = 'https://github.com/'.$this->owner.'/'.$this->repository.'/zipball/'.$label;
             $checksum = hash_file('sha1', $url);
             return array('type' => 'zip', 'url' => $url, 'shasum' => $checksum ?: '');