Skip to content

Commit fdaa513

Browse files
javiereguiluzfabpot
authored andcommitted
Updated the styles of the config parameters
1 parent bee1faa commit fdaa513

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use Symfony\Component\Config\Definition\ConfigurationInterface;
1515
use Symfony\Component\Console\Helper\Table;
16-
use Symfony\Component\Console\Output\OutputInterface;
1716
use Symfony\Component\Console\Style\StyleInterface;
1817
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
1918

@@ -26,7 +25,7 @@
2625
*/
2726
abstract class AbstractConfigCommand extends ContainerDebugCommand
2827
{
29-
protected function listBundles(OutputInterface $output)
28+
protected function listBundles($output)
3029
{
3130
$headers = array('Bundle name', 'Extension alias');
3231
$rows = array();
@@ -35,12 +34,10 @@ protected function listBundles(OutputInterface $output)
3534
$rows[] = array($bundle->getName(), $extension ? $extension->getAlias() : '');
3635
}
3736

38-
$message = 'Available registered bundles with their extension alias if available:';
3937
if ($output instanceof StyleInterface) {
40-
$output->writeln(' '.$message);
4138
$output->table($headers, $rows);
4239
} else {
43-
$output->writeln($message);
40+
$output->writeln('Available registered bundles with their extension alias if available:');
4441
$table = new Table($output);
4542
$table->setHeaders($headers)->setRows($rows)->render($output);
4643
}

src/Symfony/Bundle/FrameworkBundle/Command/ConfigDebugCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
6666
$name = $input->getArgument('name');
6767

6868
if (empty($name)) {
69+
$output->comment('Provide the name of a bundle as the first argument of this command to dump its configuration.');
70+
$output->newLine();
6971
$this->listBundles($output);
7072

7173
return;
@@ -85,9 +87,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
8587
$config = $processor->processConfiguration($configuration, $configs);
8688

8789
if ($name === $extension->getAlias()) {
88-
$output->writeln(sprintf('# Current configuration for extension with alias: "%s"', $name));
90+
$output->title(sprintf('Current configuration for extension with alias "%s"', $name));
8991
} else {
90-
$output->writeln(sprintf('# Current configuration for "%s"', $name));
92+
$output->title(sprintf('Current configuration for "%s"', $name));
9193
}
9294

9395
$output->writeln(Yaml::dump(array($extension->getAlias() => $config), 3));

src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
7171
$name = $input->getArgument('name');
7272

7373
if (empty($name)) {
74+
$output->comment('Provide the name of a bundle as the first argument of this command to dump its default configuration.');
75+
$output->newLine();
7476
$this->listBundles($output);
7577

7678
return;

0 commit comments

Comments
 (0)