Skip to content

Commit c62331d

Browse files
committed
Improve the formatting of the lists of special characters
1 parent 14c50b0 commit c62331d

File tree

5 files changed

+16
-19
lines changed

5 files changed

+16
-19
lines changed

components/cache/cache_items.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ Cache Item Keys and Values
1212
The **key** of a cache item is a plain string which acts as its
1313
identifier, so it must be unique for each cache pool. You can freely choose the
1414
keys, but they should only contain letters (A-Z, a-z), numbers (0-9) and the
15-
``_`` and ``.`` symbols. Other common symbols (such as ``{``, ``}``, ``(``,
16-
``)``, ``/``, ``\``, ``@`` and ``:``) are reserved by the PSR-6 standard for future
17-
uses.
15+
``_`` and ``.`` symbols. Other common symbols (such as ``{ } ( ) / \ @ :``) are
16+
reserved by the PSR-6 standard for future uses.
1817

1918
The **value** of a cache item can be any data represented by a type which is
2019
serializable by PHP, such as basic types (string, integer, float, boolean, null),

doctrine.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The database connection information is stored as an environment variable called
6161
.. caution::
6262

6363
If the username, password, host or database name contain any character considered
64-
special in a URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``, ``%``),
64+
special in a URI (such as ``: / ? # [ ] @ ! $ & ' ( ) * + , ; =``),
6565
you must encode them. See `RFC 3986`_ for the full list of reserved characters or
6666
use the :phpfunction:`urlencode` function to encode them. In this case you need to
6767
remove the ``resolve:`` prefix in ``config/packages/doctrine.yaml`` to avoid errors:

mailer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ over SMTP by configuring the DSN in your ``.env`` file (the ``user``,
6464
.. caution::
6565

6666
If the username, password or host contain any character considered special in a
67-
URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``), you must
67+
URI (such as ``: / ? # [ ] @ ! $ & ' ( ) * + , ; =``), you must
6868
encode them. See `RFC 3986`_ for the full list of reserved characters or use the
6969
:phpfunction:`urlencode` function to encode them.
7070

notifier.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ SMS Channel
5050
.. caution::
5151

5252
If any of the DSN values contains any character considered special in a
53-
URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``), you must
53+
URI (such as ``: / ? # [ ] @ ! $ & ' ( ) * + , ; =``), you must
5454
encode them. See `RFC 3986`_ for the full list of reserved characters or use the
5555
:phpfunction:`urlencode` function to encode them.
5656

@@ -211,7 +211,7 @@ Chat Channel
211211
.. caution::
212212

213213
If any of the DSN values contains any character considered special in a
214-
URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``), you must
214+
URI (such as ``: / ? # [ ] @ ! $ & ' ( ) * + , ; =``), you must
215215
encode them. See `RFC 3986`_ for the full list of reserved characters or use the
216216
:phpfunction:`urlencode` function to encode them.
217217

@@ -415,7 +415,7 @@ Push Channel
415415
.. caution::
416416

417417
If any of the DSN values contains any character considered special in a
418-
URI (such as ``+``, ``@``, ``$``, ``#``, ``/``, ``:``, ``*``, ``!``), you must
418+
URI (such as ``: / ? # [ ] @ ! $ & ' ( ) * + , ; =``), you must
419419
encode them. See `RFC 3986`_ for the full list of reserved characters or use the
420420
:phpfunction:`urlencode` function to encode them.
421421

reference/formats/yaml.rst

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ must be doubled to escape it:
3434
3535
'A single quote '' inside a single-quoted string'
3636
37-
Strings containing any of the following characters must be quoted. Although you
38-
can use double quotes, for these characters it is more convenient to use single
39-
quotes, which avoids having to escape any backslash ``\``:
40-
41-
* ``:``, ``{``, ``}``, ``[``, ``]``, ``,``, ``&``, ``*``, ``#``, ``?``, ``|``,
42-
``-``, ``<``, ``>``, ``=``, ``!``, ``%``, ``@``, `````
37+
Strings containing any of the following characters must be quoted:
38+
``: { } [ ] , & * # ? | - < > = ! % @`` Although you can use double quotes, for
39+
these characters it is more convenient to use single quotes, which avoids having
40+
to escape any backslash ``\``.
4341

4442
The double-quoted style provides a way to express arbitrary strings, by
4543
using ``\`` to escape characters and sequences. For instance, it is very useful
@@ -52,11 +50,11 @@ when you need to embed a ``\n`` or a Unicode character in a string.
5250
If the string contains any of the following control characters, it must be
5351
escaped with double quotes:
5452

55-
* ``\0``, ``\x01``, ``\x02``, ``\x03``, ``\x04``, ``\x05``, ``\x06``, ``\a``,
56-
``\b``, ``\t``, ``\n``, ``\v``, ``\f``, ``\r``, ``\x0e``, ``\x0f``, ``\x10``,
57-
``\x11``, ``\x12``, ``\x13``, ``\x14``, ``\x15``, ``\x16``, ``\x17``, ``\x18``,
58-
``\x19``, ``\x1a``, ``\e``, ``\x1c``, ``\x1d``, ``\x1e``, ``\x1f``, ``\N``,
59-
``\_``, ``\L``, ``\P``
53+
``\0``, ``\x01``, ``\x02``, ``\x03``, ``\x04``, ``\x05``, ``\x06``, ``\a``,
54+
``\b``, ``\t``, ``\n``, ``\v``, ``\f``, ``\r``, ``\x0e``, ``\x0f``, ``\x10``,
55+
``\x11``, ``\x12``, ``\x13``, ``\x14``, ``\x15``, ``\x16``, ``\x17``, ``\x18``,
56+
``\x19``, ``\x1a``, ``\e``, ``\x1c``, ``\x1d``, ``\x1e``, ``\x1f``, ``\N``,
57+
``\_``, ``\L``, ``\P``
6058

6159
Finally, there are other cases when the strings must be quoted, no matter if
6260
you're using single or double quotes:

0 commit comments

Comments
 (0)