Skip to content

Commit 515a3ed

Browse files
committed
minor symfony#13231 [WIP] Made help information of commands more consistent (WouterJ)
This PR was squashed before being merged into the 2.3 branch (closes symfony#13231). Discussion ---------- [WIP] Made help information of commands more consistent | Q | A | --- | --- | Test pass | Not yet | License | MIT | Fixed tickets | - Commits ------- 602d687 [WIP] Made help information of commands more consistent
2 parents 1201853 + 602d687 commit 515a3ed

24 files changed

+160
-175
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ protected function configure()
3939
->setDescription('Installs bundles web assets under a public web directory')
4040
->setHelp(<<<EOT
4141
The <info>%command.name%</info> command installs bundle assets into a given
42-
directory (e.g. the web directory).
42+
directory (e.g. the <comment>web</comment> directory).
4343
44-
<info>php %command.full_name% web</info>
44+
<info>php %command.full_name% web</info>
4545
46-
A "bundles" directory will be created inside the target directory, and the
46+
A "bundles" directory will be created inside the target directory and the
4747
"Resources/public" directory of each bundle will be copied into it.
4848
4949
To create a symlink to each bundle instead of copying its assets, use the
5050
<info>--symlink</info> option:
5151
52-
<info>php %command.full_name% web --symlink</info>
52+
<info>php %command.full_name% web --symlink</info>
5353
5454
To make symlink relative, add the <info>--relative</info> option:
5555
56-
<info>php %command.full_name% web --symlink --relative</info>
56+
<info>php %command.full_name% web --symlink --relative</info>
5757
5858
EOT
5959
)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ protected function configure()
4141
The <info>%command.name%</info> command clears the application cache for a given environment
4242
and debug mode:
4343
44-
<info>php %command.full_name% --env=dev</info>
45-
<info>php %command.full_name% --env=prod --no-debug</info>
44+
<info>php %command.full_name% --env=dev</info>
45+
<info>php %command.full_name% --env=prod --no-debug</info>
4646
EOF
4747
)
4848
;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,23 @@ protected function configure()
5959
<info>php %command.full_name% validator</info>
6060
6161
By default, private services are hidden. You can display all services by
62-
using the --show-private flag:
62+
using the <info>--show-private</info> flag:
6363
6464
<info>php %command.full_name% --show-private</info>
6565
6666
Use the --tags option to display tagged <comment>public</comment> services grouped by tag:
6767
6868
<info>php %command.full_name% --tags</info>
6969
70-
Find all services with a specific tag by specifying the tag name with the --tag option:
70+
Find all services with a specific tag by specifying the tag name with the <info>--tag</info> option:
7171
7272
<info>php %command.full_name% --tag=form.type</info>
7373
74-
Use the --parameters option to display all parameters:
74+
Use the <info>--parameters</info> option to display all parameters:
7575
7676
<info>php %command.full_name% --parameters</info>
7777
78-
Display a specific parameter by specifying his name with the --parameter option:
78+
Display a specific parameter by specifying his name with the <info>--parameter</info> option:
7979
8080
<info>php %command.full_name% --parameter=kernel.debug</info>
8181
EOF

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function configure()
4949
$this
5050
->setName('router:dump-apache')
5151
->setDefinition(array(
52-
new InputArgument('script_name', InputArgument::OPTIONAL, 'The script name of the application\'s front controller.'),
52+
new InputArgument('script_name', InputArgument::OPTIONAL, 'The script name of the application\'s front controller'),
5353
new InputOption('base-uri', null, InputOption::VALUE_REQUIRED, 'The base URI'),
5454
))
5555
->setDescription('Dumps all routes as Apache rewrite rules')

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

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,26 +36,11 @@ protected function configure()
3636
->setDefinition(array(
3737
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
3838
new InputArgument('bundle', InputArgument::REQUIRED, 'The bundle where to load the messages'),
39-
new InputOption(
40-
'prefix', null, InputOption::VALUE_OPTIONAL,
41-
'Override the default prefix', '__'
42-
),
43-
new InputOption(
44-
'output-format', null, InputOption::VALUE_OPTIONAL,
45-
'Override the default output format', 'yml'
46-
),
47-
new InputOption(
48-
'dump-messages', null, InputOption::VALUE_NONE,
49-
'Should the messages be dumped in the console'
50-
),
51-
new InputOption(
52-
'force', null, InputOption::VALUE_NONE,
53-
'Should the update be done'
54-
),
55-
new InputOption(
56-
'clean', null, InputOption::VALUE_NONE,
57-
'Should clean not found messages'
58-
),
39+
new InputOption('prefix', null, InputOption::VALUE_OPTIONAL, 'Override the default prefix', '__'),
40+
new InputOption('output-format', null, InputOption::VALUE_OPTIONAL, 'Override the default output format', 'yml'),
41+
new InputOption('dump-messages', null, InputOption::VALUE_NONE, 'Should the messages be dumped in the console'),
42+
new InputOption('force', null, InputOption::VALUE_NONE, 'Should the update be done'),
43+
new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'),
5944
))
6045
->setDescription('Updates the translation file')
6146
->setHelp(<<<EOF
@@ -64,8 +49,8 @@ protected function configure()
6449
When new translation strings are found it can automatically add a prefix to the translation
6550
message.
6651
67-
<info>php %command.full_name% --dump-messages en AcmeBundle</info>
68-
<info>php %command.full_name% --force --prefix="new_" fr AcmeBundle</info>
52+
<info>php %command.full_name% --dump-messages en AcmeBundle</info>
53+
<info>php %command.full_name% --force --prefix="new_" fr AcmeBundle</info>
6954
EOF
7055
)
7156
;

src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ protected function configure()
3434
->setHelp(<<<EOF
3535
The <info>%command.name%</info> command mounts ACL tables in the database.
3636
37-
<info>php %command.full_name%</info>
37+
<info>php %command.full_name%</info>
3838
3939
The name of the DBAL connection must be configured in your <info>app/config/security.yml</info> configuration file in the <info>security.acl.connection</info> variable.
4040
41-
<info>security:
42-
acl:
43-
connection: default</info>
41+
<info>security:
42+
acl:
43+
connection: default</info>
4444
EOF
4545
)
4646
;

src/Symfony/Bundle/TwigBundle/Command/LintCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@ protected function configure()
3333
The <info>%command.name%</info> command lints a template and outputs to stdout
3434
the first encountered syntax error.
3535
36-
<info>php %command.full_name% filename</info>
36+
<info>php %command.full_name% filename</info>
3737
3838
The command gets the contents of <comment>filename</comment> and validates its syntax.
3939
40-
<info>php %command.full_name% dirname</info>
40+
<info>php %command.full_name% dirname</info>
4141
4242
The command finds all twig templates in <comment>dirname</comment> and validates the syntax
4343
of each Twig template.
4444
45-
<info>php %command.full_name% @AcmeMyBundle</info>
45+
<info>php %command.full_name% @AcmeMyBundle</info>
4646
4747
The command finds all twig templates in the <comment>AcmeMyBundle</comment> bundle and validates
4848
the syntax of each Twig template.
4949
50-
<info>cat filename | php %command.full_name%</info>
50+
<info>cat filename | php %command.full_name%</info>
5151
5252
The command gets the template contents from stdin and validates its syntax.
5353
EOF

src/Symfony/Bundle/WebProfilerBundle/Command/ExportCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected function configure()
5656
->setHelp(<<<EOF
5757
The <info>%command.name%</info> command exports a profile to the standard output:
5858
59-
<info>php %command.full_name% profile_token</info>
59+
<info>php %command.full_name% profile_token</info>
6060
EOF
6161
)
6262
;

src/Symfony/Bundle/WebProfilerBundle/Command/ImportCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ protected function configure()
5656
->setHelp(<<<EOF
5757
The <info>%command.name%</info> command imports a profile:
5858
59-
<info>php %command.full_name% profile_filepath</info>
59+
<info>php %command.full_name% profile_filepath</info>
6060
6161
You can also pipe the profile via STDIN:
6262
63-
<info>cat profile_file | php %command.full_name%</info>
63+
<info>cat profile_file | php %command.full_name%</info>
6464
EOF
6565
)
6666
;

src/Symfony/Component/Console/Application.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -936,13 +936,13 @@ protected function getDefaultInputDefinition()
936936
return new InputDefinition(array(
937937
new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
938938

939-
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message.'),
940-
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message.'),
941-
new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.'),
942-
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version.'),
943-
new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output.'),
944-
new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output.'),
945-
new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question.'),
939+
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
940+
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'),
941+
new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'),
942+
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
943+
new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'),
944+
new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'),
945+
new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'),
946946
));
947947
}
948948

0 commit comments

Comments
 (0)