Rename classes in Driver\PDO* namespaces

parent 4ec17a7f
# Upgrade to 3.0
## BC BREAK: PDO-based driver classes are moved under the PDO namespace
The following classes have been renamed:
- `PDOMySql\Driver``PDO\MySQL\Driver`
- `PDOOracle\Driver``PDO\OCI\Driver`
- `PDOPgSql\Driver``PDO\PgSQL\Driver`
- `PDOSqlite\Driver``PDO\SQLite\Driver`
- `PDOSqlsrv\Driver``PDO\SQLSrv\Driver`
- `PDOSqlsrv\Connection``PDO\SQLSrv\Connection`
- `PDOSqlsrv\Statement``PDO\SQLSrv\Statement`
## BC BREAK: Changes schema manager instantiation.
1. The `$platform` argument of all schema manager constructors is no longer optional.
......
......@@ -37,7 +37,7 @@
<!--
Fixing these issues requires an API change
-->
<file name="src/Driver/PDOSqlsrv/Connection.php"/>
<file name="src/Driver/PDO/SQLSrv/Connection.php"/>
<file name="src/Driver/SQLSrv/Connection.php"/>
</errorLevel>
</FalsableReturnStatement>
......@@ -64,7 +64,7 @@
Requires a release of
https://github.com/JetBrains/phpstorm-stubs/pull/732
-->
<file name="tests/Driver/PDOPgSql/DriverTest.php" />
<file name="tests/Driver/PDO/PgSQL/DriverTest.php" />
</errorLevel>
</UndefinedConstant>
<UndefinedClass>
......
<?php
namespace Doctrine\DBAL\Driver\PDOMySql;
namespace Doctrine\DBAL\Driver\PDO\MySQL;
use Doctrine\DBAL\Driver\AbstractMySQLDriver;
use Doctrine\DBAL\Driver\PDO\Connection;
use PDO;
/**
* PDO MySql driver.
*/
final class Driver extends AbstractMySQLDriver
{
/**
......
<?php
namespace Doctrine\DBAL\Driver\PDOOracle;
namespace Doctrine\DBAL\Driver\PDO\OCI;
use Doctrine\DBAL\Driver\AbstractOracleDriver;
use Doctrine\DBAL\Driver\PDO\Connection;
use PDO;
/**
* PDO Oracle driver.
*
* WARNING: This driver gives us segfaults in our testsuites on CLOB and other
* stuff. PDO Oracle is not maintained by Oracle or anyone in the PHP community,
* which leads us to the recommendation to use the "oci8" driver to connect
* to Oracle instead.
*/
final class Driver extends AbstractOracleDriver
{
/**
......
<?php
namespace Doctrine\DBAL\Driver\PDOPgSql;
namespace Doctrine\DBAL\Driver\PDO\PgSQL;
use Doctrine\DBAL\Driver\AbstractPostgreSQLDriver;
use Doctrine\DBAL\Driver\PDO\Connection;
......@@ -8,9 +8,6 @@ use PDO;
use function defined;
/**
* Driver that connects through pdo_pgsql.
*/
final class Driver extends AbstractPostgreSQLDriver
{
/**
......
<?php
namespace Doctrine\DBAL\Driver\PDOSqlsrv;
namespace Doctrine\DBAL\Driver\PDO\SQLSrv;
use Doctrine\DBAL\Driver\PDO\Connection as PDOConnection;
use Doctrine\DBAL\Driver\Result;
......
<?php
namespace Doctrine\DBAL\Driver\PDOSqlsrv;
namespace Doctrine\DBAL\Driver\PDO\SQLSrv;
use Doctrine\DBAL\Driver\AbstractSQLServerDriver;
use Doctrine\DBAL\Driver\AbstractSQLServerDriver\Exception\PortWithoutHost;
......@@ -11,9 +11,6 @@ use PDO;
use function is_int;
use function sprintf;
/**
* The PDO-based Sqlsrv driver.
*/
final class Driver extends AbstractSQLServerDriver
{
/**
......
<?php
namespace Doctrine\DBAL\Driver\PDOSqlsrv;
namespace Doctrine\DBAL\Driver\PDO\SQLSrv;
use Doctrine\DBAL\Driver\PDO\Statement as PDOStatement;
use Doctrine\DBAL\Driver\Result;
......@@ -8,9 +8,6 @@ use Doctrine\DBAL\Driver\Statement as StatementInterface;
use Doctrine\DBAL\ParameterType;
use PDO;
/**
* PDO SQL Server Statement
*/
final class Statement implements StatementInterface
{
/** @var PDOStatement */
......
<?php
namespace Doctrine\DBAL\Driver\PDOSqlite;
namespace Doctrine\DBAL\Driver\PDO\SQLite;
use Doctrine\DBAL\Driver\AbstractSQLiteDriver;
use Doctrine\DBAL\Driver\PDO\Connection;
......@@ -8,9 +8,6 @@ use Doctrine\DBAL\Platforms\SqlitePlatform;
use function array_merge;
/**
* The PDO Sqlite driver.
*/
final class Driver extends AbstractSQLiteDriver
{
/** @var mixed[] */
......
......@@ -3,15 +3,11 @@
namespace Doctrine\DBAL;
use Doctrine\Common\EventManager;
use Doctrine\DBAL\Driver\IBMDB2\Driver as IBMDB2Driver;
use Doctrine\DBAL\Driver\Mysqli\Driver as MySQLiDriver;
use Doctrine\DBAL\Driver\OCI8\Driver as OCI8Driver;
use Doctrine\DBAL\Driver\PDOMySql\Driver as PDOMySQLDriver;
use Doctrine\DBAL\Driver\PDOOracle\Driver as PDOOCIDriver;
use Doctrine\DBAL\Driver\PDOPgSql\Driver as PDOPgSQLDriver;
use Doctrine\DBAL\Driver\PDOSqlite\Driver as PDOSQLiteDriver;
use Doctrine\DBAL\Driver\PDOSqlsrv\Driver as PDOSQLSrvDriver;
use Doctrine\DBAL\Driver\SQLSrv\Driver as SQLSrvDriver;
use Doctrine\DBAL\Driver\IBMDB2;
use Doctrine\DBAL\Driver\Mysqli;
use Doctrine\DBAL\Driver\OCI8;
use Doctrine\DBAL\Driver\PDO;
use Doctrine\DBAL\Driver\SQLSrv;
use function array_keys;
use function array_map;
......@@ -42,15 +38,15 @@ final class DriverManager
* @var string[]
*/
private static $_driverMap = [
'pdo_mysql' => PDOMySQLDriver::class,
'pdo_sqlite' => PDOSQLiteDriver::class,
'pdo_pgsql' => PDOPgSQLDriver::class,
'pdo_oci' => PDOOCIDriver::class,
'oci8' => OCI8Driver::class,
'ibm_db2' => IBMDB2Driver::class,
'pdo_sqlsrv' => PDOSQLSrvDriver::class,
'mysqli' => MySQLiDriver::class,
'sqlsrv' => SQLSrvDriver::class,
'pdo_mysql' => PDO\MySQL\Driver::class,
'pdo_sqlite' => PDO\SQLite\Driver::class,
'pdo_pgsql' => PDO\PgSQL\Driver::class,
'pdo_oci' => PDO\OCI\Driver::class,
'oci8' => OCI8\Driver::class,
'ibm_db2' => IBMDB2\Driver::class,
'pdo_sqlsrv' => PDO\SQLSrv\Driver::class,
'mysqli' => Mysqli\Driver::class,
'sqlsrv' => SQLSrv\Driver::class,
];
/**
......
......@@ -70,7 +70,7 @@ class TableGenerator
*/
public function __construct(Connection $conn, $generatorTableName = 'sequences')
{
if ($conn->getDriver() instanceof Driver\PDOSqlite\Driver) {
if ($conn->getDriver() instanceof Driver\PDO\SQLite\Driver) {
throw new DBALException('Cannot use TableGenerator with SQLite.');
}
......
......@@ -110,7 +110,7 @@ class ConnectionTest extends TestCase
public function testGetDriver(): void
{
self::assertInstanceOf(\Doctrine\DBAL\Driver\PDOMySql\Driver::class, $this->connection->getDriver());
self::assertInstanceOf(Driver\PDO\MySQL\Driver::class, $this->connection->getDriver());
}
public function testGetEventManager(): void
......
<?php
namespace Doctrine\DBAL\Tests\Driver\PDOMySql;
namespace Doctrine\DBAL\Tests\Driver\PDO\MySQL;
use Doctrine\DBAL\Driver as DriverInterface;
use Doctrine\DBAL\Driver\PDOMySql\Driver;
use Doctrine\DBAL\Driver\PDO\MySQL\Driver;
use Doctrine\DBAL\Tests\Driver\AbstractMySQLDriverTest;
class DriverTest extends AbstractMySQLDriverTest
......
<?php
namespace Doctrine\DBAL\Tests\Driver\PDOOracle;
namespace Doctrine\DBAL\Tests\Driver\PDO\OCI;
use Doctrine\DBAL\Driver as DriverInterface;
use Doctrine\DBAL\Driver\PDOOracle\Driver;
use Doctrine\DBAL\Driver\PDO\OCI\Driver;
use Doctrine\DBAL\Tests\Driver\AbstractOracleDriverTest;
class DriverTest extends AbstractOracleDriverTest
......
<?php
namespace Doctrine\DBAL\Tests\Driver\PDOPgSql;
namespace Doctrine\DBAL\Tests\Driver\PDO\PgSQL;
use Doctrine\DBAL\Driver as DriverInterface;
use Doctrine\DBAL\Driver\Connection;
use Doctrine\DBAL\Driver\PDO\Connection as PDOConnection;
use Doctrine\DBAL\Driver\PDOPgSql\Driver;
use Doctrine\DBAL\Driver\PDO;
use Doctrine\DBAL\Driver\PDO\PgSQL\Driver;
use Doctrine\DBAL\Tests\Driver\AbstractPostgreSQLDriverTest;
use Doctrine\DBAL\Tests\TestUtil;
use PDO;
use function array_merge;
......@@ -32,9 +31,9 @@ class DriverTest extends AbstractPostgreSQLDriverTest
{
$connection = $this->connect([]);
self::assertInstanceOf(PDOConnection::class, $connection);
self::assertInstanceOf(PDO\Connection::class, $connection);
self::assertTrue(
$connection->getWrappedConnection()->getAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES)
$connection->getWrappedConnection()->getAttribute(\PDO::PGSQL_ATTR_DISABLE_PREPARES)
);
}
......@@ -44,12 +43,12 @@ class DriverTest extends AbstractPostgreSQLDriverTest
public function testConnectionDoesNotDisablePreparesWhenAttributeDefined(): void
{
$connection = $this->connect(
[PDO::PGSQL_ATTR_DISABLE_PREPARES => false]
[\PDO::PGSQL_ATTR_DISABLE_PREPARES => false]
);
self::assertInstanceOf(PDOConnection::class, $connection);
self::assertInstanceOf(PDO\Connection::class, $connection);
self::assertNotTrue(
$connection->getWrappedConnection()->getAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES)
$connection->getWrappedConnection()->getAttribute(\PDO::PGSQL_ATTR_DISABLE_PREPARES)
);
}
......@@ -59,12 +58,12 @@ class DriverTest extends AbstractPostgreSQLDriverTest
public function testConnectionDisablePreparesWhenDisablePreparesIsExplicitlyDefined(): void
{
$connection = $this->connect(
[PDO::PGSQL_ATTR_DISABLE_PREPARES => true]
[\PDO::PGSQL_ATTR_DISABLE_PREPARES => true]
);
self::assertInstanceOf(PDOConnection::class, $connection);
self::assertInstanceOf(PDO\Connection::class, $connection);
self::assertTrue(
$connection->getWrappedConnection()->getAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES)
$connection->getWrappedConnection()->getAttribute(\PDO::PGSQL_ATTR_DISABLE_PREPARES)
);
}
......
<?php
namespace Doctrine\DBAL\Tests\Driver\PDOSqlsrv;
namespace Doctrine\DBAL\Tests\Driver\PDO\SQLSrv;
use Doctrine\DBAL\Driver as DriverInterface;
use Doctrine\DBAL\Driver\PDOSqlsrv\Driver;
use Doctrine\DBAL\Driver\PDO\SQLSrv\Driver;
use Doctrine\DBAL\Tests\Driver\AbstractSQLServerDriverTest;
class DriverTest extends AbstractSQLServerDriverTest
......
<?php
namespace Doctrine\DBAL\Tests\Driver\PDOSqlite;
namespace Doctrine\DBAL\Tests\Driver\PDO\SQLite;
use Doctrine\DBAL\Driver as DriverInterface;
use Doctrine\DBAL\Driver\PDOSqlite\Driver;
use Doctrine\DBAL\Driver\PDO\SQLite\Driver;
use Doctrine\DBAL\Tests\Driver\AbstractSQLiteDriverTest;
class DriverTest extends AbstractSQLiteDriverTest
......
......@@ -6,8 +6,7 @@ use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Connections\PrimaryReadReplicaConnection;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\PDOMySql\Driver as PDOMySQLDriver;
use Doctrine\DBAL\Driver\PDOSqlite\Driver as PDOSqliteDriver;
use Doctrine\DBAL\Driver\PDO;
use Doctrine\DBAL\Driver\SQLSrv\Driver as SQLSrvDriver;
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Platforms\AbstractPlatform;
......@@ -93,10 +92,10 @@ class DriverManagerTest extends TestCase
public function testValidDriverClass(): void
{
$options = ['driverClass' => PDOMySQLDriver::class];
$options = ['driverClass' => PDO\MySQL\Driver::class];
$conn = DriverManager::getConnection($options);
self::assertInstanceOf(PDOMySQLDriver::class, $conn->getDriver());
self::assertInstanceOf(PDO\MySQL\Driver::class, $conn->getDriver());
}
public function testDatabaseUrlPrimaryReplica(): void
......@@ -113,7 +112,7 @@ class DriverManagerTest extends TestCase
$conn = DriverManager::getConnection($options);
$params = $conn->getParams();
self::assertInstanceOf(PDOMySQLDriver::class, $conn->getDriver());
self::assertInstanceOf(PDO\MySQL\Driver::class, $conn->getDriver());
$expected = [
'user' => 'foo',
......@@ -173,7 +172,7 @@ class DriverManagerTest extends TestCase
'password' => 'bar',
'host' => 'localhost',
'dbname' => 'baz',
'driver' => PDOMySQLDriver::class,
'driver' => PDO\MySQL\Driver::class,
],
],
'simple URL with port' => [
......@@ -184,49 +183,49 @@ class DriverManagerTest extends TestCase
'host' => 'localhost',
'port' => 11211,
'dbname' => 'baz',
'driver' => PDOMySQLDriver::class,
'driver' => PDO\MySQL\Driver::class,
],
],
'sqlite relative URL with host' => [
'sqlite://localhost/foo/dbname.sqlite',
[
'path' => 'foo/dbname.sqlite',
'driver' => PDOSqliteDriver::class,
'driver' => PDO\SQLite\Driver::class,
],
],
'sqlite absolute URL with host' => [
'sqlite://localhost//tmp/dbname.sqlite',
[
'path' => '/tmp/dbname.sqlite',
'driver' => PDOSqliteDriver::class,
'driver' => PDO\SQLite\Driver::class,
],
],
'sqlite relative URL without host' => [
'sqlite:///foo/dbname.sqlite',
[
'path' => 'foo/dbname.sqlite',
'driver' => PDOSqliteDriver::class,
'driver' => PDO\SQLite\Driver::class,
],
],
'sqlite absolute URL without host' => [
'sqlite:////tmp/dbname.sqlite',
[
'path' => '/tmp/dbname.sqlite',
'driver' => PDOSqliteDriver::class,
'driver' => PDO\SQLite\Driver::class,
],
],
'sqlite memory' => [
'sqlite:///:memory:',
[
'memory' => true,
'driver' => PDOSqliteDriver::class,
'driver' => PDO\SQLite\Driver::class,
],
],
'sqlite memory with host' => [
'sqlite://localhost/:memory:',
[
'memory' => true,
'driver' => PDOSqliteDriver::class,
'driver' => PDO\SQLite\Driver::class,
],
],
'params parsed from URL override individual params' => [
......@@ -239,7 +238,7 @@ class DriverManagerTest extends TestCase
'password' => 'bar',
'host' => 'localhost',
'dbname' => 'baz',
'driver' => PDOMySQLDriver::class,
'driver' => PDO\MySQL\Driver::class,
],
],
'params not parsed from URL but individual params are preserved' => [
......@@ -253,7 +252,7 @@ class DriverManagerTest extends TestCase
'host' => 'localhost',
'port' => 1234,
'dbname' => 'baz',
'driver' => PDOMySQLDriver::class,
'driver' => PDO\MySQL\Driver::class,
],
],
'query params from URL are used as extra params' => [
......@@ -281,7 +280,7 @@ class DriverManagerTest extends TestCase
'password' => 'bar',
'host' => 'localhost',
'dbname' => 'baz',
'driver' => PDOMySQLDriver::class,
'driver' => PDO\MySQL\Driver::class,
],
],
'simple URL with percent encoding' => [
......@@ -291,7 +290,7 @@ class DriverManagerTest extends TestCase
'password' => 'bar/',
'host' => 'localhost',
'dbname' => 'baz+baz@',
'driver' => PDOMySQLDriver::class,
'driver' => PDO\MySQL\Driver::class,
],
],
'simple URL with percent sign in password' => [
......@@ -301,7 +300,7 @@ class DriverManagerTest extends TestCase
'password' => 'bar%bar',
'host' => 'localhost',
'dbname' => 'baz',
'driver' => PDOMySQLDriver::class,
'driver' => PDO\MySQL\Driver::class,
],
],
......@@ -320,7 +319,7 @@ class DriverManagerTest extends TestCase
'password' => 'bar',
'host' => 'localhost',
'dbname' => 'baz',
'driver' => PDOMySQLDriver::class,
'driver' => PDO\MySQL\Driver::class,
],
],
'URL without scheme but custom driver' => [
......@@ -360,7 +359,7 @@ class DriverManagerTest extends TestCase
'password' => 'bar',
'host' => 'localhost',
'dbname' => 'baz',
'driver' => PDOMySQLDriver::class,
'driver' => PDO\MySQL\Driver::class,
],
],
'URL with default custom driver' => [
......@@ -373,7 +372,7 @@ class DriverManagerTest extends TestCase
'password' => 'bar',
'host' => 'localhost',
'dbname' => 'baz',
'driver' => PDOMySQLDriver::class,
'driver' => PDO\MySQL\Driver::class,
],
],
'URL with default driver and default custom driver' => [
......@@ -387,7 +386,7 @@ class DriverManagerTest extends TestCase
'password' => 'bar',
'host' => 'localhost',
'dbname' => 'baz',
'driver' => PDOMySQLDriver::class,
'driver' => PDO\MySQL\Driver::class,
],
],
];
......
......@@ -3,7 +3,7 @@
namespace Doctrine\DBAL\Tests\Functional;
use Doctrine\DBAL\Driver\OCI8\Driver as OCI8Driver;
use Doctrine\DBAL\Driver\PDOOracle\Driver as PDOOracleDriver;
use Doctrine\DBAL\Driver\PDO;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Tests\FunctionalTestCase;
......@@ -22,7 +22,7 @@ class BlobTest extends FunctionalTestCase
{
parent::setUp();
if ($this->connection->getDriver() instanceof PDOOracleDriver) {
if ($this->connection->getDriver() instanceof PDO\OCI\Driver) {
// inserting BLOBs as streams on Oracle requires Oracle-specific SQL syntax which is currently not supported
// see http://php.net/manual/en/pdo.lobs.php#example-1035
self::markTestSkipped('DBAL doesn\'t support storing LOBs represented as streams using PDO_OCI');
......
......@@ -2,13 +2,10 @@
namespace Doctrine\DBAL\Tests\Functional\Driver\PDO;
use Doctrine\DBAL\Driver\PDO;
use Doctrine\DBAL\Driver\PDO\Connection;
use Doctrine\DBAL\Driver\PDO\Exception;
use Doctrine\DBAL\Driver\PDOOracle\Driver as PDOOracleDriver;
use Doctrine\DBAL\Driver\PDOPgSql\Driver as PDOPgSQLDriver;
use Doctrine\DBAL\Driver\PDOSqlsrv\Driver as PDOSQLSRVDriver;
use Doctrine\DBAL\Tests\FunctionalTestCase;
use PDO;
use function get_class;
use function sprintf;
......@@ -66,7 +63,7 @@ class ConnectionTest extends FunctionalTestCase
{
$driver = $this->connection->getDriver();
if ($driver instanceof PDOSQLSRVDriver) {
if ($driver instanceof PDO\SQLSrv\Driver) {
self::markTestSkipped('pdo_sqlsrv does not allow setting PDO::ATTR_EMULATE_PREPARES at connection level.');
}
......@@ -74,8 +71,8 @@ class ConnectionTest extends FunctionalTestCase
// even though emulated prepared statements are disabled,
// so an exception is thrown only eventually.
if (
$driver instanceof PDOOracleDriver
|| $driver instanceof PDOPgSQLDriver
$driver instanceof PDO\OCI\Driver
|| $driver instanceof PDO\PgSQL\Driver
) {
self::markTestSkipped(sprintf(
'The underlying implementation of the %s driver does not check the query to be prepared server-side.',
......@@ -87,7 +84,7 @@ class ConnectionTest extends FunctionalTestCase
// so that PDO actually communicates with the database server to check the query.
$this->driverConnection
->getWrappedConnection()
->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
$this->expectException(Exception::class);
......
<?php
namespace Doctrine\DBAL\Tests\Functional\Driver\PDOMySql;
namespace Doctrine\DBAL\Tests\Functional\Driver\PDO\MySQL;
use Doctrine\DBAL\Driver as DriverInterface;
use Doctrine\DBAL\Driver\PDOMySql\Driver;
use Doctrine\DBAL\Driver\PDO\MySQL\Driver;
use Doctrine\DBAL\Tests\Functional\Driver\AbstractDriverTest;
use function extension_loaded;
......
<?php
namespace Doctrine\DBAL\Tests\Functional\Driver\PDOOracle;
namespace Doctrine\DBAL\Tests\Functional\Driver\PDO\OCI;
use Doctrine\DBAL\Driver as DriverInterface;
use Doctrine\DBAL\Driver\PDOOracle\Driver;
use Doctrine\DBAL\Driver\PDO\OCI\Driver;
use Doctrine\DBAL\Tests\Functional\Driver\AbstractDriverTest;
use function extension_loaded;
......
<?php
namespace Doctrine\DBAL\Tests\Functional\Driver\PDOPgSql;
namespace Doctrine\DBAL\Tests\Functional\Driver\PDO\PgSQL;
use Doctrine\DBAL\Driver\PDO\PgSQL\Driver;
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use Doctrine\DBAL\Tests\FunctionalTestCase;
use function extension_loaded;
......@@ -18,11 +18,11 @@ class ConnectionTest extends FunctionalTestCase
parent::setUp();
if ($this->connection->getDatabasePlatform() instanceof PostgreSQL94Platform) {
if ($this->connection->getDriver() instanceof Driver) {
return;
}
self::markTestSkipped('PDOPgsql only test.');
self::markTestSkipped('pdo_pgsql only test.');
}
/**
......
<?php
namespace Doctrine\DBAL\Tests\Functional\Driver\PDOPgSql;
namespace Doctrine\DBAL\Tests\Functional\Driver\PDO\PgSQL;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Driver as DriverInterface;
use Doctrine\DBAL\Driver\PDOPgSql\Driver;
use Doctrine\DBAL\Driver\PDO\PgSQL\Driver;
use Doctrine\DBAL\Tests\Functional\Driver\AbstractDriverTest;
use Doctrine\DBAL\Tests\TestUtil;
......
<?php
namespace Doctrine\DBAL\Tests\Functional\Driver\PDOSqlsrv;
namespace Doctrine\DBAL\Tests\Functional\Driver\PDO\SQLSrv;
use Doctrine\DBAL\Driver as DriverInterface;
use Doctrine\DBAL\Driver\PDOSqlsrv\Connection;
use Doctrine\DBAL\Driver\PDOSqlsrv\Driver;
use Doctrine\DBAL\Driver\PDO\SQLSrv\Connection;
use Doctrine\DBAL\Driver\PDO\SQLSrv\Driver;
use Doctrine\DBAL\Tests\Functional\Driver\AbstractDriverTest;
use Doctrine\DBAL\Tests\TestUtil;
use PDO;
......
<?php
namespace Doctrine\DBAL\Tests\Functional\Driver\PDOSqlite;
namespace Doctrine\DBAL\Tests\Functional\Driver\PDO\SQLite;
use Doctrine\DBAL\Driver as DriverInterface;
use Doctrine\DBAL\Driver\PDOSqlite\Driver;
use Doctrine\DBAL\Driver\PDO\SQLite\Driver;
use Doctrine\DBAL\Tests\Functional\Driver\AbstractDriverTest;
use function extension_loaded;
......
......@@ -3,7 +3,7 @@
namespace Doctrine\DBAL\Tests\Functional;
use Doctrine\DBAL\Driver\Exception;
use Doctrine\DBAL\Driver\PDOOracle\Driver as PDOOracleDriver;
use Doctrine\DBAL\Driver\PDO;
use Doctrine\DBAL\Driver\Result;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Schema\Table;
......@@ -27,7 +27,7 @@ class StatementTest extends FunctionalTestCase
public function testStatementIsReusableAfterFreeingResult(): void
{
if ($this->connection->getDriver() instanceof PDOOracleDriver) {
if ($this->connection->getDriver() instanceof PDO\OCI\Driver) {
self::markTestIncomplete('See https://bugs.php.net/bug.php?id=77181');
}
......@@ -50,7 +50,7 @@ class StatementTest extends FunctionalTestCase
public function testReuseStatementWithLongerResults(): void
{
if ($this->connection->getDriver() instanceof PDOOracleDriver) {
if ($this->connection->getDriver() instanceof PDO\OCI\Driver) {
self::markTestIncomplete('PDO_OCI doesn\'t support fetching blobs via PDOStatement::fetchAll()');
}
......@@ -87,7 +87,7 @@ class StatementTest extends FunctionalTestCase
public function testFetchLongBlob(): void
{
if ($this->connection->getDriver() instanceof PDOOracleDriver) {
if ($this->connection->getDriver() instanceof PDO\OCI\Driver) {
// inserting BLOBs as streams on Oracle requires Oracle-specific SQL syntax which is currently not supported
// see http://php.net/manual/en/pdo.lobs.php#example-1035
self::markTestSkipped('DBAL doesn\'t support storing LOBs represented as streams using PDO_OCI');
......@@ -153,7 +153,7 @@ EOF
public function testReuseStatementAfterFreeingResult(): void
{
if ($this->connection->getDriver() instanceof PDOOracleDriver) {
if ($this->connection->getDriver() instanceof PDO\OCI\Driver) {
self::markTestIncomplete('See https://bugs.php.net/bug.php?id=77181');
}
......
......@@ -3,7 +3,7 @@
namespace Doctrine\DBAL\Tests\Functional;
use DateTime;
use Doctrine\DBAL\Driver\PDOOracle\Driver as PDOOracleDriver;
use Doctrine\DBAL\Driver\PDO;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Tests\FunctionalTestCase;
use Doctrine\DBAL\Types\Type;
......@@ -120,7 +120,7 @@ class TypeConversionTest extends FunctionalTestCase
*/
public function testIdempotentConversionToString(string $type, $originalValue): void
{
if ($type === 'text' && $this->connection->getDriver() instanceof PDOOracleDriver) {
if ($type === 'text' && $this->connection->getDriver() instanceof PDO\OCI\Driver) {
// inserting BLOBs as streams on Oracle requires Oracle-specific SQL syntax which is currently not supported
// see http://php.net/manual/en/pdo.lobs.php#example-1035
self::markTestSkipped('DBAL doesn\'t support storing LOBs represented as streams using PDO_OCI');
......
......@@ -5,7 +5,7 @@ declare(strict_types=1);
namespace Doctrine\DBAL\Tests\Functional\Types;
use Doctrine\DBAL\Driver\IBMDB2\Driver;
use Doctrine\DBAL\Driver\PDOOracle\Driver as PDOOracleDriver;
use Doctrine\DBAL\Driver\PDO;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Tests\FunctionalTestCase;
......@@ -21,7 +21,7 @@ class BinaryTest extends FunctionalTestCase
{
parent::setUp();
if ($this->connection->getDriver() instanceof PDOOracleDriver) {
if ($this->connection->getDriver() instanceof PDO\OCI\Driver) {
self::markTestSkipped('PDO_OCI doesn\'t support binding binary values');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment