mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Merge pull request #7625 from naderman/repository-set
Separate RepositorySet from Package Pool, load only metadata of packages directly required
This commit is contained in:
commit
5c491ecc9b
43 changed files with 826 additions and 507 deletions
|
@ -126,7 +126,7 @@ abstract class Rule
|
|||
|
||||
abstract public function isAssertion();
|
||||
|
||||
public function getPrettyString(Pool $pool, array $installedMap = array())
|
||||
public function getPrettyString(Pool $pool, array $installedMap = array(), array $learnedPool = array())
|
||||
{
|
||||
$literals = $this->getLiterals();
|
||||
|
||||
|
@ -230,7 +230,18 @@ abstract class Rule
|
|||
case self::RULE_PACKAGE_IMPLICIT_OBSOLETES:
|
||||
return $ruleText;
|
||||
case self::RULE_LEARNED:
|
||||
return 'Conclusion: '.$ruleText;
|
||||
// TODO not sure this is a good idea, most of these rules should be listed in the problem anyway
|
||||
$learnedString = '(learned rule, ';
|
||||
if (isset($learnedPool[$this->reasonData])) {
|
||||
foreach ($learnedPool[$this->reasonData] as $learnedRule) {
|
||||
$learnedString .= $learnedRule->getPrettyString($pool, $installedMap, $learnedPool);
|
||||
}
|
||||
} else {
|
||||
$learnedString .= 'reasoning unavailable';
|
||||
}
|
||||
$learnedString .= ')';
|
||||
|
||||
return 'Conclusion: '.$ruleText.' '.$learnedString;
|
||||
case self::RULE_PACKAGE_ALIAS:
|
||||
return $ruleText;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue