bug #37342 [Cache] fix compat with DBAL v3 (nicolas-grekas)
This PR was merged into the 3.4 branch.
Discussion
----------
[Cache] fix compat with DBAL v3
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Commits
-------
8c4b49613a
[Cache] fix compat with DBAL v3
This commit is contained in:
commit
363eec265b
@ -366,25 +366,31 @@ trait PdoTrait
|
||||
if ($this->conn instanceof \PDO) {
|
||||
$this->driver = $this->conn->getAttribute(\PDO::ATTR_DRIVER_NAME);
|
||||
} else {
|
||||
switch ($this->driver = $this->conn->getDriver()->getName()) {
|
||||
case 'mysqli':
|
||||
case 'pdo_mysql':
|
||||
case 'drizzle_pdo_mysql':
|
||||
$driver = $this->conn->getDriver();
|
||||
|
||||
switch (true) {
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\AbstractMySQLDriver:
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\DrizzlePDOMySql\Driver:
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\Mysqli\Driver:
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\PDOMySql\Driver:
|
||||
$this->driver = 'mysql';
|
||||
break;
|
||||
case 'pdo_sqlite':
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\PDOSqlite\Driver:
|
||||
$this->driver = 'sqlite';
|
||||
break;
|
||||
case 'pdo_pgsql':
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\PDOPgSql\Driver:
|
||||
$this->driver = 'pgsql';
|
||||
break;
|
||||
case 'oci8':
|
||||
case 'pdo_oracle':
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\OCI8\Driver:
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\PDOOracle\Driver:
|
||||
$this->driver = 'oci';
|
||||
break;
|
||||
case 'pdo_sqlsrv':
|
||||
case $driver instanceof \Doctrine\DBAL\Driver\SQLSrv\Driver:
|
||||
$this->driver = 'sqlsrv';
|
||||
break;
|
||||
default:
|
||||
$this->driver = \get_class($driver);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user