class UndefinedExtensionHandler
Hierarchy
- class \Symfony\Component\DependencyInjection\Loader\UndefinedExtensionHandler
Expanded class hierarchy of UndefinedExtensionHandler
1 file declares its use of UndefinedExtensionHandler
- ContainerConfigurator.php in vendor/
symfony/ dependency-injection/ Loader/ Configurator/ ContainerConfigurator.php
File
-
vendor/
symfony/ dependency-injection/ Loader/ UndefinedExtensionHandler.php, line 14
Namespace
Symfony\Component\DependencyInjection\LoaderView source
class UndefinedExtensionHandler {
private const BUNDLE_EXTENSIONS = [
'debug' => 'DebugBundle',
'doctrine' => 'DoctrineBundle',
'doctrine_migrations' => 'DoctrineMigrationsBundle',
'framework' => 'FrameworkBundle',
'maker' => 'MakerBundle',
'monolog' => 'MonologBundle',
'security' => 'SecurityBundle',
'twig' => 'TwigBundle',
'twig_component' => 'TwigComponentBundle',
'ux_icons' => 'UXIconsBundle',
'web_profiler' => 'WebProfilerBundle',
];
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');
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
UndefinedExtensionHandler::BUNDLE_EXTENSIONS | private | constant | |
UndefinedExtensionHandler::getErrorMessage | public static | function |