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

Breadcrumb

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

function UndefinedExtensionHandler::getErrorMessage

4 calls to UndefinedExtensionHandler::getErrorMessage()
ContainerConfigurator::extension in vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php
PhpFileLoader::configBuilder in vendor/symfony/dependency-injection/Loader/PhpFileLoader.php
XmlFileLoader::validateExtensions in vendor/symfony/dependency-injection/Loader/XmlFileLoader.php
Validates an extension.
YamlFileLoader::validate in vendor/symfony/dependency-injection/Loader/YamlFileLoader.php
Validates a YAML file.

File

vendor/symfony/dependency-injection/Loader/UndefinedExtensionHandler.php, line 30

Class

UndefinedExtensionHandler

Namespace

Symfony\Component\DependencyInjection\Loader

Code

public static function getErrorMessage(string $extensionName, ?string $loadingFilePath, string $namespaceOrAlias, array $foundExtensionNamespaces) : string {
    $message = '';
    if (isset(self::BUNDLE_EXTENSIONS[$extensionName])) {
        $message .= \sprintf('Did you forget to install or enable the %s? ', self::BUNDLE_EXTENSIONS[$extensionName]);
    }
    $message .= match (true) {    \is_string($loadingFilePath) => \sprintf('There is no extension able to load the configuration for "%s" (in "%s"). ', $extensionName, $loadingFilePath),
        default => \sprintf('There is no extension able to load the configuration for "%s". ', $extensionName),
    
    };
    return $message . \sprintf('Looked for namespace "%s", found "%s".', $namespaceOrAlias, $foundExtensionNamespaces ? implode('", "', $foundExtensionNamespaces) : 'none');
}
RSS feed
Powered by Drupal