From aa74818fe00c5f5eb57c1c38b807e9e2950c670c Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Fri, 21 Feb 2014 16:52:27 +0100 Subject: [PATCH] Handle array candidates in whatProvides --- src/Composer/DependencyResolver/Pool.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Composer/DependencyResolver/Pool.php b/src/Composer/DependencyResolver/Pool.php index 75b5aa7b2..18f2d5797 100644 --- a/src/Composer/DependencyResolver/Pool.php +++ b/src/Composer/DependencyResolver/Pool.php @@ -268,7 +268,10 @@ class Pool $nameMatch = false; foreach ($candidates as $candidate) { - if ($this->whitelist !== null && !isset($this->whitelist[$candidate->getId()])) { + if ($this->whitelist !== null && ( + (is_array($candidate) && isset($candidate['id']) && !isset($this->whitelist[$candidate['id']])) || + (is_object($candidate) && !isset($this->whitelist[$candidate->getId()])) + )) { continue; } switch ($this->match($candidate, $name, $constraint)) {