diff --git a/src/Composer/Package/RootAliasPackage.php b/src/Composer/Package/RootAliasPackage.php index 4c2701cd6..32def7e46 100644 --- a/src/Composer/Package/RootAliasPackage.php +++ b/src/Composer/Package/RootAliasPackage.php @@ -70,6 +70,14 @@ class RootAliasPackage extends AliasPackage implements RootPackageInterface return $this->aliasOf->config; } + /** + * {@inheritDoc} + */ + public function getScripts() + { + return $this->aliasOf->scripts; + } + /** * {@inheritDoc} */ diff --git a/src/Composer/Package/RootPackage.php b/src/Composer/Package/RootPackage.php index 79c0f502f..459e8d7d4 100644 --- a/src/Composer/Package/RootPackage.php +++ b/src/Composer/Package/RootPackage.php @@ -23,6 +23,7 @@ class RootPackage extends CompletePackage implements RootPackageInterface protected $preferStable = false; protected $stabilityFlags = array(); protected $config = array(); + protected $scripts = array(); protected $references = array(); protected $aliases = array(); @@ -98,6 +99,24 @@ class RootPackage extends CompletePackage implements RootPackageInterface return $this->config; } + /** + * Set the scripts + * + * @param array $scripts + */ + public function setScripts($scripts) + { + $this->scripts = $scripts; + } + + /** + * {@inheritDoc} + */ + public function getScripts() + { + return $this->scripts; + } + /** * Set the references * diff --git a/src/Composer/Package/RootPackageInterface.php b/src/Composer/Package/RootPackageInterface.php index 7a3be9d8e..7cf846955 100644 --- a/src/Composer/Package/RootPackageInterface.php +++ b/src/Composer/Package/RootPackageInterface.php @@ -65,6 +65,13 @@ interface RootPackageInterface extends CompletePackageInterface */ public function getConfig(); + /** + * Returns the root package's scripts + * + * @return array + */ + public function getScripts(); + /** * Set the required packages *