Follow ignore-platform-reqs when checking for package requirements, fixes #6859
parent
e2ad3ea85a
commit
8a50345df7
|
@ -660,8 +660,9 @@ EOT
|
|||
*
|
||||
* @param InputInterface $input
|
||||
* @param string $name
|
||||
* @param string $phpVersion
|
||||
* @param string|null $phpVersion
|
||||
* @param string $preferredStability
|
||||
* @param string|null $requiredVersion
|
||||
* @param string $minimumStability
|
||||
* @throws \InvalidArgumentException
|
||||
* @return string
|
||||
|
@ -672,6 +673,12 @@ EOT
|
|||
$versionSelector = new VersionSelector($this->getPool($input, $minimumStability));
|
||||
$package = $versionSelector->findBestCandidate($name, $requiredVersion, $phpVersion, $preferredStability);
|
||||
|
||||
// retry without phpVersion if platform requirements are ignored in case nothing was found
|
||||
if ($input->hasOption('ignore-platform-reqs') && $input->getOption('ignore-platform-reqs')) {
|
||||
$phpVersion = null;
|
||||
$package = $versionSelector->findBestCandidate($name, $requiredVersion, $phpVersion, $preferredStability);
|
||||
}
|
||||
|
||||
if (!$package) {
|
||||
// Check whether the PHP version was the problem
|
||||
if ($phpVersion && $versionSelector->findBestCandidate($name, $requiredVersion, null, $preferredStability)) {
|
||||
|
|
Loading…
Reference in New Issue