Ver Fonte

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

Jordi Boggiano há 13 anos atrás
pai
commit
90f22ac749

+ 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 ?: '');