Skip to content

Commit b833833

Browse files
committed
Merge branch '4.4' into 5.1
* 4.4: Restore the quotes wraping the DATABASE_URL value Update doctrine.rst Update dbal.rst Update doctrine.rst Update testing.rst
2 parents a7e99af + 901b623 commit b833833

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

doctrine.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ The database connection information is stored as an environment variable called
4646
# customize this line!
4747
DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7"
4848
49+
# to use mariadb:
50+
DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=mariadb-10.5.8"
51+
4952
# to use sqlite:
5053
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"
5154

doctrine/dbal.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Then configure the ``DATABASE_URL`` environment variable in ``.env``:
3535
# .env (or override DATABASE_URL in .env.local to avoid committing your changes)
3636
3737
# customize this line!
38-
DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name"
38+
DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7"
3939
4040
Further things can be configured in ``config/packages/doctrine.yaml`` - see
4141
:ref:`reference-dbal-configuration`. Remove the ``orm`` key in that file

reference/configuration/doctrine.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The following block shows all possible configuration keys:
6565
charset: UTF8
6666
logging: '%kernel.debug%'
6767
platform_service: App\DBAL\MyDatabasePlatformService
68-
server_version: '5.6'
68+
server_version: '5.7'
6969
mapping_types:
7070
enum: string
7171
types:
@@ -99,7 +99,7 @@ The following block shows all possible configuration keys:
9999
charset="UTF8"
100100
logging="%kernel.debug%"
101101
platform-service="App\DBAL\MyDatabasePlatformService"
102-
server-version="5.6">
102+
server-version="5.7">
103103
104104
<doctrine:option key="foo">bar</doctrine:option>
105105
<doctrine:mapping-type name="enum">string</doctrine:mapping-type>
@@ -121,8 +121,8 @@ The following block shows all possible configuration keys:
121121

122122
Always wrap the server version number with quotes to parse it as a string
123123
instead of a float number. Otherwise, the floating-point representation
124-
issues can make your version be considered a different number (e.g. ``5.6``
125-
will be rounded as ``5.5999999999999996447286321199499070644378662109375``).
124+
issues can make your version be considered a different number (e.g. ``5.7``
125+
will be rounded as ``5.6999999999999996447286321199499070644378662109375``).
126126

127127
If you don't define this option and you haven't created your database
128128
yet, you may get ``PDOException`` errors because Doctrine will try to

testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ need in your ``.env.test`` file:
10321032
.. code-block:: text
10331033
10341034
# .env.test
1035-
DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name_test"
1035+
DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name_test?serverVersion=5.7"
10361036
10371037
# use SQLITE
10381038
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"

0 commit comments

Comments
 (0)