function Solver::analyzeUnsolvableRule
Parameters
array<string, true> $ruleSeen:
1 call to Solver::analyzeUnsolvableRule()
- Solver::analyzeUnsolvable in vendor/
composer/ composer/ src/ Composer/ DependencyResolver/ Solver.php
File
-
vendor/
composer/ composer/ src/ Composer/ DependencyResolver/ Solver.php, line 492
Class
- Solver
- @author Nils Adermann <naderman@naderman.de>
Namespace
Composer\DependencyResolverCode
private function analyzeUnsolvableRule(Problem $problem, Rule $conflictRule, array &$ruleSeen) : void {
$why = spl_object_hash($conflictRule);
$ruleSeen[$why] = true;
if ($conflictRule->getType() === RuleSet::TYPE_LEARNED) {
$learnedWhy = $this->learnedWhy[$why];
$problemRules = $this->learnedPool[$learnedWhy];
foreach ($problemRules as $problemRule) {
if (!isset($ruleSeen[spl_object_hash($problemRule)])) {
$this->analyzeUnsolvableRule($problem, $problemRule, $ruleSeen);
}
}
return;
}
if ($conflictRule->getType() === RuleSet::TYPE_PACKAGE) {
// package rules cannot be part of a problem
return;
}
$problem->nextSection();
$problem->addRule($conflictRule);
}