8000 Merge branch '2.5' into 2.6 · symfony/symfony@eabc9b8 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eabc9b8

Browse files
committed
Merge branch '2.5' into 2.6
* 2.5: [WIP] Made help information of commands more consistent Made help information consistent Conflicts: src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php src/Symfony/Component/Console/Tests/Fixtures/application_1.txt src/Symfony/Component/Console/Tests/Fixtures/application_2.txt src/Symfony/Component/Console/Tests/Fixtures/application_astext1.txt src/Symfony/Component/Console/Tests/Fixtures/application_astext2.txt src/Symfony/Component/Console/Tests/Fixtures/application_gethelp.txt src/Symfony/Component/Console/Tests/Fixtures/application_run1.txt
2 parents a9fd402 + 111a88c commit eabc9b8

33 files changed

+191
-210
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@ protected function configure()
4040
->setDescription('Installs bundles web assets under a public web directory')
4141
->setHelp(<<<EOT
4242
The <info>%command.name%</info> command installs bundle assets into a given
43-
directory (e.g. the web directory).
43+
directory (e.g. the <comment>web</comment> directory).
4444
45-
<info>php %command.full_name% web</info>
45+
<info>php %command.full_name% web</info>
4646
47-
A "bundles" directory will be created inside the target directory, and the
47+
A "bundles" directory will be created inside the target directory and the
4848
"Resources/public" directory of each bundle will be copied into it.
4949
5050
To create a symlink to each bundle instead of copying its assets, use the
5151
<info>--symlink</info> option (will fall back to hard copies when symbolic links aren't possible:
5252
53-
<info>php %command.full_name% web --symlink</info>
53+
<info>php %command.full_name% web --symlink</info>
5454
5555
To make symlink relative, add the <info>--relative</info> option:
5656
57-
<info>php %command.full_name% web --symlink --relative</info>
57+
<info>php %command.full_name% web --symlink --relative</info>
5858
5959
EOT
6060
)

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ protected F438 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>
46-
44+
<info>php %command.full_name% --env=dev</info>
45+
<info>php %command.full_name% --env=prod --no-debug</info>
4746
EOF
4847
)
4948
;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ protected function configure()
3535
'config:debug',
3636
))
3737
->setDefinition(array(
38-
new InputArgument('name', InputArgument::OPTIONAL, 'The Bundle name or the extension alias'),
38+
new InputArgument('name', InputArgument::OPTIONAL, 'The bundle name or the extension alias'),
3939
))
4040
->setDescription('Dumps the current configuration for an extension')
4141
->setHelp(<<<EOF
42-
4342
The <info>%command.name%</info> command dumps the current configuration for an
4443
extension/bundle.
4544

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected function configure()
4848
<info>php %command.full_name% framework</info>
4949
<info>php %command.full_name% FrameworkBundle</info>
5050
51-
With the <info>format</info> option specifies the format of the configuration,
51+
With the <info>--format</info> option specifies the format of the configuration,
5252
this is either <comment>yaml</comment> or <comment>xml</comment>.
5353
When the option is not provided, <comment>yaml</comment> is used.
5454

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,23 +64,23 @@ protected function configure()
6464
<info>php %command.full_name% validator</info>
6565
6666
By default, private services are hidden. You can display all services by
67-
using the --show-private flag:
67+
using the <info>--show-private</info> flag:
6868
6969
<info>php %command.full_name% --show-private</info>
7070
7171
Use the --tags option to display tagged <comment>public</comment> services grouped by tag:
7272
7373
<info>php %command.full_name% --tags</info>
7474
75-
Find all services with a specific tag by specifying the tag name with the --tag option:
75+
Find all services with a specific tag by specifying the tag name with the <info>--tag</info> option:
7676
7777
<info>php %command.full_name% --tag=form.type</info>
7878
79-
Use the --parameters option to display all parameters:
79+
Use the <info>--parameters</info> option to display all parameters:
8080
8181
<info>php %command.full_name% --parameters</info>
8282
83-
Display a specific parameter by specifying his name with the --parameter option:
83+
Display a specific parameter by specifying his name with the <info>--parameter</info> option:
8484
8585
<info>php %command.full_name% --parameter=kernel.debug</info>
8686

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

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function configure()
6464
The <info>%command.name%</info> displays the configured routes:
6565
6666
<info>php %command.full_name%</info>
67-
67+
6868
EOF
6969
)
7070
;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ protected function configure()
6060
The <info>%command.name%</info> shows which routes match a given request and which don't and for what reason:
6161
6262
<info>php %command.full_name% /foo</info>
63-
or
63+
64+
or
65+
6466
<info>php %command.full_name% /foo --method POST --scheme https --host symfony.com --verbose</info>
6567
6668
EOF

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ protected function configure()
5757
5858
You can display information about bundle translations in a specific locale:
5959
60-
<info>php %command.full_name% en AcmeDemoBundle</info>
60+
<info>php %command.full_name% en AcmeDemoBundle</info>
6161
6262
You can also specify a translation domain for the search:
6363
64-
<info>php %command.full_name% --domain=messages en AcmeDemoBundle</info>
64+
<info>php %command.full_name% --domain=messages en AcmeDemoBundle</info>
6565
6666
You can only display missing messages:
6767
68-
<info>php %command.full_name% --only-missing en AcmeDemoBundle</info>
68+
<info>php %command.full_name% --only-missing en AcmeDemoBundle</info>
6969
7070
You can only display unused messages:
7171
72-
<info>php %command.full_name% --only-unused en AcmeDemoBundle</info>
72+
<info>php %command.full_name% --only-unused en AcmeDemoBundle</info>
7373
7474
EOF
7575
)

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

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,12 @@ protected function configure()
3636
->setDefinition(array(
3737
new InputArgument('locale', InputArgument::REQUIRED, 'The locale'),
3838
new InputArgument('bundle', InputArgument::OPTIONAL, 'The bundle where to load the messages, defaults to app/Resources folder', null),
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-
'no-backup', null, InputOption::VALUE_NONE,
57-
'Should backup be disabled'
58-
),
59-
new InputOption(
60-
'clean', null, InputOption::VALUE_NONE,
61-
'Should clean not found messages'
62-
),
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('no-backup', null, InputOption::VALUE_NONE, 'Should backup be disabled'),
44+
new InputOption('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'),
6345
))
6446
->setDescription('Updates the translation file')
6547
->setHelp(<<<EOF
@@ -69,13 +51,12 @@ protected function configure()
6951
message.
7052
7153
Example running against a Bundle (AcmeBundle)
72-
<info>php %command.full_name% --dump-messages en AcmeBundle</info>
73-
<info>php %command.full_name% --force --prefix="new_" fr AcmeBundle</info>
54+
<info>php %command.full_name% --dump-messages en AcmeBundle</info>
55+
<info>php %command.full_name% --force --prefix="new_" fr AcmeBundle</info>
7456
7557
Example running against app messages (app/Resources folder)
76-
<info>php %command.full_name% --dump-messages en</info>
77-
<info>php %command.full_name% --force --prefix="new_" fr</info>
78-
58+
<info>php %command.full_name% --dump-messages en</info>
59+
<info>php %command.full_name% --force --prefix="new_" fr</info>
7960
EOF
8061
)
8162
;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ protected function configure()
4343
4444
You can validate the syntax of a file:
4545
46-
<info>php %command.full_name% filename</info>
46+
<info>php %command.full_name% filename</info>
4747
4848
Or of a whole directory:
4949
50-
<info>php %command.full_name% dirname</info>
51-
<info>php %command.full_name% dirname --format=json</info>
50+
<info>php %command.full_name% dirname</info>
51+
<info>php %command.full_name% dirname --format=json</info>
5252
5353
Or all YAML files in a bundle:
5454
55-
<info>php %command.full_name% @AcmeDemoBundle</info>
55+
<info>php %command.full_name% @AcmeDemoBundle</info>
5656
5757
You can also pass the YAML contents from STDIN:
5858
59-
<info>cat filename | php %command.full_name%</info>
59+
<info>cat filename | php %command.full_name%</info>
6060
6161
EOF
6262
)

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/DebugCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ protected function configure()
4040
The <info>%command.name%</info> command outputs a list of twig functions,
4141
filters, globals and tests. Output can be filtered with an optional argument.
4242
43-
<info>php %command.full_name%</info>
43+
<info>php %command.full_name%</info>
4444
4545
The command lists all functions, filters, etc.
4646
47-
<info>php %command.full_name% date</info>
47+
<info>php %command.full_name% date</info>
4848
4949
The command lists everything that contains the word date.
5050
51-
<info>php %command.full_name% --format=json</info>
51+
<info>php %command.full_name% --format=json</info>
5252
5353
The command lists everything in a machine readable json format.
5454
EOF

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ protected function configure()
5656
->setHelp(
5757
$this->getHelp().<<<EOF
5858
59-
6059
Or all template files in a bundle:
6160
62-
<info>php %command.full_name% @AcmeDemoBundle</info>
61+
<info>php %command.full_name% @AcmeDemoBundle</info>
62+
6363
EOF
6464
)
6565
;

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
@@ -921,13 +921,13 @@ protected function getDefaultInputDefinition()
921921
return new InputDefinition(array(
922922
new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
923923

924-
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message.'),
925-
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message.'),
926-
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.'),
927-
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version.'),
928-
new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output.'),
929-
new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output.'),
930-
new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question.'),
924+
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
925+
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'),
926+
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'),
927+
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
928+
new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'),
929+
new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'),
930+
new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'),
931931
));
932932
}
933933

0 commit comments

Comments
 (0)
0