function RequireCommand::getInconsistentRequireKeys
Parameters
array<string, string> $newRequirements:
Return value
string[]
1 call to RequireCommand::getInconsistentRequireKeys()
- RequireCommand::execute in vendor/
composer/ composer/ src/ Composer/ Command/ RequireCommand.php
File
-
vendor/
composer/ composer/ src/ Composer/ Command/ RequireCommand.php, line 364
Class
- RequireCommand
- @author Jérémy Romey <jeremy@free-agent.fr> @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\CommandCode
private function getInconsistentRequireKeys(array $newRequirements, string $requireKey) : array {
$requireKeys = $this->getPackagesByRequireKey();
$inconsistentRequirements = [];
foreach ($requireKeys as $package => $packageRequireKey) {
if (!isset($newRequirements[$package])) {
continue;
}
if ($requireKey !== $packageRequireKey) {
$inconsistentRequirements[] = $package;
}
}
return $inconsistentRequirements;
}