Skip to content

Commit f0badb4

Browse files
committed
minor #9139 Update doctrine.rst (tvlooy, javiereguiluz)
This PR was merged into the 4.0 branch. Discussion ---------- Update doctrine.rst seems like something useful to document. People new to this will have a hard time figuring this out Commits ------- 3db78ae Reword 7df63be Update doctrine.rst
2 parents e4616b9 + 3db78ae commit f0badb4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doctrine.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ The database connection information is stored as an environment variable called
4040
4141
# to use sqlite:
4242
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"
43+
44+
.. caution::
45+
46+
If the username, password or database name contain any character considered
47+
special in a URI (such as ``!``, ``@``, ``$``, ``#``), you must encode them.
48+
See `RFC 3986`_ for the full list of reserved characters or use the
49+
:phpfunction:`urlencode` function to encode them.
4350

4451
Now that your connection parameters are setup, Doctrine can create the ``db_name``
4552
database for you:
@@ -738,6 +745,7 @@ Learn more
738745
* `DoctrineFixturesBundle`_
739746

740747
.. _`Doctrine`: http://www.doctrine-project.org/
748+
.. _`RFC 3986`: https://www.ietf.org/rfc/rfc3986.txt
741749
.. _`MongoDB`: https://www.mongodb.org/
742750
.. _`Doctrine's Mapping Types documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html
743751
.. _`Query Builder`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/query-builder.html

0 commit comments

Comments
 (0)