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

main
Jordi Boggiano 6 years ago
parent 556148510b
commit 78017bcbcb

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

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

Loading…
Cancel
Save