Skip to content
Merged
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
22 changes: 22 additions & 0 deletions components/console/helpers/questionhelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,28 @@ convenient for passwords::
like in the example above. In this case, a ``RuntimeException``
would be thrown.

.. note::

The ``stty`` command is used to get and set properties of the command line
(such as getting the number of rows and columns or hiding the input text).
On Windows systems, this ``stty`` command may generate gibberish output and
mangle the input text. If that's your case, disable it with this command::

use Symfony\Component\Console\Question\ChoiceQuestion;

// ...
public function execute(InputInterface $input, OutputInterface $output)
{
// ...
$helper = $this->getHelper('question');
$helper->disableStty();

// ...
}

.. versionadded:: 3.3
The ``QuestionHelper::disableStty()`` method was introduced in Symfony 3.3.

Normalizing the Answer
----------------------

Expand Down