File tree 2 files changed +33
-0
lines changed
2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,24 @@ the ``list`` command to view all available commands in the application:
28
28
cache:clear Clear the cache
29
29
...
30
30
31
+ .. note ::
32
+
33
+ ``list `` is the default command, so running ``php bin/console `` is the same.
34
+
31
35
If you find the command you need, you can run it with the ``--help `` option
32
36
to view the command's documentation:
33
37
34
38
.. code-block :: terminal
35
39
36
40
$ php bin/console assets:install --help
37
41
42
+ .. note ::
43
+
44
+ ``--help `` is one of the built-in global options from the Console component,
45
+ which are available for all commands, including those you can create.
46
+ To learn more about them, you can read
47
+ :ref: `this section <console-global-options >`.
48
+
38
49
APP_ENV & APP_DEBUG
39
50
~~~~~~~~~~~~~~~~~~~
40
51
Original file line number Diff line number Diff line change @@ -407,4 +407,26 @@ to help you unit test the completion logic::
407
407
}
408
408
}
409
409
410
+ .. _console-global-options :
411
+
412
+ Command Global Options
413
+ ----------------------
414
+
415
+ The Console component adds some predefined options to all commands:
416
+
417
+ * ``--verbose ``: sets the verbosity level (e.g. ``1 `` the default, ``2 `` and
418
+ ``3 ``, or you can use respective shortcuts ``-v ``, ``-vv `` and ``-vvv ``)
419
+ * ``--quiet ``: disables output and interaction
420
+ * ``--no-interaction ``: disables interaction
421
+ * ``--version ``: outputs the version number of the console application
422
+ * ``--help ``: displays the command help
423
+ * ``--ansi|--no-ansi ``: whether to force of disable coloring the output
424
+
425
+ When using the ``FrameworkBundle ``, two more options are predefined:
426
+
427
+ * ``--env ``: sets the Kernel configuration environment (defaults to ``APP_ENV ``)
428
+ * ``--no-debug ``: disables Kernel debug (defaults to ``APP_DEBUG ``)
429
+
430
+ So your custom commands can use them too out-of-the-box.
431
+
410
432
.. _`docopt standard` : http://docopt.org/
You can’t perform that action at this time.
0 commit comments