Prevent duplicate PEAR replaces if the given vendorAlias equals the channel alias
parent
7b31abade1
commit
1f31810901
|
@ -120,7 +120,9 @@ class PearRepository extends ArrayRepository
|
||||||
}
|
}
|
||||||
|
|
||||||
// alias package with user-specified prefix. it makes private pear channels looks like composer's.
|
// alias package with user-specified prefix. it makes private pear channels looks like composer's.
|
||||||
if (!empty($this->vendorAlias)) {
|
if (!empty($this->vendorAlias)
|
||||||
|
&& ($this->vendorAlias != 'pear-'.$channelInfo->getAlias() || $channelInfo->getName() != $packageDefinition->getChannelName())
|
||||||
|
) {
|
||||||
$composerPackageAlias = "{$this->vendorAlias}/{$packageDefinition->getPackageName()}";
|
$composerPackageAlias = "{$this->vendorAlias}/{$packageDefinition->getPackageName()}";
|
||||||
$aliasConstraint = new VersionConstraint('==', $normalizedVersion);
|
$aliasConstraint = new VersionConstraint('==', $normalizedVersion);
|
||||||
$replaces[] = new Link($composerPackageName, $composerPackageAlias, $aliasConstraint, 'replaces', (string) $aliasConstraint);
|
$replaces[] = new Link($composerPackageName, $composerPackageAlias, $aliasConstraint, 'replaces', (string) $aliasConstraint);
|
||||||
|
|
Loading…
Reference in New Issue