Skip to content

Documented the new QuestionHelper::disableStty() method #7837

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

Merged
merged 1 commit into from
Apr 26, 2017
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