Skip to content

Commit 630b818

Browse files
committed
[Doctrine] Document database replicas
1 parent e134083 commit 630b818

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

reference/configuration/doctrine.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ The following block shows all possible configuration keys:
5252
path: '%kernel.project_dir%/var/data/data.sqlite'
5353
memory: true
5454
unix_socket: /tmp/mysql.sock
55+
replicas:
56+
read_only_replica:
57+
url: mysql://db_user:[email protected]:3306/db_name_replica
58+
keep_replica: true
5559
# the DBAL wrapperClass option
5660
wrapper_class: App\DBAL\MyConnectionWrapper
5761
charset: utf8mb4
@@ -87,12 +91,23 @@ The following block shows all possible configuration keys:
8791
path="%kernel.project_dir%/var/data/data.sqlite"
8892
memory="true"
8993
unix-socket="/tmp/mysql.sock"
94+
keep-replica="true"
9095
wrapper-class="App\DBAL\MyConnectionWrapper"
9196
charset="utf8mb4"
9297
logging="%kernel.debug%"
9398
platform-service="App\DBAL\MyDatabasePlatformService"
9499
server-version="8.0.37">
95100
101+
<doctrine:replica
102+
name="read_only_replica"
103+
dbname="database"
104+
host="localhost"
105+
port="1234"
106+
user="user"
107+
password="secret"
108+
driver="pdo_mysql"
109+
/>
110+
96111
<doctrine:option key="foo">bar</doctrine:option>
97112
<doctrine:mapping-type name="enum">string</doctrine:mapping-type>
98113
<doctrine:type name="custom">App\DBAL\MyCustomType</doctrine:type>

0 commit comments

Comments
 (0)