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']); }