Skip to content

[Console] Add env var to disable direct output #19309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions console/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,14 @@ The Console component adds some predefined options to all commands:
* ``--help``: displays the command help
* ``--ansi|--no-ansi``: whether to force of disable coloring the output

To disable the output of a command, you can also set the
``SYMFONY_CONSOLE_OUTPUT`` environment variable to ``false``.

.. versionadded:: 7.1

The support for the ``SYMFONY_CONSOLE_OUTPUT`` environment variable was
introduced in Symfony 7.1.

When using the ``FrameworkBundle``, two more options are predefined:

* ``--env``: sets the Kernel configuration environment (defaults to ``APP_ENV``)
Expand Down