Skip to content

Commit b8335e8

Browse files
committed
minor #8111 QuestionHelper - disableStty is static method (SpacePossum)
This PR was merged into the 3.3 branch. Discussion ---------- QuestionHelper - `disableStty` is static method The docs suggest disabling stty must be done on each instance of `QuestionHelper`, however it is a static method setting a static property, i.e. it effects _all_ instances. Besides, its always a good idea to call `static` methods using the `static` call syntax. Commits ------- c48d595 Update questionhelper.rst
2 parents 9439177 + c48d595 commit b8335e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/console/helpers/questionhelper.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,15 @@ convenient for passwords::
212212
On Windows systems, this ``stty`` command may generate gibberish output and
213213
mangle the input text. If that's your case, disable it with this command::
214214

215+
use Symfony\Component\Console\Helper\QuestionHelper;
215216
use Symfony\Component\Console\Question\ChoiceQuestion;
216217

217218
// ...
218219
public function execute(InputInterface $input, OutputInterface $output)
219220
{
220221
// ...
221222
$helper = $this->getHelper('question');
222-
$helper->disableStty();
223+
QuestionHelper::disableStty();
223224

224225
// ...
225226
}

0 commit comments

Comments
 (0)