Skip to content

Commit 04e1b02

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: Fixed some wrong file paths Fixed typo Change code file location Reword the intro of a console article
2 parents aa0c6f9 + 2dc8eb2 commit 04e1b02

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

components/console/console_arguments.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
.. index::
22
single: Console; Console arguments
33

4-
Understanding how Console Arguments Are Handled
5-
===============================================
4+
Understanding how Console Arguments and Options Are Handled
5+
===========================================================
66

7-
It can be difficult to understand the way arguments are handled by the console application.
8-
The Symfony Console application, like many other CLI utility tools, follows the behavior
9-
described in the `docopt`_ standards.
7+
Symfony Console applications follow the same `docopt`_ standard used in most
8+
CLI utility tools. This article explains how to handle edge-cases when the
9+
commands define options with required values, without values, etc. Read
10+
:doc:`this other article </console/input>` to learn about using arguments and
11+
options inside Symfony Console commands.
1012

1113
Have a look at the following command that has three options::
1214

console/input.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ To solve this issue, you have to set the option's default value to ``false``::
257257

258258
Now check the value of the option and keep in mind that ``false !== null``::
259259

260-
$optionValue = $input->getOptions('yell');
260+
$optionValue = $input->getOption('yell');
261261
$yell = ($optionValue !== false);
262262
$yellLouder = ($optionValue === 'louder');
263263

0 commit comments

Comments
 (0)