Skip to content

Commit 5ff87c7

Browse files
committed
Merge branch '5.1'
* 5.1: Resolve the DATABASE_URL env var in config examples
2 parents 3861993 + 6cd9dbb commit 5ff87c7

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

configuration.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ This example shows how you could configure the database connection using an env
453453
doctrine:
454454
dbal:
455455
# by convention the env var names are always uppercase
456-
url: '%env(DATABASE_URL)%'
456+
url: '%env(resolve:DATABASE_URL)%'
457457
# ...
458458
459459
.. code-block:: xml
@@ -470,7 +470,7 @@ This example shows how you could configure the database connection using an env
470470
471471
<doctrine:config>
472472
<!-- by convention the env var names are always uppercase -->
473-
<doctrine:dbal url="%env(DATABASE_URL)%"/>
473+
<doctrine:dbal url="%env(resolve:DATABASE_URL)%"/>
474474
</doctrine:config>
475475
476476
</container>
@@ -481,7 +481,7 @@ This example shows how you could configure the database connection using an env
481481
$container->loadFromExtension('doctrine', [
482482
'dbal' => [
483483
// by convention the env var names are always uppercase
484-
'url' => '%env(DATABASE_URL)%',
484+
'url' => '%env(resolve:DATABASE_URL)%',
485485
]
486486
]);
487487

doctrine/multiple_entity_managers.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ The following configuration code shows how you can configure two entity managers
3434
connections:
3535
default:
3636
# configure these for your database server
37-
url: '%env(DATABASE_URL)%'
37+
url: '%env(resolve:DATABASE_URL)%'
3838
driver: 'pdo_mysql'
3939
server_version: '5.7'
4040
charset: utf8mb4
4141
customer:
4242
# configure these for your database server
43-
url: '%env(DATABASE_CUSTOMER_URL)%'
43+
url: '%env(resolve:DATABASE_CUSTOMER_URL)%'
4444
driver: 'pdo_mysql'
4545
server_version: '5.7'
4646
charset: utf8mb4
@@ -83,15 +83,15 @@ The following configuration code shows how you can configure two entity managers
8383
<doctrine:dbal default-connection="default">
8484
<!-- configure these for your database server -->
8585
<doctrine:connection name="default"
86-
url="%env(DATABASE_URL)%"
86+
url="%env(resolve:DATABASE_URL)%"
8787
driver="pdo_mysql"
8888
server_version="5.7"
8989
charset="utf8mb4"
9090
/>
9191
9292
<!-- configure these for your database server -->
9393
<doctrine:connection name="customer"
94-
url="%env(DATABASE_CUSTOMER_URL)%"
94+
url="%env(resolve:DATABASE_CUSTOMER_URL)%"
9595
driver="pdo_mysql"
9696
server_version="5.7"
9797
charset="utf8mb4"
@@ -133,14 +133,14 @@ The following configuration code shows how you can configure two entity managers
133133
'connections' => [
134134
// configure these for your database server
135135
'default' => [
136-
'url' => '%env(DATABASE_URL)%',
136+
'url' => '%env(resolve:DATABASE_URL)%',
137137
'driver' => 'pdo_mysql',
138138
'server_version' => '5.7',
139139
'charset' => 'utf8mb4',
140140
],
141141
// configure these for your database server
142142
'customer' => [
143-
'url' => '%env(DATABASE_CUSTOMER_URL)%',
143+
'url' => '%env(resolve:DATABASE_CUSTOMER_URL)%',
144144
'driver' => 'pdo_mysql',
145145
'server_version' => '5.7',
146146
'charset' => 'utf8mb4',

reference/configuration/framework.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ You can also configure the session handler with a DSN. For example:
12241224
# ...
12251225
handler_id: 'redis://localhost'
12261226
handler_id: '%env(REDIS_URL)%'
1227-
handler_id: '%env(DATABASE_URL)%'
1227+
handler_id: '%env(resolve:DATABASE_URL)%'
12281228
handler_id: 'file://%kernel.project_dir%/var/sessions'
12291229
12301230
.. code-block:: xml
@@ -1242,7 +1242,7 @@ You can also configure the session handler with a DSN. For example:
12421242
<framework:session enabled="true"
12431243
handler-id="redis://localhost"
12441244
handler-id="%env(REDIS_URL)%"
1245-
handler-id="%env(DATABASE_URL)%"
1245+
handler-id="%env(resolve:DATABASE_URL)%"
12461246
handler-id="file://%kernel.project_dir%/var/sessions"/>
12471247
</framework:config>
12481248
</container>
@@ -1255,7 +1255,7 @@ You can also configure the session handler with a DSN. For example:
12551255
// ...
12561256
'handler_id' => 'redis://localhost',
12571257
'handler_id' => '%env(REDIS_URL)%',
1258-
'handler_id' => '%env(DATABASE_URL)%',
1258+
'handler_id' => '%env(resolve:DATABASE_URL)%',
12591259
'handler_id' => 'file://%kernel.project_dir%/var/sessions',
12601260
],
12611261
]);

0 commit comments

Comments
 (0)