dump the list of available bundles (and extension alaises) if no name is provided
This commit is contained in:
parent
6d552c956e
commit
d36f4aed80
@ -32,7 +32,7 @@ class ConfigDumpReferenceCommand extends ContainerDebugCommand
|
||||
$this
|
||||
->setName('config:dump-reference')
|
||||
->setDefinition(array(
|
||||
new InputArgument('name', InputArgument::REQUIRED, 'The Bundle or extension alias')
|
||||
new InputArgument('name', InputArgument::OPTIONAL, 'The Bundle or extension alias')
|
||||
))
|
||||
->setDescription('Dumps default configuration for an extension')
|
||||
->setHelp(<<<EOF
|
||||
@ -64,6 +64,16 @@ EOF
|
||||
|
||||
$name = $input->getArgument('name');
|
||||
|
||||
if (empty($name)) {
|
||||
$output->writeln('Available registered bundles with their extension alias if available:');
|
||||
foreach ($bundles as $bundle) {
|
||||
$extension = $bundle->getContainerExtension();
|
||||
$output->writeln($bundle->getName().($extension ? ': '.$extension->getAlias() : ''));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$extension = null;
|
||||
|
||||
if (preg_match('/Bundle$/', $name)) {
|
||||
|
Reference in New Issue
Block a user