Skip to content

Commit

Permalink
support decorated drivers by fetching true driver from the DatabasePl…
Browse files Browse the repository at this point in the history
…atform
  • Loading branch information
Jeroeny committed Jul 7, 2021
1 parent 43bf9e4 commit 3000ccf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Symfony/Component/Cache/Adapter/PdoAdapter.php
Expand Up @@ -473,6 +473,15 @@ private function getConnection(): object
case $driver instanceof \Doctrine\DBAL\Driver\PDO\SQLSrv\Driver:
$this->driver = 'sqlsrv';
break;
case $driver instanceof \Doctrine\DBAL\Driver:
$this->driver = [
'mssql' => 'sqlsrv',
'oracle' => 'oci',
'postgresql' => 'pgsql',
'sqlite' => 'sqlite',
'mysql' => 'mysql',
][$driver->getDatabasePlatform()->getName()] ?? \get_class($driver);
break;
default:
$this->driver = \get_class($driver);
break;
Expand Down

0 comments on commit 3000ccf

Please sign in to comment.