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

后端 未结 6 1873
误落风尘
误落风尘 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 10:58

    Instead of PDO constats, You shoul use their values in options:

    doctrine:
        dbal:
            connections:
                default:
                    driver:   %database_driver%
                    host:     %database_host%
                    port:     %database_port%
                    dbname:   %database_name%
                    password: %database_password%
                    charset:  UTF8
                    options:
                        1010 : %private_key% 
                        1011 : %public_cert% 
                        1012 : %ca_cert%
    

提交回复
热议问题