diff --git a/console.rst b/console.rst index 0658ed9a3df..08d5d2adb75 100644 --- a/console.rst +++ b/console.rst @@ -98,6 +98,15 @@ completion (by default, by pressing the Tab key). $ php vendor/bin/phpstan completion --help $ composer completion --help +.. tip:: + + If you are using the :doc:`Symfony local web server`, + it is recommended to use the builtin completion script that will ensure the + right PHP version and configuration is used when running the Console + Completion. Run ``symfony completion --help`` for the installation + instructions for your shell. The Symfony CLI will provide completion for the + ``console`` and ``composer`` commands. + Creating a Command ------------------ diff --git a/setup/symfony_server.rst b/setup/symfony_server.rst index 5fa3e430b1c..e241279fc95 100644 --- a/setup/symfony_server.rst +++ b/setup/symfony_server.rst @@ -17,6 +17,17 @@ Installation The Symfony server is part of the ``symfony`` binary created when you `install Symfony`_ and has support for Linux, macOS and Windows. +.. tip:: + + The Symfony CLI supports auto completion for Bash, Zsh or Fish shells. You + have to install the completion script *once*. Run ``symfony completion + --help`` for the installation instructions for your shell. After installing + and restarting your terminal, you're all set to use completion (by default, + by pressing the Tab key). + + The Symfony CLI will also provide completion for the ``composer`` command + and for the ``console`` command if it detects a Symfony project. + .. note:: You can view and contribute to the Symfony CLI source in the