Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1dd8b5d

Browse filesBrowse files
committed
minor #7837 Documented the new QuestionHelper::disableStty() method (javiereguiluz)
This PR was merged into the master branch. Discussion ---------- Documented the new QuestionHelper::disableStty() method This fixes #7825. Commits ------- ba0f04e Documented the new QuestionHelper::disableStty() method
2 parents a65811e + ba0f04e commit 1dd8b5d
Copy full SHA for 1dd8b5d

File tree

Expand file treeCollapse file tree

1 file changed

+22
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+22
-0
lines changed

‎components/console/helpers/questionhelper.rst

Copy file name to clipboardExpand all lines: components/console/helpers/questionhelper.rst
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,28 @@ convenient for passwords::
205205
like in the example above. In this case, a ``RuntimeException``
206206
would be thrown.
207207

208+
.. note::
209+
210+
The ``stty`` command is used to get and set properties of the command line
211+
(such as getting the number of rows and columns or hiding the input text).
212+
On Windows systems, this ``stty`` command may generate gibberish output and
213+
mangle the input text. If that's your case, disable it with this command::
214+
215+
use Symfony\Component\Console\Question\ChoiceQuestion;
216+
217+
// ...
218+
public function execute(InputInterface $input, OutputInterface $output)
219+
{
220+
// ...
221+
$helper = $this->getHelper('question');
222+
$helper->disableStty();
223+
224+
// ...
225+
}
226+
227+
.. versionadded:: 3.3
228+
The ``QuestionHelper::disableStty()`` method was introduced in Symfony 3.3.
229+
208230
Normalizing the Answer
209231
----------------------
210232

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.