merged branch lsmith77/config_dump_ref_list_bundles (PR #7578)
This PR was submitted for the 2.1 branch but it was merged into the master branch instead (closes #7578). Discussion ---------- dump the list of available bundles (and extension alaises) if no name is provided | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Not sure if this should only go into master or if such a small tweak can also go into 2.1 or at least 2.2 Commits ------- 2ba6fca dump the list of available bundles (and extension alaises) if no name is provided
This commit is contained in:
commit
ef52139310
@ -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