Browse Source

Use proper pretty string for the aliased constraint

Jordi Boggiano 12 years ago
parent
commit
233bdb3863
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Composer/Package/AliasPackage.php

+ 2 - 2
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);