1
0
Fork 0

Prevent duplicate PEAR replaces if the given vendorAlias equals the channel alias

pull/898/merge
Jordi Boggiano 2012-07-17 16:48:44 +02:00
parent 7b31abade1
commit 1f31810901
1 changed files with 3 additions and 1 deletions

View File

@ -120,7 +120,9 @@ class PearRepository extends ArrayRepository
}
// 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()}";
$aliasConstraint = new VersionConstraint('==', $normalizedVersion);
$replaces[] = new Link($composerPackageName, $composerPackageAlias, $aliasConstraint, 'replaces', (string) $aliasConstraint);