[Cache] fix compat with DBAL v3
This commit is contained in:
parent
b30f4c1537
commit
8c4b49613a
@ -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