if ($requiredVersion && $versionSelector->findBestCandidate($name, null, $phpVersion, $preferredStability)) {
throw new \InvalidArgumentException(sprintf(
'Could not find package %s in a version matching %s', $name, $requiredVersion
));
}
// Check whether the PHP version was the problem
// Check whether the PHP version was the problem
if ($phpVersion && $versionSelector->findBestCandidate($name)) {
if ($phpVersion && $versionSelector->findBestCandidate($name)) {
throw new \InvalidArgumentException(sprintf(
throw new \InvalidArgumentException(sprintf(
@ -655,7 +663,7 @@ EOT
}
}
throw new \InvalidArgumentException(sprintf(
throw new \InvalidArgumentException(sprintf(
'Could not find package %s at any version for your minimum-stability (%s). Check the package spelling or your minimum-stability',
'Could not find a matching version of package %s. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (%s).',
@ -43,7 +43,7 @@ class SolverProblemsException extends \RuntimeException
}
}
if (strpos($text, 'could not be found') || strpos($text, 'no matching package found')) {
if (strpos($text, 'could not be found') || strpos($text, 'no matching package found')) {
$text .= "\nPotential causes:\n - A typo in the package name\n - The package is not available in a stable-enough version according to your minimum-stability setting\n see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.\n\nRead <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.";
$text .= "\nPotential causes:\n - A typo in the package name\n - The package is not available in a stable-enough version according to your minimum-stability setting\n see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.\n - It's a private package and you forgot to add a custom repository to find it\n\nRead <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.";