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

Breadcrumb

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

function CheckExceptionOnInvalidReferenceBehaviorPass::process

Overrides AbstractRecursivePass::process

File

vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php, line 30

Class

CheckExceptionOnInvalidReferenceBehaviorPass
Checks that all references are pointing to a valid service.

Namespace

Symfony\Component\DependencyInjection\Compiler

Code

public function process(ContainerBuilder $container) : void {
    $this->serviceLocatorContextIds = [];
    foreach ($container->findTaggedServiceIds('container.service_locator_context') as $id => $tags) {
        $this->serviceLocatorContextIds[$id] = $tags[0]['id'];
        $container->getDefinition($id)
            ->clearTag('container.service_locator_context');
    }
    try {
        parent::process($container);
    } finally {
        $this->serviceLocatorContextIds = [];
    }
}

API Navigation

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