mirror of
https://github.com/composer/composer
synced 2025-05-11 09:32:55 +00:00
Fix VCS drivers to always use identifiers and not tag names since those can change or disappear
This commit is contained in:
parent
30f94365f0
commit
444bdb2e25
4 changed files with 10 additions and 20 deletions
|
@ -65,9 +65,7 @@ class GitBitbucketDriver extends VcsDriver implements VcsDriverInterface
|
|||
*/
|
||||
public function getSource($identifier)
|
||||
{
|
||||
$label = array_search($identifier, $this->getTags()) ?: $identifier;
|
||||
|
||||
return array('type' => 'git', 'url' => $this->getUrl(), 'reference' => $label);
|
||||
return array('type' => 'git', 'url' => $this->getUrl(), 'reference' => $identifier);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -75,10 +73,9 @@ class GitBitbucketDriver extends VcsDriver implements VcsDriverInterface
|
|||
*/
|
||||
public function getDist($identifier)
|
||||
{
|
||||
$label = array_search($identifier, $this->getTags()) ?: $identifier;
|
||||
$url = $this->getScheme() . '://bitbucket.org/'.$this->owner.'/'.$this->repository.'/get/'.$label.'.zip';
|
||||
$url = $this->getScheme() . '://bitbucket.org/'.$this->owner.'/'.$this->repository.'/get/'.$identifier.'.zip';
|
||||
|
||||
return array('type' => 'zip', 'url' => $url, 'reference' => $label, 'shasum' => '');
|
||||
return array('type' => 'zip', 'url' => $url, 'reference' => $identifier, 'shasum' => '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue