File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 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:
2828 cache:clear Clear the cache
2929 ...
3030
31+ .. note ::
32+
33+ ``list `` is the default command, so running ``php bin/console `` is the same.
34+
3135If you find the command you need, you can run it with the ``--help `` option
3236to view the command's documentation:
3337
3438.. code-block :: terminal
3539
3640 $ php bin/console assets:install --help
3741
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+
3849APP_ENV & APP_DEBUG
3950~~~~~~~~~~~~~~~~~~~
4051
Original file line number Diff line number Diff line change @@ -404,4 +404,26 @@ to help you unit test the completion logic::
404404 }
405405 }
406406
407+ .. _console-global-options :
408+
409+ Command Global Options
410+ ----------------------
411+
412+ The Console component adds some predefined options to all commands:
413+
414+ * ``--verbose ``: sets the verbosity level (e.g. ``1 `` the default, ``2 `` and
415+ ``3 ``, or you can use respective shortcuts ``-v ``, ``-vv `` and ``-vvv ``)
416+ * ``--quiet ``: disables output and interaction
417+ * ``--no-interaction ``: disables interaction
418+ * ``--version ``: outputs the version number of the console application
419+ * ``--help ``: displays the command help
420+ * ``--ansi|--no-ansi ``: whether to force of disable coloring the output
421+
422+ When using the ``FrameworkBundle ``, two more options are predefined:
423+
424+ * ``--env ``: sets the Kernel configuration environment (defaults to ``APP_ENV ``)
425+ * ``--no-debug ``: disables Kernel debug (defaults to ``APP_DEBUG ``)
426+
427+ So your custom commands can use them too out-of-the-box.
428+
407429.. _`docopt standard` : http://docopt.org/
You can’t perform that action at this time.
0 commit comments