Skip to content

Commit 8d34150

Browse files
committed
minor #10410 Added charset "query string" (ThomasLandauer, javiereguiluz)
This PR was merged into the 4.1 branch. Discussion ---------- Added `charset` "query string" Couldn't find any reference for `charset` in `DATABASE_URL` anywhere, so I'm just adding it here... Is there a list of *all* possible query string parameters somewhere? Commits ------- 5f9ae66 Reword eb93d15 Reword 6d8ec6a Update configuration.rst 2aa9ff7 Update doctrine.rst 3a523e1 Added `charset` "query string"
2 parents 433e296 + 5f9ae66 commit 8d34150

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ This is referenced inside ``config/packages/doctrine.yaml``:
227227
dbal:
228228
url: '%env(DATABASE_URL)%'
229229
230-
# the resolve: prefix will resolve parameters *inside* the env variable
230+
# The `resolve:` prefix replaces container params by their values inside the env variable:
231231
# url: '%env(resolve:DATABASE_URL)%'
232232
233233
For more details about environment variables, see :ref:`config-env-vars`.

doctrine.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ The database connection information is stored as an environment variable called
4949
5050
.. caution::
5151

52-
If the username, password or database name contain any character considered
53-
special in a URI (such as ``!``, ``@``, ``$``, ``#``), you must encode them.
52+
If the username, password, host or database name contain any character considered
53+
special in a URI (such as ``!``, ``@``, ``$``, ``#``, ``/``), you must encode them.
5454
See `RFC 3986`_ for the full list of reserved characters or use the
55-
:phpfunction:`urlencode` function to encode them.
55+
:phpfunction:`urlencode` function to encode them. In this case you need to remove
56+
the ``resolve:`` prefix in ``config/packages/doctrine.yaml`` to avoid errors:
57+
``url: '%env(resolve:DATABASE_URL)%'``
5658

5759
Now that your connection parameters are setup, Doctrine can create the ``db_name``
5860
database for you:

0 commit comments

Comments
 (0)