1
0
Fork 0

Fix support for uppercase package names in why/why-not commands, fixes #7198

pull/7096/merge
Jordi Boggiano 2018-04-12 12:14:30 +02:00
parent 556148510b
commit 78017bcbcb
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ class BaseDependencyCommand extends BaseCommand
); );
// Find packages that are or provide the requested package first // Find packages that are or provide the requested package first
$packages = $pool->whatProvides($needle); $packages = $pool->whatProvides(strtolower($needle));
if (empty($packages)) { if (empty($packages)) {
throw new \InvalidArgumentException(sprintf('Could not find package "%s" in your project', $needle)); throw new \InvalidArgumentException(sprintf('Could not find package "%s" in your project', $needle));
} }

View File

@ -39,7 +39,7 @@ abstract class BaseRepository implements RepositoryInterface
*/ */
public function getDependents($needle, $constraint = null, $invert = false, $recurse = true, $packagesFound = null) public function getDependents($needle, $constraint = null, $invert = false, $recurse = true, $packagesFound = null)
{ {
$needles = (array) $needle; $needles = array_map('strtolower', (array) $needle);
$results = array(); $results = array();
// initialize the array with the needles before any recursion occurs // initialize the array with the needles before any recursion occurs