浏览代码

fixes #8159

expand interface and add missing methods to aliaspackage
Rob Bast 5 年之前
父节点
当前提交
bd6b758a1b
共有 2 个文件被更改,包括 38 次插入0 次删除
  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);
 }