Fix support for uppercase package names in why/why-not commands, fixes #7198
parent
556148510b
commit
78017bcbcb
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue