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

Breadcrumb

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

function CheckCircularReferencesPass::process

Checks the ContainerBuilder object for circular references.

Overrides CompilerPassInterface::process

File

vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php, line 35

Class

CheckCircularReferencesPass
Checks your services for circular references.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

public function process(ContainerBuilder $container) : void {
    $graph = $container->getCompiler()
        ->getServiceReferenceGraph();
    $this->checkedNodes = [];
    foreach ($graph->getNodes() as $id => $node) {
        $this->currentPath = [
            $id,
        ];
        $this->checkOutEdges($node->getOutEdges());
    }
}
RSS feed
Powered by Drupal