Skip to content

Commit

Permalink
[Doctrine] Document database replicas
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Jan 11, 2025
1 parent e134083 commit 630b818
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions reference/configuration/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ The following block shows all possible configuration keys:
path: '%kernel.project_dir%/var/data/data.sqlite'
memory: true
unix_socket: /tmp/mysql.sock
replicas:
read_only_replica:
url: mysql://db_user:[email protected]:3306/db_name_replica
keep_replica: true
# the DBAL wrapperClass option
wrapper_class: App\DBAL\MyConnectionWrapper
charset: utf8mb4
Expand Down Expand Up @@ -87,12 +91,23 @@ The following block shows all possible configuration keys:
path="%kernel.project_dir%/var/data/data.sqlite"
memory="true"
unix-socket="/tmp/mysql.sock"
keep-replica="true"
wrapper-class="App\DBAL\MyConnectionWrapper"
charset="utf8mb4"
logging="%kernel.debug%"
platform-service="App\DBAL\MyDatabasePlatformService"
server-version="8.0.37">
<doctrine:replica
name="read_only_replica"
dbname="database"
host="localhost"
port="1234"
user="user"
password="secret"
driver="pdo_mysql"
/>
<doctrine:option key="foo">bar</doctrine:option>
<doctrine:mapping-type name="enum">string</doctrine:mapping-type>
<doctrine:type name="custom">App\DBAL\MyCustomType</doctrine:type>
Expand Down

0 comments on commit 630b818

Please sign in to comment.