symfony/symfony · error · LogicException
No extensions with configuration available for "%s".
Error message
No extensions with configuration available for "%s".
What it means
Thrown by AbstractConfigCommand::findExtension (used by debug:config / config:dump-reference) when the supplied name does not end with 'Bundle' and matches no kernel alias, no bundle name, and no registered container extension. The command tries to suggest a close match via levenshtein before throwing.
Source
Thrown at src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php:156
$distance = levenshtein($name, $extension->getAlias());
if ($distance < $minScore) {
$guess = $extension->getAlias();
$minScore = $distance;
}
}
if (!str_ends_with($name, 'Bundle')) {
$message = \sprintf('No extensions with configuration available for "%s".', $name);
} else {
$message = \sprintf('No extension with alias "%s" is enabled.', $name);
}
if (isset($guess) && $minScore < 3) {
$message .= \sprintf("\n\nDid you mean \"%s\"?", $guess);
}
throw new LogicException($message);
}
public function validateConfiguration(ExtensionInterface $extension, mixed $configuration): void
{
if (!$configuration) {
throw new \LogicException(\sprintf('The extension with alias "%s" does not have its getConfiguration() method setup.', $extension->getAlias()));
}
if (!$configuration instanceof ConfigurationInterface) {
throw new \LogicException(\sprintf('Configuration class "%s" should implement ConfigurationInterface in order to be dumpable.', get_debug_type($configuration)));
}
}
private function initializeBundles(): array
{
// Re-build bundle manually to initialize DI extensions that can be extended by other bundles in their build() method
// as this method is not called when the container is loaded from the cache.
$kernel = $this->getApplication()->getKernel();View on GitHub (pinned to 698e28026c)
Solutions
- Check the 'Did you mean' suggestion in the error output and use that alias.
- Run `php bin/console debug:config` with no argument to list all available extension aliases.
- Ensure the bundle providing the extension is registered in config/bundles.php for the current environment.
Example fix
# before php bin/console debug:config framwork # after (use correct alias) php bin/console debug:config framework
Defensive patterns
Strategy: validation
Validate before calling
use Symfony\Component\Console\Application;
// List valid aliases before invoking debug:config programmatically
$aliases = array_keys($container->getExtensions());
if (!in_array($name, $aliases, true)) {
throw new \InvalidArgumentException(sprintf('Unknown extension "%s". Known: %s', $name, implode(', ', $aliases)));
} Try / catch
try {
$command->run(new ArrayInput(['name' => $name]), $output);
} catch (\LogicException $e) {
if (str_contains($e->getMessage(), 'No extensions with configuration')) {
// list aliases and prompt for correction
}
throw $e;
} Prevention
- Run debug:config with no argument to enumerate aliases.
- Confirm the bundle/extension is registered in bundles.php for the active environment.
When it happens
Trigger: Running `php bin/console debug:config <name>` where <name> is not a registered extension alias and does not end in 'Bundle' — e.g. a typo like 'framwork', or a name for a bundle/extension that isn't registered in this environment.
Common situations: Typo in the extension alias. The bundle providing the extension isn't registered in kernels.php / bundles.php. Querying an extension only available in another environment (e.g. dev-only bundle from prod).
Related errors
- No extension with alias "%s" is enabled.
- Unable to find configuration for "%s.%s".
- Bundle "%s" does not have a container extension.
- The extension with alias "%s" does not have its getConfigura
- Configuration class "%s" should implement ConfigurationInter
AI-assisted analysis of symfony/symfony@698e28026c (2026-08-06).
Data as JSON: /api/errors/bd077aab3c4a0332.
Report an issue: GitHub.