mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
Implement getProviders on reposet for all repo types and add replacers
This way errors during require dev extraction make more sense
This commit is contained in:
parent
ddb1e79bef
commit
1f467046d7
5 changed files with 64 additions and 9 deletions
|
@ -31,7 +31,7 @@ class SolverProblemsException extends \RuntimeException
|
|||
parent::__construct('Failed resolving dependencies with '.count($problems).' problems, call getPrettyString to get formatted details', 2);
|
||||
}
|
||||
|
||||
public function getPrettyString(RepositorySet $repositorySet, Request $request, Pool $pool)
|
||||
public function getPrettyString(RepositorySet $repositorySet, Request $request, Pool $pool, $isDevExtraction = false)
|
||||
{
|
||||
$installedMap = $request->getPresentMap(true);
|
||||
$text = "\n";
|
||||
|
@ -44,7 +44,7 @@ class SolverProblemsException extends \RuntimeException
|
|||
}
|
||||
}
|
||||
|
||||
if (strpos($text, 'could not be found') || strpos($text, 'no matching package found')) {
|
||||
if (!$isDevExtraction && (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 - 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.";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue