From 233bdb386307fdb16d3d3ab06921f48b1a68c0bf Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 21 Oct 2012 19:16:31 +0200 Subject: [PATCH] Use proper pretty string for the aliased constraint --- src/Composer/Package/AliasPackage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Package/AliasPackage.php b/src/Composer/Package/AliasPackage.php index 1fe7ff2f8..965570807 100644 --- a/src/Composer/Package/AliasPackage.php +++ b/src/Composer/Package/AliasPackage.php @@ -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);