Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Solver.php

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\DependencyResolver

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal