Browse Source

fixes #8159

expand interface and add missing methods to aliaspackage
Rob Bast 5 years ago
parent
commit
bd6b758a1b
2 changed files with 38 additions and 0 deletions
  1. 10 0
      src/Composer/Package/AliasPackage.php
  2. 28 0
      src/Composer/Package/PackageInterface.php

+ 10 - 0
src/Composer/Package/AliasPackage.php

@@ -401,4 +401,14 @@ class AliasPackage extends BasePackage implements CompletePackageInterface
     {
         return parent::__toString().' (alias of '.$this->aliasOf->getVersion().')';
     }
+
+    public function setDistUrl($url)
+    {
+        return $this->aliasOf->setDistUrl($url);
+    }
+
+    public function setDistType($type)
+    {
+        return $this->aliasOf->setDistType($type);
+    }
 }

+ 28 - 0
src/Composer/Package/PackageInterface.php

@@ -358,4 +358,32 @@ interface PackageInterface
      * @return array
      */
     public function getTransportOptions();
+
+    /**
+     * @param string $reference
+     *
+     * @return void
+     */
+    public function setSourceReference($reference);
+
+    /**
+     * @param string $url
+     *
+     * @return void
+     */
+    public function setDistUrl($url);
+
+    /**
+     * @param string $type
+     *
+     * @return void
+     */
+    public function setDistType($type);
+
+    /**
+     * @param string $reference
+     *
+     * @return void
+     */
+    public function setDistReference($reference);
 }