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

Skip to content

Commit 2b7a150

Browse files
committed
Merge branch '2.6' into 2.7
* 2.6: [WIP] Made help information of commands more consistent [2.6] Added internal annotation on Descriptor classes Made CLI help consistent Made help information consistent
2 parents b009902 + eabc9b8 commit 2b7a150

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+229
-222
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
< 10000 span class=pl-s>
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 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('[DEPRECATED] 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/ServerStartCommand.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,23 @@ protected function configure()
4141
->setHelp(<<<EOF
4242
The <info>%command.name%</info> runs PHP's built-in web server:
4343
44-
<info>%command.full_name%</info>
44+
<info>php %command.full_name%</info>
4545
4646
To change the default bind address and the default port use the <info>address</info> argument:
4747
48-
<info>%command.full_name% 127.0.0.1:8080</info>
48+
<info>php %command.full_name% 127.0.0.1:8080</info>
4949
5050
To change the default document root directory use the <info>--docroot</info> option:
5151
52-
<info>%command.full_name% --docroot=htdocs/</info>
52+
<info>php %command.full_name% --docroot=htdocs/</info>
5353
5454
If you have a custom document root directory layout, you can specify your own
5555
router script using the <info>--router</info> option:
5656
57-
<info>%command.full_name% --router=app/config/router.php</info>
57+
<info>php %command.full_name% --router=app/config/router.php</info>
5858
59-
Specifying a router script is required when the used environment is not "dev" or
60-
"prod".
59+
Specifying a router script is required when the used environment is not <comment>"dev"</comment> or
60+
<comment>"prod"</comment>.
6161
6262
See also: http://www.php.net/manual/en/features.commandline.webserver.php
6363

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ protected function configure()
3636
->setHelp(<<<EOF
3737
The <info>%command.name%</info> stops PHP's built-in web server:
3838
39-
<info>%command.full_name%</info>
39+
<info>php %command.full_name%</info>
4040
4141
To change the default bind address and the default port use the <info>address</info> argument:
4242
43-
<info>%command.full_name% 127.0.0.1:8080</info>
43+
<info>php %command.full_name% 127.0.0.1:8080</info>
4444
4545
EOF
4646
)

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/FrameworkBundle/Console/Descriptor/Descriptor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
/**
2626
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
27+
*
28+
* @internal
2729
*/
2830
abstract class Descriptor implements DescriptorInterface
2931
{

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/JsonDescriptor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626
/**
2727
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
28+
*
29+
* @internal
2830
*/
2931
class JsonDescriptor extends Descriptor
3032
{

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
/**
2323
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
24+
*
25+
* @internal
2426
*/
2527
class MarkdownDescriptor extends Descriptor
2628
{

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
/**
2424
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
25+
*
26+
* @internal
2527
*/
2628
class TextDescriptor extends Descriptor
2729
{

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/XmlDescriptor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
/**
2424
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
25+
*
26+
* @internal
2527
*/
2628
class XmlDescriptor extends Descriptor
2729
{

src/Symfony/Bundle/FrameworkBundle/Console/Helper/DescriptorHelper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
/**
2121
* @author Jean-François Simon <jeanfrancois.simon@sensiolabs.com>
22+
*
23+
* @internal
2224
*/
2325
class DescriptorHelper extends BaseDescriptorHelper
2426
{

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/SecurityBundle/Command/SetAclCommand.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,22 @@ protected function configure()
5959
The <info>%command.name%</info> command sets ACL.
6060
The ACL system must have been initialized with the <info>init:acl</info> command.
6161
62-
To set <comment>VIEW</comment> and <comment>EDIT</comment> permissions for the user <comment>kevin</comment> on the instance of <comment>Acme\MyClass</comment> having the identifier <comment>42</comment>:
62+
To set <comment>VIEW</comment> and <comment>EDIT</comment> permissions for the user <comment>kevin</comment> on the instance of
63+
<comment>Acme\MyClass</comment> having the identifier <comment>42</comment>:
6364
64-
<info>php %command.full_name% --user=Symfony/Component/Security/Core/User/User:kevin VIEW EDIT Acme/MyClass:42</info>
65+
<info>php %command.full_name% --user=Symfony/Component/Security/Core/User/User:kevin VIEW EDIT Acme/MyClass:42</info>
6566
6667
Note that you can use <comment>/</comment> instead of <comment>\\ </comment>for the namespace delimiter to avoid any
6768
problem.
6869
6970
To set permissions for a role, use the <info>--role</info> option:
7071
71-
<info>php %command.full_name% --role=ROLE_USER VIEW Acme/MyClass:1936</info>
72+
<info>php %command.full_name% --role=ROLE_USER VIEW Acme/MyClass:1936</info>
7273
7374
To set permissions at the class scope, use the <info>--class-scope</info> option:
7475
75-
<info>php %command.full_name% --class-scope --user=Symfony/Component/Security/Core/User/User:anne OWNER Acme/MyClass:42</info>
76+
<info>php %command.full_name% --class-scope --user=Symfony/Component/Security/Core/User/User:anne OWNER Acme/MyClass:42</info>
77+
7678
EOF
7779
)
7880
->addArgument('arguments', InputArgument::IS_ARRAY | InputArgument::REQUIRED, 'A list of permissions and object identities (class name and ID separated by a column)')

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
;

0 commit comments

Comments
 (0)
0