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

Skip to content

Commit cbcd0f4

Browse files
committed
Merge branch '2.3' into 2.5
* 2.3: [WIP] Made help information of commands more consistent Conflicts: src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php src/Symfony/Bundle/TwigBundle/Command/LintCommand.php src/Symfony/Component/Console/Tests/Fixtures/application_1.json src/Symfony/Component/Console/Tests/Fixtures/application_2.json
2 parents e3ca516 + 515a3ed commit cbcd0f4

26 files changed

+175
-196
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +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>
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/ContainerDebugCommand.php

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

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'),< 10000 /div>
5858
))
5959
->setDescription('Dumps all routes as Apache rewrite rules')

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

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +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-
'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('clean', null, InputOption::VALUE_NONE, 'Should clean not found messages'),
6344
))
6445
->setDescription('Updates the translation file')
6546
->setHelp(<<<EOF
@@ -68,9 +49,8 @@ protected function configure()
6849
When new translation strings are found it can automatically add a prefix to the translation
6950
message.
7051
71-
<info>php %command.full_name% --dump-messages en AcmeBundle</info>
72-
<info>php %command.full_name% --force --prefix="new_" fr AcmeBundle</info>
73-
52+
<info>php %command.full_name% --dump-messages en AcmeBundle</info>
53+
<info>php %command.full_name% --force --prefix="new_" fr AcmeBundle</info>
7454
EOF
7555
)
7656
;

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/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
)
626 F440 2
;

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
@@ -932,13 +932,13 @@ protected function getDefaultInputDefinition()
932932
return new InputDefinition(array(
933933
new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'),
934934

935-
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message.'),
936-
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message.'),
937-
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.'),
938-
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version.'),
939-
new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output.'),
940-
new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output.'),
941-
new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question.'),
935+
new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'),
936+
new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'),
937+
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'),
938+
new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this application version'),
939+
new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'),
940+
new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'),
941+
new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'),
942942
));
943943
}
944944

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"commands":[{"name":"help","usage":"help [--xml] [--format=\"...\"] [--raw] [command_name]","description":"Displays help for a command","help":"The <info>help<\/info> command displays help for a given command:\n\n <info>php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.","aliases":[],"definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output help in other formats","default":"txt"},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command help","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message.","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message.","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version.","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output.","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output.","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question.","default":false}}}},{"name":"list","usage":"list [--xml] [--raw] [--format=\"...\"] [namespace]","description":"Lists commands","help":"The <info>list<\/info> command lists all commands:\n\n <info>php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php app\/console list --raw<\/info>","aliases":[],"definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output list in other formats","default":"txt"}}}}],"namespaces":[{"id":"_global","commands":["help","list"]}]}
1+
{"commands":[{"name":"help","usage":"help [--xml] [--format=\"...\"] [--raw] [command_name]","description":"Displays help for a command","help":"The <info>help<\/info> command displays help for a given command:\n\n <info>php app\/console help list<\/info>\n\nYou can also output the help in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console help --format=xml list<\/info>\n\nTo display the list of available commands, please use the <info>list<\/info> command.","aliases":[],"definition":{"arguments":{"command_name":{"name":"command_name","is_required":false,"is_array":false,"description":"The command name","default":"help"}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output help as XML","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output help in other formats","default":"txt"},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command help","default":false},"help":{"name":"--help","shortcut":"-h","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this help message","default":false},"quiet":{"name":"--quiet","shortcut":"-q","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not output any message","default":false},"verbose":{"name":"--verbose","shortcut":"-v|-vv|-vvv","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug","default":false},"version":{"name":"--version","shortcut":"-V","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Display this application version","default":false},"ansi":{"name":"--ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Force ANSI output","default":false},"no-ansi":{"name":"--no-ansi","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Disable ANSI output","default":false},"no-interaction":{"name":"--no-interaction","shortcut":"-n","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"Do not ask any interactive question","default":false}}}},{"name":"list","usage":"list [--xml] [--raw] [--format=\"...\"] [namespace]","description":"Lists commands","help":"The <info>list<\/info> command lists all commands:\n\n <info>php app\/console list<\/info>\n\nYou can also display the commands for a specific namespace:\n\n <info>php app\/console list test<\/info>\n\nYou can also output the information in other formats by using the <comment>--format<\/comment> option:\n\n <info>php app\/console list --format=xml<\/info>\n\nIt's also possible to get raw list of commands (useful for embedding command runner):\n\n <info>php app\/console list --raw<\/info>","aliases":[],"definition":{"arguments":{"namespace":{"name":"namespace","is_required":false,"is_array":false,"description":"The namespace name","default":null}},"options":{"xml":{"name":"--xml","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output list as XML","default":false},"raw":{"name":"--raw","shortcut":"","accept_value":false,"is_value_required":false,"is_multiple":false,"description":"To output raw command list","default":false},"format":{"name":"--format","shortcut":"","accept_value":true,"is_value_required":true,"is_multiple":false,"description":"To output list in other formats","default":"txt"}}}}],"namespaces":[{"id":"_global","commands":["help","list"]}]}

src/Symfony/Component/Console/Tests/Fixtures/application_1.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ To display the list of available commands, please use the <info>list</info> comm
7070
* Accept value: no
7171
* Is value required: no
7272
* Is multiple: no
73-
* Description: Display this help message.
73+
* Description: Display this help message
7474
* Default: `false`
7575

7676
**quiet:**
@@ -80,7 +80,7 @@ To display the list of available commands, please use the <info>list</info> comm
8080
* Accept value: no
8181
* Is value required: no
8282
* Is multiple: no
83-
* Description: Do not output any message.
83+
* Description: Do not output any message
8484
* Default: `false`
8585

8686
**verbose:**
@@ -90,7 +90,7 @@ To display the list of available commands, please use the <info>list</info> comm
9090
* Accept value: no
9191
* Is value required: no
9292
* Is multiple: no
93-
* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
93+
* Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
9494
* Default: `false`
9595

9696
**version:**
@@ -100,7 +100,7 @@ To display the list of available commands, please use the <info>list</info> comm
100100
* Accept value: no
101101
* Is value required: no
102102
* Is multiple: no
103-
* Description: Display this application version.
103+
* Description: Display this application version
104104
* Default: `false`
105105

106106
**ansi:**
@@ -110,7 +110,7 @@ To display the list of available commands, please use the <info>list</info> comm
110110
* Accept value: no
111111
* Is value required: no
112112
* Is multiple: no
113-
* Description: Force ANSI output.
113+
* Description: Force ANSI output
114114
* Default: `false`
115115

116116
**no-ansi:**
@@ -120,7 +120,7 @@ To display the list of available commands, please use the <info>list</info> comm
120120
* Accept value: no
121121
* Is value required: no
122122
* Is multiple: no
123-
* Description: Disable ANSI output.
123+
* Description: Disable ANSI output
124124
* Default: `false`
125125

126126
**no-interaction:**
@@ -130,7 +130,7 @@ To display the list of available commands, please use the <info>list</info> comm
130130
* Accept value: no
131131
* Is value required: no
132132
* Is multiple: no
133-
* Description: Do not ask any interactive question.
133+
* Description: Do not ask any interactive question
134134
* Default: `false`
135135

136136
list

src/Symfony/Component/Console/Tests/Fixtures/application_1.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
[options] command [arguments]
55

66
<comment>Options:</comment>
7-
<info>--help</info> <info>-h</info> Display this help message.
8-
<info>--quiet</info> <info>-q</info> Do not output any message.
9-
<info>--verbose</info> <info>-v|vv|vvv</info> Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
10-
<info>--version</info> <info>-V</info> Display this application version.
11-
<info>--ansi</info> Force ANSI output.
12-
<info>--no-ansi</info> Disable ANSI output.
13-
<info>--no-interaction</info> <info>-n</info> Do not ask any interactive question.
7+
<info>--help</info> <info>-h</info> Display this help message
8+
<info>--quiet</info> <info>-q</info> Do not output any message
9+
<info>--verbose</info> <info>-v|vv|vvv</info> Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
10+
<info>--version</info> <info>-V</info> Display this application version
11+
<info>--ansi</info> Force ANSI output
12+
<info>--no-ansi</info> Disable ANSI output
13+
<info>--no-interaction</info> <info>-n</info> Do not ask any interactive question
1414

1515
<comment>Available commands:</comment>
1616
<info>help </info> Displays help for a command

0 commit comments

Comments
 (0)
0