Skip to content

Commit f6012cb

Browse files
committed
Merge branch '3.4' into 4.1
* 3.4: [Console] Remove invalid note about empty input options Added documentation for message parameters
2 parents 202164c + bdef484 commit f6012cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+585
-7
lines changed

console/input.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,4 @@ Now check the value of the option and keep in mind that ``false !== null``::
261261
$yell = ($optionValue !== false);
262262
$yellLouder = ($optionValue === 'louder');
263263

264-
.. caution::
265-
266-
Due to a PHP limitation, passing an empty string is indistinguishable from
267-
not passing any value at all. In ``command --prefix`` and ``command --prefix=''``
268-
cases, the value of the ``prefix`` option will be ``null``.
269-
270264
.. _`docopt standard`: http://docopt.org/

reference/constraints/Bic.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ message
9292

9393
The default message supplied when the value does not pass the BIC check.
9494

95+
You can use the following parameters in this message:
96+
97+
+------------------+------------------------------------------------+
98+
| Parameter | Description |
99+
+==================+================================================+
100+
| ``{{ value }}`` | The current (invalid) BIC value |
101+
+------------------+------------------------------------------------+
102+
95103
.. include:: /reference/constraints/_payload-option.rst.inc
96104

97105
.. _`Business Identifier Code (BIC)`: https://en.wikipedia.org/wiki/Business_Identifier_Code

reference/constraints/Blank.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,12 @@ message
9696

9797
This is the message that will be shown if the value is not blank.
9898

99+
You can use the following parameters in this message:
100+
101+
+------------------+------------------------------------------------+
102+
| Parameter | Description |
103+
+==================+================================================+
104+
| ``{{ value }}`` | The current (invalid) value |
105+
+------------------+------------------------------------------------+
106+
99107
.. include:: /reference/constraints/_payload-option.rst.inc

reference/constraints/CardScheme.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ message
131131

132132
The message shown when the value does not pass the ``CardScheme`` check.
133133

134+
You can use the following parameters in this message:
135+
136+
+------------------+------------------------------------------------+
137+
| Parameter | Description |
138+
+==================+================================================+
139+
| ``{{ value }}`` | The current (invalid) value |
140+
+------------------+------------------------------------------------+
141+
134142
.. include:: /reference/constraints/_payload-option.rst.inc
135143

136144
.. _`Wikipedia: Issuer identification number (IIN)`: https://en.wikipedia.org/wiki/Bank_card_number#Issuer_identification_number_.28IIN.29

reference/constraints/Choice.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@ This is the message that you will receive if the ``multiple`` option is
334334
set to ``false`` and the underlying value is not in the valid array of
335335
choices.
336336

337+
You can use the following parameters in this message:
338+
339+
+------------------+------------------------------------------------+
340+
| Parameter | Description |
341+
+==================+================================================+
342+
| ``{{ value }}`` | The current (invalid) value |
343+
+------------------+------------------------------------------------+
344+
337345
multipleMessage
338346
~~~~~~~~~~~~~~~
339347

@@ -343,6 +351,14 @@ This is the message that you will receive if the ``multiple`` option is
343351
set to ``true`` and one of the values on the underlying array being checked
344352
is not in the array of valid choices.
345353

354+
You can use the following parameters in this message:
355+
356+
+------------------+------------------------------------------------+
357+
| Parameter | Description |
358+
+==================+================================================+
359+
| ``{{ value }}`` | The current (invalid) value |
360+
+------------------+------------------------------------------------+
361+
346362
minMessage
347363
~~~~~~~~~~
348364

@@ -351,6 +367,14 @@ minMessage
351367
This is the validation error message that's displayed when the user chooses
352368
too few choices per the `min`_ option.
353369

370+
You can use the following parameters in this message:
371+
372+
+------------------+------------------------------------------------+
373+
| Parameter | Description |
374+
+==================+================================================+
375+
| ``{{ limit }}`` | The lower limit of choices |
376+
+------------------+------------------------------------------------+
377+
354378
maxMessage
355379
~~~~~~~~~~
356380

@@ -359,4 +383,12 @@ maxMessage
359383
This is the validation error message that's displayed when the user chooses
360384
too many options per the `max`_ option.
361385

386+
You can use the following parameters in this message:
387+
388+
+------------------+------------------------------------------------+
389+
| Parameter | Description |
390+
+==================+================================================+
391+
| ``{{ limit }}`` | The upper limit of choices |
392+
+------------------+------------------------------------------------+
393+
362394
.. include:: /reference/constraints/_payload-option.rst.inc

reference/constraints/Collection.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,14 @@ extraFieldsMessage
315315
The message shown if `allowExtraFields`_ is false and an extra field is
316316
detected.
317317

318+
You can use the following parameters in this message:
319+
320+
+------------------+------------------------------------------------+
321+
| Parameter | Description |
322+
+==================+================================================+
323+
| ``{{ field }}`` | The key of the extra field detected |
324+
+------------------+------------------------------------------------+
325+
318326
allowMissingFields
319327
~~~~~~~~~~~~~~~~~~
320328

@@ -333,4 +341,12 @@ missingFieldsMessage
333341
The message shown if `allowMissingFields`_ is false and one or more fields
334342
are missing from the underlying collection.
335343

344+
You can use the following parameters in this message:
345+
346+
+------------------+----------------------------------------------------+
347+
| Parameter | Description |
348+
+==================+====================================================+
349+
| ``{{ field }}`` | The key of the missing field defined in ``fields`` |
350+
+------------------+----------------------------------------------------+
351+
336352
.. include:: /reference/constraints/_payload-option.rst.inc

reference/constraints/Count.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,16 @@ minMessage
127127
The message that will be shown if the underlying collection elements count
128128
is less than the `min`_ option.
129129

130+
You can use the following parameters in this message:
131+
132+
+------------------+------------------------------------------------+
133+
| Parameter | Description |
134+
+==================+================================================+
135+
| ``{{ count }}`` | The current collection size |
136+
+------------------+------------------------------------------------+
137+
| ``{{ limit }}`` | The lower limit |
138+
+------------------+------------------------------------------------+
139+
130140
maxMessage
131141
~~~~~~~~~~
132142

@@ -135,6 +145,16 @@ maxMessage
135145
The message that will be shown if the underlying collection elements count
136146
is more than the `max`_ option.
137147

148+
You can use the following parameters in this message:
149+
150+
+------------------+------------------------------------------------+
151+
| Parameter | Description |
152+
+==================+================================================+
153+
| ``{{ count }}`` | The current collection size |
154+
+------------------+------------------------------------------------+
155+
| ``{{ limit }}`` | The upper limit |
156+
+------------------+------------------------------------------------+
157+
138158
exactMessage
139159
~~~~~~~~~~~~
140160

@@ -143,4 +163,14 @@ exactMessage
143163
The message that will be shown if min and max values are equal and the underlying
144164
collection elements count is not exactly this value.
145165

166+
You can use the following parameters in this message:
167+
168+
+------------------+------------------------------------------------+
169+
| Parameter | Description |
170+
+==================+================================================+
171+
| ``{{ count }}`` | The current collection size |
172+
+------------------+------------------------------------------------+
173+
| ``{{ limit }}`` | The exact expected collection size |
174+
+------------------+------------------------------------------------+
175+
146176
.. include:: /reference/constraints/_payload-option.rst.inc

reference/constraints/Country.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ message
8585

8686
This message is shown if the string is not a valid country code.
8787

88+
You can use the following parameters in this message:
89+
90+
+------------------+------------------------------------------------+
91+
| Parameter | Description |
92+
+==================+================================================+
93+
| ``{{ value }}`` | The current (invalid) country code |
94+
+------------------+------------------------------------------------+
95+
8896
.. include:: /reference/constraints/_payload-option.rst.inc
8997

9098
.. _`ISO 3166-1 alpha-2`: https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes

reference/constraints/Currency.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,14 @@ message
8888

8989
This is the message that will be shown if the value is not a valid currency.
9090

91+
You can use the following parameters in this message:
92+
93+
+------------------+------------------------------------------------+
94+
| Parameter | Description |
95+
+==================+================================================+
96+
| ``{{ value }}`` | The current (invalid) value |
97+
+------------------+------------------------------------------------+
98+
9199
.. include:: /reference/constraints/_payload-option.rst.inc
92100

93101
.. _`3-letter ISO 4217`: https://en.wikipedia.org/wiki/ISO_4217

reference/constraints/Date.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,12 @@ message
8787

8888
This message is shown if the underlying data is not a valid date.
8989

90+
You can use the following parameters in this message:
91+
92+
+------------------+------------------------------------------------+
93+
| Parameter | Description |
94+
+==================+================================================+
95+
| ``{{ value }}`` | The current (invalid) value |
96+
+------------------+------------------------------------------------+
97+
9098
.. include:: /reference/constraints/_payload-option.rst.inc

0 commit comments

Comments
 (0)