1
0
Fork 0

Use proper pretty string for the aliased constraint

pull/1243/head
Jordi Boggiano 2012-10-21 19:16:31 +02:00
parent eceda0ffc7
commit 233bdb3863
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ class AliasPackage extends BasePackage implements CompletePackageInterface
foreach ($links as $index => $link) {
// link is self.version, but must be replacing also the replaced version
if ('self.version' === $link->getPrettyConstraint()) {
$links[$index] = new Link($link->getSource(), $link->getTarget(), new VersionConstraint('=', $this->version), $type, $this->version);
$links[$index] = new Link($link->getSource(), $link->getTarget(), new VersionConstraint('=', $this->version), $type, $prettyVersion);
}
}
$this->$type = $links;
@ -70,7 +70,7 @@ class AliasPackage extends BasePackage implements CompletePackageInterface
foreach ($links as $link) {
// link is self.version, but must be replacing also the replaced version
if ('self.version' === $link->getPrettyConstraint()) {
$newLinks[] = new Link($link->getSource(), $link->getTarget(), new VersionConstraint('=', $this->version), $type, $this->version);
$newLinks[] = new Link($link->getSource(), $link->getTarget(), new VersionConstraint('=', $this->version), $type, $prettyVersion);
}
}
$this->$type = array_merge($links, $newLinks);