I\'d like to add my SSL cert and key files to Doctrine DBAL configuration but I don\'t see how to achieve that.
In PHP, I just have to write something like :
<
Now in 2020, with Symfony > 4.2, the solution is :
# Doctrine Configuration
doctrine:
dbal:
driver: pdo_mysql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
# Options for SSL connection
options:
!php/const PDO::MYSQL_ATTR_SSL_CA : %ca_cert%
!php/const PDO::MYSQL_ATTR_SSL_KEY : %private_key%
!php/const PDO::MYSQL_ATTR_SSL_CERT : %public_cert%
Source : symfony.com/doc/4.2/service_container/parameters.html
Tested with Symfony 5.1.8