1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 09:02:59 +00:00

Move construction of pool from repo set into a pool builder

Pool construction depends on the install request now, so only required
packages get loaded, add some structure for future asynchronously
loading composer repositories
This commit is contained in:
Nils Adermann 2018-09-12 11:49:09 +02:00
parent 4c7d271a36
commit c0f19f6c57
20 changed files with 357 additions and 248 deletions

View file

@ -21,11 +21,13 @@ class SolverProblemsException extends \RuntimeException
{
protected $problems;
protected $installedMap;
protected $learnedPool;
public function __construct(array $problems, array $installedMap)
public function __construct(array $problems, array $installedMap, array $learnedPool)
{
$this->problems = $problems;
$this->installedMap = $installedMap;
$this->learnedPool = $learnedPool;
parent::__construct($this->createMessage(), 2);
}
@ -35,7 +37,7 @@ class SolverProblemsException extends \RuntimeException
$text = "\n";
$hasExtensionProblems = false;
foreach ($this->problems as $i => $problem) {
$text .= " Problem ".($i + 1).$problem->getPrettyString($this->installedMap)."\n";
$text .= " Problem ".($i + 1).$problem->getPrettyString($this->installedMap, $this->learnedPool)."\n";
if (!$hasExtensionProblems && $this->hasExtensionProblems($problem->getReasons())) {
$hasExtensionProblems = true;