Symfony : how to set SSL parameters in Doctrine DBAL configuration (YAML)?

后端 未结 6 1871
误落风尘
误落风尘 2021-02-09 10:56

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 :

<         


        
6条回答
  •  一整个雨季
    2021-02-09 11:21

    With Symfony 3.2 and up this became a lot easier:

    doctrine:
        dbal:
            
            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%
    

提交回复
热议问题