Clarify behavior of name in VCS repo, closes #9752
parent
c81562b343
commit
17747181d0
|
@ -247,7 +247,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
|
|||
continue;
|
||||
}
|
||||
|
||||
$tagPackageName = isset($data['name']) ? $data['name'] : $this->packageName;
|
||||
$tagPackageName = $this->packageName ?: (isset($data['name']) ? $data['name'] : '');
|
||||
if ($existingPackage = $this->findPackage($tagPackageName, $data['version_normalized'])) {
|
||||
if ($isVeryVerbose) {
|
||||
$this->io->writeError('<warning>Skipped tag '.$tag.', it conflicts with an another tag ('.$existingPackage->getPrettyVersion().') as both resolve to '.$data['version_normalized'].' internally</warning>');
|
||||
|
@ -386,6 +386,8 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
|
|||
protected function preProcess(VcsDriverInterface $driver, array $data, $identifier)
|
||||
{
|
||||
// keep the name of the main identifier for all packages
|
||||
// this ensures that a package can be renamed in one place and that all old tags
|
||||
// will still be installable using that new name without requiring re-tagging
|
||||
$dataPackageName = isset($data['name']) ? $data['name'] : null;
|
||||
$data['name'] = $this->packageName ?: $dataPackageName;
|
||||
|
||||
|
|
Loading…
Reference in New Issue