8000 Resolve the DATABASE_URL env var in config examples · symfony/symfony-docs@83b7170 · GitHub
[go: up one dir, main page]

Skip to content

Commit 83b7170

Browse files
committed
Resolve the DATABASE_URL env var in config examples
1 parent d991ca4 commit 83b7170

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
@@ -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
.. code-block:: xml
@@ -1273,7 +1273,7 @@ You can also configure the session handler with a DSN. For example:
12731273
<framework:session enabled="true"
12741274
handler-id="redis://localhost"
12751275
handler-id="%env(REDIS_URL)%"
1276-
handler-id="%env(DATABASE_URL)%"
1276+
handler-id="%env(resolve:DATABASE_URL)%"
12771277
handler-id="file://%kernel.project_dir%/var/sessions"/>
12781278
</framework:config>
12791279
</container>
@@ -1286,7 +1286,7 @@ You can also configure the session handler with a DSN. For example:
12861286
// ...
12871287
'handler_id' => 'redis://localhost',
12881288
'handler_id' => '%env(REDIS_URL)%',
1289-
'handler_id' => '%env(DATABASE_URL)%',
1289+
'handler_id' => '%env(resolve:DATABASE_URL)%',
12901290
'handler_id' => 'file://%kernel.project_dir%/var/sessions',
12911291
],
12921292
]);

0 commit comments

Comments
 (0)
0