I try to connect mssql to my symfony project, but get error SQLSTATE[08001]: [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: [error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:self signed certificate]"
So I want to set "TrustServerCertificate=yes" on pdo conception but can't figure out how it does on symfony
I tried to write in .env
DATABASE_MSSQL_URL="mssql://user:password@ip:port/db_name?Trusted_Connection=yes&Encrypt=yes&TrustServerCertificate=yes"
in config/packages/doctrine.yaml:
dbal:
jtl:
url: '%env(resolve:DATABASE_MSSQL_URL)%'
driver: 'pdo_sqlsrv'
server_version: '13'
charset: utf8mb4
It did not help