From c8011af219bbfe832d3dc7eeba447e12fe0df4c7 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 20 Jan 2015 10:49:03 +0000 Subject: [PATCH] Improve message some more, refs #3655 --- src/Composer/Factory.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index fdb5982e4..a6597afd7 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -166,6 +166,9 @@ class Factory } foreach ($config->getRepositories() as $index => $repo) { + if (is_string($repo)) { + throw new \UnexpectedValueException('Repositories should be an array of repository defintions, only a single repository was given'); + } if (!is_array($repo)) { throw new \UnexpectedValueException('Repository "'.$index.'" ('.json_encode($repo).') should be an array, '.gettype($repo).' given'); }