Skip to content

Commit a3fe74f

Browse files
committed
minor #3993 [Console] Fix Console component getHelperSet()->get() to getHelper() (eko)
This PR was merged into the 2.3 branch. Discussion ---------- [Console] Fix Console component getHelperSet()->get() to getHelper() | Q | A | | ---------------- |:---------:| | Doc fix? | Yes | | New docs? | No | | Applies to | 2.3 | | Fixed tickets | No | On Console component, I've fixed the following calls: ```php $this->getHelperSet()->get('dialog'); ``` to: ```php $this->getHelper('dialog'); ``` This is related to original PR #3952 Commits ------- 9207f68 [Console] Fix Console component getHelperSet()->get() to getHelper()
2 parents a41af7e + 9207f68 commit a3fe74f

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

components/console/helpers/dialoghelper.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ functions to ask the user for more information. It is included in the default
99
helper set, which you can get by calling
1010
:method:`Symfony\\Component\\Console\\Command\\Command::getHelperSet`::
1111

12-
$dialog = $this->getHelperSet()->get('dialog');
12+
$dialog = $this->getHelper('dialog');
1313

1414
All the methods inside the Dialog Helper have an
1515
:class:`Symfony\\Component\\Console\\Output\\OutputInterface` as the first
@@ -65,7 +65,7 @@ Autocompletion
6565
You can also specify an array of potential answers for a given question. These
6666
will be autocompleted as the user types::
6767

68-
$dialog = $this->getHelperSet()->get('dialog');
68+
$dialog = $this->getHelper('dialog');
6969
$bundleNames = array('AcmeDemoBundle', 'AcmeBlogBundle', 'AcmeStoreBundle');
7070
$name = $dialog->ask(
7171
$output,
@@ -83,7 +83,7 @@ Hiding the User's Response
8383
You can also ask a question and hide the response. This is particularly
8484
convenient for passwords::
8585

86-
$dialog = $this->getHelperSet()->get('dialog');
86+
$dialog = $this->getHelper('dialog');
8787
$password = $dialog->askHiddenResponse(
8888
$output,
8989
'What is the database password?',
@@ -154,7 +154,7 @@ Validating a Hidden Response
154154

155155
You can also ask and validate a hidden response::
156156

157-
$dialog = $this->getHelperSet()->get('dialog');
157+
$dialog = $this->getHelper('dialog');
158158

159159
$validator = function ($value) {
160160
if ('' === trim($value)) {
@@ -192,7 +192,7 @@ Instead, you can use the
192192
method, which makes sure that the user can only enter a valid string
193193
from a predefined list::
194194

195-
$dialog = $this->getHelperSet()->get('dialog');
195+
$dialog = $this->getHelper('dialog');
196196
$colors = array('red', 'blue', 'yellow');
197197

198198
$color = $dialog->select(

components/console/helpers/formatterhelper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The :class:`Symfony\\Component\\Console\\Helper\\FormatterHelper` is included
1212
in the default helper set, which you can get by calling
1313
:method:`Symfony\\Component\\Console\\Command\\Command::getHelperSet`::
1414

15-
$formatter = $this->getHelperSet()->get('formatter');
15+
$formatter = $this->getHelper('formatter');
1616

1717
The methods return a string, which you'll usually render to the console by
1818
passing it to the

components/console/helpers/progresshelper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ information, which updates as your command runs:
1818
To display progress details, use the :class:`Symfony\\Component\\Console\\Helper\\ProgressHelper`,
1919
pass it a total number of units, and advance the progress as your command executes::
2020

21-
$progress = $this->getHelperSet()->get('progress');
21+
$progress = $this->getHelper('progress');
2222

2323
$progress->start($output, 50);
2424
$i = 0;

components/console/helpers/tablehelper.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ When building a console application it may be useful to display tabular data:
1414
To display a table, use the :class:`Symfony\\Component\\Console\\Helper\\TableHelper`,
1515
set headers, rows and render::
1616

17-
$table = $this->getHelperSet()->get('table');
17+
$table = $this->getHelper('table');
1818
$table
1919
->setHeaders(array('ISBN', 'Title', 'Author'))
2020
->setRows(array(

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy