From d43dd336325527ba23eb1914c966d4ef4eaba860 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 5 Feb 2012 16:14:44 +0100 Subject: [PATCH] Add scripts loading --- src/Composer/Package/Loader/ArrayLoader.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Composer/Package/Loader/ArrayLoader.php b/src/Composer/Package/Loader/ArrayLoader.php index 183818826..6d6f4f15d 100644 --- a/src/Composer/Package/Loader/ArrayLoader.php +++ b/src/Composer/Package/Loader/ArrayLoader.php @@ -74,6 +74,13 @@ class ArrayLoader $package->setBinaries($config['bin']); } + if (isset($config['scripts']) && is_array($config['scripts'])) { + foreach ($config['scripts'] as $event => $listeners) { + $config['scripts'][$event]= (array) $listeners; + } + $package->setScripts($config['scripts']); + } + if (!empty($config['description']) && is_string($config['description'])) { $package->setDescription($config['description']); }