diff --git a/UPGRADE.md b/UPGRADE.md index 5104437b08c..5ffb1a7c720 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -30,22 +30,6 @@ The statement implementations no longer detect whether `$params` is a zero- or o The `ServerInfoAwareConnection::requiresQueryForServerVersion()` method has been removed as an implementation detail which is the same for almost all supported drivers. -## BC BREAK: Removed support for PostgreSQL 9.3 and older - -DBAL now requires PostgeSQL 9.4 or newer, support for unmaintained versions has been dropped. -If you are using any of the legacy versions, you have to upgrade to newer PostgreSQL version (9.6+ is recommended). -`Doctrine\DBAL\Platforms\PostgreSqlPlatform` and `Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords` now represent the PostgreSQL 9.4. - -The following classes have been removed: - - * `Doctrine\DBAL\Platforms\PostgreSQL94Platform` - * `Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords` - -## BC BREAK: Removed support for MariaDB 10.0 and older - -DBAL now requires MariaDB 10.1 or newer, support for unmaintained versions has been dropped. -If you are using any of the legacy versions, you have to upgrade to newer MariaDB version (10.1+ is recommended). - ## BC BREAK: Changes in obtaining the currently selected database name - The `Doctrine\DBAL\Driver::getDatabase()` method has been removed. Please use `Doctrine\DBAL\Connection::getDatabase()` instead. @@ -266,94 +250,94 @@ The `NULL` value of the `$offset` argument in `AbstractPlatform::(do)?ModifyLimi The support for DB-generated UUIDs was removed as non-portable. Please generate UUIDs on the application side (e.g. using [ramsey/uuid](https://packagist.org/packages/ramsey/uuid)). -## BC BREAK: Removed MsSQLKeywords class +## BC BREAK: Removed Doctrine\DBAL\Version -The `Doctrine\DBAL\Platforms\MsSQLKeywords` has been removed. -Please use `Doctrine\DBAL\Platforms\SQLServerPlatform `instead. +The Doctrine\DBAL\Version class is no longer available: please refrain from checking the DBAL version at runtime. -## BC BREAK: Removed PDO DB2 driver +## BC BREAK: SQLLogger changes -This PDO-based IBM DB2 driver (built on top of pdo_ibm extension) has already been unsupported as of 2.5, it has now been now removed. +- The `SQLLogger` interface has changed; the methods are the same but use scalar type hints, return types, and non-nullable arrays. +- `SQLLogger` implementations: `DebugStack`, `EchoSQLLogger`, `LoggerChain` are now final. +- `Configuration::getSQLLogger()` does not return `null` anymore, but a `NullLogger` implementation. +- `Configuration::setSQLLogger()` does not allow `null` anymore. -The following class has been removed: +## BC BREAK: Changes to handling binary fields - * `Doctrine\DBAL\Driver\PDOIbm\Driver` +- Binary fields whose length exceeds the maximum field size on a given platform are no longer represented as `BLOB`s. + Use binary fields of a size which fits all target platforms, or use blob explicitly instead. +- Binary fields are no longer represented as streams in PHP. They are represented as strings. + +# Upgrade to 3.0 ## BC BREAK: Removed support for SQL Anywhere 12 and older DBAL now requires SQL Anywhere 16 or newer, support for unmaintained versions has been dropped. -If you are using any of the legacy versions, you have to upgrade to newer SQL Anywhere version (16+). -`Doctrine\DBAL\Platforms\SQLAnywherePlatform` and `Doctrine\DBAL\Platforms\Keywords\SQLAnywhereKeywords` now represent the SQL Anywhere 16. +If you are using any of the legacy versions, you have to upgrade to a newer SQL Anywhere version (16+). The following classes have been removed: + * `Doctrine\DBAL\Platforms\SQLAnywherePlatform` * `Doctrine\DBAL\Platforms\SQLAnywhere11Platform` * `Doctrine\DBAL\Platforms\SQLAnywhere12Platform` - * `Doctrine\DBAL\Platforms\SQLAnywhere16Platform` + * `Doctrine\DBAL\Platforms\Keywords\SQLAnywhereKeywords` * `Doctrine\DBAL\Platforms\Keywords\SQLAnywhere11Keywords` * `Doctrine\DBAL\Platforms\Keywords\SQLAnywhere12Keywords` - * `Doctrine\DBAL\Platforms\Keywords\SQLAnywhere16Keywords` - -## BC BREAK: Removed support for SQL Server 2008 and older -DBAL now requires SQL Server 2012 or newer, support for unmaintained versions has been dropped. -If you are using any of the legacy versions, you have to upgrade to newer SQL Server version. -`Doctrine\DBAL\Platforms\SQLServerPlatform` and `Doctrine\DBAL\Platforms\Keywords\SQLServerKeywords` now represent the SQL Server 2012. - -The following classes have been removed: - - * `Doctrine\DBAL\Platforms\SQLServer2005Platform` - * `Doctrine\DBAL\Platforms\SQLServer2008Platform` - * `Doctrine\DBAL\Platforms\SQLServer2012Platform` - * `Doctrine\DBAL\Platforms\Keywords\SQLServer2005Keywords` - * `Doctrine\DBAL\Platforms\Keywords\SQLServer2008Keywords` - * `Doctrine\DBAL\Platforms\Keywords\SQLServer2012Keywords` - -The `AbstractSQLServerDriver` class and its subclasses no longer implement the `VersionAwarePlatformDriver` interface. - -## BC BREAK: Removed support for PostgreSQL 9.2 and older +## BC BREAK: Removed support for PostgreSQL 9.3 and older -DBAL now requires PostgeSQL 9.3 or newer, support for unmaintained versions has been dropped. -If you are using any of the legacy versions, you have to upgrade to newer PostgreSQL version (9.6+ is recommended). -`Doctrine\DBAL\Platforms\PostgreSqlPlatform` and `Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords` now represent the PostgreSQL 9.3. +DBAL now requires PostgreSQL 9.4 or newer, support for unmaintained versions has been dropped. +If you are using any of the legacy versions, you have to upgrade to a newer PostgreSQL version (9.6+ is recommended). The following classes have been removed: + * `Doctrine\DBAL\Platforms\PostgreSqlPlatform` * `Doctrine\DBAL\Platforms\PostgreSQL91Platform` * `Doctrine\DBAL\Platforms\PostgreSQL92Platform` + * `Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords` * `Doctrine\DBAL\Platforms\Keywords\PostgreSQL91Keywords` * `Doctrine\DBAL\Platforms\Keywords\PostgreSQL92Keywords` -## BC BREAK: Removed Doctrine\DBAL\Version +## BC BREAK: Removed support for MariaDB 10.0 and older -The Doctrine\DBAL\Version class is no longer available: please refrain from checking the DBAL version at runtime. +DBAL now requires MariaDB 10.1 or newer, support for unmaintained versions has been dropped. +If you are using any of the legacy versions, you have to upgrade to a newer MariaDB version (10.1+ is recommended). -## BC BREAK: Removed Drizzle support +## BC BREAK: PingableConnection and ServerInfoAwareConnection interfaces now extend Connection -The Drizzle project is abandoned and is therefore not supported by Doctrine DBAL anymore. +All implementations of the `PingableConnection` and `ServerInfoAwareConnection` interfaces have to implement the methods defined in the `Connection` interface as well. -## BC BREAK: SQLLogger changes +## BC BREAK: VersionAwarePlatformDriver interface now extends Driver -- The `SQLLogger` interface has changed; the methods are the same but use scalar type hints, return types, and non-nullable arrays. -- `SQLLogger` implementations: `DebugStack`, `EchoSQLLogger`, `LoggerChain` are now final. -- `Configuration::getSQLLogger()` does not return `null` anymore, but a `NullLogger` implementation. -- `Configuration::setSQLLogger()` does not allow `null` anymore. +All implementations of the `VersionAwarePlatformDriver` interface have to implement the methods defined in the `Driver` interface as well. -## BC BREAK: Changes to handling binary fields +## BC BREAK: Removed MsSQLKeywords class -- Binary fields whose length exceeds the maximum field size on a given platform are no longer represented as `BLOB`s. - Use binary fields of a size which fits all target platforms, or use blob explicitly instead. -- Binary fields are no longer represented as streams in PHP. They are represented as strings. +The `Doctrine\DBAL\Platforms\MsSQLKeywords` class has been removed. +Please use `Doctrine\DBAL\Platforms\SQLServerPlatform `instead. -# Upgrade to 3.0 +## BC BREAK: Removed PDO DB2 driver -## BC BREAK: PingableConnection and ServerInfoAwareConnection interfaces now extend Connection +This PDO-based IBM DB2 driver (built on top of `pdo_ibm` extension) has already been unsupported as of 2.5, it has been now removed. -All implementations of the `PingableConnection` and `ServerInfoAwareConnection` interfaces have to implement the methods defined in the `Connection` interface as well. +The following class has been removed: -## BC BREAK: VersionAwarePlatformDriver interface now extends Driver + * `Doctrine\DBAL\Driver\PDOIbm\Driver` -All implementations of the `VersionAwarePlatformDriver` interface have to implement the methods defined in the `Driver` interface as well. +## BC BREAK: Removed support for SQL Server 2008 and older + +DBAL now requires SQL Server 2012 or newer, support for unmaintained versions has been dropped. +If you are using any of the legacy versions, you have to upgrade to a newer SQL Server version. + +The following classes have been removed: + + * `Doctrine\DBAL\Platforms\SQLServerPlatform` + * `Doctrine\DBAL\Platforms\SQLServer2005Platform` + * `Doctrine\DBAL\Platforms\SQLServer2008Platform` + * `Doctrine\DBAL\Platforms\Keywords\SQLServerKeywords` + * `Doctrine\DBAL\Platforms\Keywords\SQLServer2005Keywords` + * `Doctrine\DBAL\Platforms\Keywords\SQLServer2008Keywords` + +The `AbstractSQLServerDriver` class and its subclasses no longer implement the `VersionAwarePlatformDriver` interface. ## BC BREAK: Removed Doctrine\DBAL\Version @@ -396,6 +380,10 @@ After: $stmt->bindValue(1, 1, ParameterType::INTEGER); $stmt->fetchAll(FetchMode::COLUMN); +## BC BREAK: Removed Drizzle support + +The Drizzle project is abandoned and is therefore not supported by Doctrine DBAL anymore. + ## BC BREAK: Removed dbal:import CLI command The `dbal:import` CLI command has been removed since it only worked with PDO-based drivers by relying on a non-documented behavior of the extension, and it was impossible to make it work with other drivers. @@ -407,6 +395,24 @@ Please use other database client applications for import, e.g.: # Upgrade to 2.11 +## Deprecated database platforms: + +1. PostgreSQL 9.3 and older +2. MariaDB 10.0 and older +3. SQL Server 2008 and older +4. SQL Anywhere 12 and older +5. Drizzle +6. Azure SQL Database + +## Deprecated database drivers: + +1. PDO-based IBM DB2 driver +2. Drizzle MySQL driver + +## Deprecated `Doctrine\DBAL\Sharding` package + +The sharding functionality in DBAL has been effectively unmaintained for a long time. + ## Deprecated `Doctrine\DBAL\Version` class The usage of the `Doctrine\DBAL\Version` class is deprecated as internal implementation detail. Please refrain from checking the DBAL version at runtime. diff --git a/docs/en/reference/configuration.rst b/docs/en/reference/configuration.rst index cdf06aced79..e9a623b80da 100644 --- a/docs/en/reference/configuration.rst +++ b/docs/en/reference/configuration.rst @@ -351,7 +351,7 @@ You can also pass this option if you want to disable automatic database platform detection for a driver that natively supports it and choose the platform version implementation explicitly. -If you are running a MariaDB database, you should prefix the ``serverVersion`` +If you are running a MariaDB database, you should prefix the ``serverVersion`` with ``mariadb-`` (ex: ``mariadb-10.2.12``). Custom Platform diff --git a/docs/en/reference/platforms.rst b/docs/en/reference/platforms.rst index 35e65463ac3..c8cb9618c89 100644 --- a/docs/en/reference/platforms.rst +++ b/docs/en/reference/platforms.rst @@ -50,20 +50,17 @@ Oracle Microsoft SQL Server ^^^^^^^^^^^^^^^^^^^^ -- ``SQLServerPlatform`` for version 2012 and above. +- ``SQLServer2012Platform`` for version 2012 and above. PostgreSQL ^^^^^^^^^^ -- ``PostgreSqlPlatform`` for version 9.4 and above. +- ``PostgreSQL94Platform`` for version 9.4 and above. - ``PostgreSQL100Platform`` for version 10.0 and above. SAP Sybase SQL Anywhere ^^^^^^^^^^^^^^^^^^^^^^^ -- ``SQLAnywherePlatform`` for version 10 and above. -- ``SQLAnywhere11Platform`` for version 11 and above. -- ``SQLAnywhere12Platform`` for version 12 and above. - ``SQLAnywhere16Platform`` for version 16 and above. SQLite @@ -103,4 +100,3 @@ all the different database vendors, for example MySQL BIGINT and Oracle NUMBER should be handled as integer. Doctrine 2 offers a powerful way to abstract the database to php and back conversion, which is described in the next section. - diff --git a/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php b/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php index 77bc3a6b306..4bc5193254f 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php @@ -11,7 +11,7 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\Exception\InvalidPlatformVersion; use Doctrine\DBAL\Platforms\PostgreSQL100Platform; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Schema\AbstractSchemaManager; use Doctrine\DBAL\Schema\PostgreSqlSchemaManager; use Doctrine\DBAL\VersionAwarePlatformDriver; @@ -98,12 +98,12 @@ public function createDatabasePlatformForVersion(string $version) : AbstractPlat return new PostgreSQL100Platform(); } - return new PostgreSqlPlatform(); + return new PostgreSQL94Platform(); } public function getDatabasePlatform() : AbstractPlatform { - return new PostgreSqlPlatform(); + return new PostgreSQL94Platform(); } public function getSchemaManager(Connection $conn) : AbstractSchemaManager diff --git a/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php b/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php index e755046f230..b5d60ddfc1e 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php @@ -10,7 +10,7 @@ use Doctrine\DBAL\Exception\DriverException; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\Exception\InvalidPlatformVersion; -use Doctrine\DBAL\Platforms\SQLAnywherePlatform; +use Doctrine\DBAL\Platforms\SQLAnywhere16Platform; use Doctrine\DBAL\Schema\AbstractSchemaManager; use Doctrine\DBAL\Schema\SQLAnywhereSchemaManager; use Doctrine\DBAL\VersionAwarePlatformDriver; @@ -89,12 +89,12 @@ public function createDatabasePlatformForVersion(string $version) : AbstractPlat ); } - return new SQLAnywherePlatform(); + return new SQLAnywhere16Platform(); } public function getDatabasePlatform() : AbstractPlatform { - return new SQLAnywherePlatform(); + return new SQLAnywhere16Platform(); } public function getSchemaManager(Connection $conn) : AbstractSchemaManager diff --git a/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php b/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php index 322a74b2e43..aa7422a5401 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php @@ -7,7 +7,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver; use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\DBAL\Schema\AbstractSchemaManager; use Doctrine\DBAL\Schema\SQLServerSchemaManager; @@ -18,7 +18,7 @@ abstract class AbstractSQLServerDriver implements Driver { public function getDatabasePlatform() : AbstractPlatform { - return new SQLServerPlatform(); + return new SQLServer2012Platform(); } public function getSchemaManager(Connection $conn) : AbstractSchemaManager diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php index d01f2788153..07d87efba30 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php @@ -7,7 +7,7 @@ /** * PostgreSQL 10.0 reserved keywords list. */ -class PostgreSQL100Keywords extends PostgreSQLKeywords +class PostgreSQL100Keywords extends PostgreSQL94Keywords { public function getName() : string { diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php similarity index 95% rename from lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php rename to lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php index 23c7379ff52..7192dffa567 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php @@ -5,13 +5,13 @@ namespace Doctrine\DBAL\Platforms\Keywords; /** - * PostgreSQL keywords list. + * PostgreSQL 9.4 reserved keywords list. */ -class PostgreSQLKeywords extends KeywordList +class PostgreSQL94Keywords extends KeywordList { public function getName() : string { - return 'PostgreSQL'; + return 'PostgreSQL94'; } /** diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php similarity index 97% rename from lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php rename to lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php index ff14cc9a2cf..b1e6423e5ef 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php @@ -5,13 +5,13 @@ namespace Doctrine\DBAL\Platforms\Keywords; /** - * SAP Sybase SQL Anywhere 10 reserved keywords list. + * SAP Sybase SQL Anywhere 16 reserved keywords list. */ -class SQLAnywhereKeywords extends KeywordList +class SQLAnywhere16Keywords extends KeywordList { public function getName() : string { - return 'SQLAnywhere'; + return 'SQLAnywhere16'; } /** diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/SQLServerKeywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php similarity index 96% rename from lib/Doctrine/DBAL/Platforms/Keywords/SQLServerKeywords.php rename to lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php index 42f8fd8406b..d2b91fb18bf 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLServerKeywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php @@ -5,15 +5,13 @@ namespace Doctrine\DBAL\Platforms\Keywords; /** - * Microsoft SQL Server 2000 reserved keyword dictionary. - * - * @link www.doctrine-project.com + * Microsoft SQL Server 2012 reserved keyword dictionary. */ -class SQLServerKeywords extends KeywordList +class SQLServer2012Keywords extends KeywordList { public function getName() : string { - return 'SQLServer'; + return 'SQLServer2012'; } /** diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php b/lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php index cc70fc9b373..4d9b575acb3 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php @@ -9,7 +9,7 @@ /** * Provides the behavior, features and SQL dialect of the PostgreSQL 10.0 database platform. */ -class PostgreSQL100Platform extends PostgreSqlPlatform +class PostgreSQL100Platform extends PostgreSQL94Platform { protected function getReservedKeywordsClass() : string { diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php similarity index 99% rename from lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php rename to lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php index 75d909e0cc6..b32d22ea694 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php @@ -36,10 +36,8 @@ /** * Provides the behavior, features and SQL dialect of the PostgreSQL 9.4+ database platform. - * - * @todo Rename: PostgreSQLPlatform */ -class PostgreSqlPlatform extends AbstractPlatform +class PostgreSQL94Platform extends AbstractPlatform { /** @var bool */ private $useBooleanTrueFalseStrings = true; @@ -1036,7 +1034,7 @@ public function hasNativeJsonType() : bool protected function getReservedKeywordsClass() : string { - return Keywords\PostgreSQLKeywords::class; + return Keywords\PostgreSQL94Keywords::class; } /** diff --git a/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php b/lib/Doctrine/DBAL/Platforms/SQLAnywhere16Platform.php similarity index 99% rename from lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php rename to lib/Doctrine/DBAL/Platforms/SQLAnywhere16Platform.php index 941feb7e929..bf678b0702f 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLAnywhere16Platform.php @@ -36,10 +36,9 @@ use function substr; /** - * The SQLAnywherePlatform provides the behavior, features and SQL dialect of the - * SAP Sybase SQL Anywhere 12 database platform. + * Provides the behavior, features and SQL dialect of the SAP Sybase SQL Anywhere 16 database platform. */ -class SQLAnywherePlatform extends AbstractPlatform +class SQLAnywhere16Platform extends AbstractPlatform { public const FOREIGN_KEY_MATCH_SIMPLE = 1; public const FOREIGN_KEY_MATCH_FULL = 2; @@ -1310,7 +1309,7 @@ protected function getRenameIndexSQL(string $oldIndexName, Index $index, string protected function getReservedKeywordsClass() : string { - return Keywords\SQLAnywhereKeywords::class; + return Keywords\SQLAnywhere16Keywords::class; } protected function initializeDoctrineTypeMappings() : void diff --git a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php b/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php similarity index 99% rename from lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php rename to lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php index e1609183fa0..e28513447ef 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php @@ -38,10 +38,9 @@ use const PREG_OFFSET_CAPTURE; /** - * The SQLServerPlatform provides the behavior, features and SQL dialect of the - * Microsoft SQL Server database platform. + * Provides the behavior, features and SQL dialect of the Microsoft SQL Server 2012 database platform. */ -class SQLServerPlatform extends AbstractPlatform +class SQLServer2012Platform extends AbstractPlatform { public function getCurrentDateSQL() : string { @@ -1370,7 +1369,7 @@ public function getForUpdateSQL() : string protected function getReservedKeywordsClass() : string { - return Keywords\SQLServerKeywords::class; + return Keywords\SQLServer2012Keywords::class; } public function quoteSingleIdentifier(string $str) : string diff --git a/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php b/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php index 20f2c55e597..883c84aedc8 100644 --- a/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php @@ -6,7 +6,7 @@ use Doctrine\DBAL\Exception\DriverException; use Doctrine\DBAL\FetchMode; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Types; use function array_change_key_case; @@ -110,7 +110,7 @@ public function dropDatabase(string $database) : void throw $exception; } - assert($this->_platform instanceof PostgreSqlPlatform); + assert($this->_platform instanceof PostgreSQL94Platform); $this->_execSql( [ @@ -494,7 +494,7 @@ public function listTableDetails(string $tableName) : Table $table = parent::listTableDetails($tableName); $platform = $this->_platform; - assert($platform instanceof PostgreSqlPlatform); + assert($platform instanceof PostgreSQL94Platform); $sql = $platform->getListTableMetadataSQL($tableName); $tableOptions = $this->_conn->fetchAssoc($sql); diff --git a/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php b/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php index 404757b1862..28ff31a9056 100644 --- a/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php @@ -4,7 +4,7 @@ namespace Doctrine\DBAL\Schema; -use Doctrine\DBAL\Platforms\SQLAnywherePlatform; +use Doctrine\DBAL\Platforms\SQLAnywhere16Platform; use Doctrine\DBAL\Types\Type; use function assert; use function is_string; @@ -47,13 +47,13 @@ public function dropDatabase(string $database) : void public function startDatabase(string $database) : void { - assert($this->_platform instanceof SQLAnywherePlatform); + assert($this->_platform instanceof SQLAnywhere16Platform); $this->_execSql($this->_platform->getStartDatabaseSQL($database)); } public function stopDatabase(string $database) : void { - assert($this->_platform instanceof SQLAnywherePlatform); + assert($this->_platform instanceof SQLAnywhere16Platform); $this->_execSql($this->_platform->getStopDatabaseSQL($database)); } diff --git a/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php b/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php index e216d14363b..ae031e68486 100644 --- a/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php @@ -6,7 +6,7 @@ use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Driver\DriverException; -use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\DBAL\Types\Type; use PDOException; use Throwable; @@ -330,7 +330,7 @@ public function listTableDetails(string $tableName) : Table $table = parent::listTableDetails($tableName); $platform = $this->_platform; - assert($platform instanceof SQLServerPlatform); + assert($platform instanceof SQLServer2012Platform); $sql = $platform->getListTableMetadataSQL($tableName); $tableOptions = $this->_conn->fetchAssoc($sql); diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php index 28d3b333412..2b9396318e6 100644 --- a/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php +++ b/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php @@ -12,11 +12,11 @@ use Doctrine\DBAL\Platforms\Keywords\MySQLKeywords; use Doctrine\DBAL\Platforms\Keywords\OracleKeywords; use Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords; -use Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords; +use Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords; use Doctrine\DBAL\Platforms\Keywords\ReservedKeywordsValidator; -use Doctrine\DBAL\Platforms\Keywords\SQLAnywhereKeywords; +use Doctrine\DBAL\Platforms\Keywords\SQLAnywhere16Keywords; use Doctrine\DBAL\Platforms\Keywords\SQLiteKeywords; -use Doctrine\DBAL\Platforms\Keywords\SQLServerKeywords; +use Doctrine\DBAL\Platforms\Keywords\SQLServer2012Keywords; use InvalidArgumentException; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; @@ -38,11 +38,11 @@ class ReservedWordsCommand extends Command 'mysql80' => MySQL80Keywords::class, 'mariadb102' => MariaDb102Keywords::class, 'oracle' => OracleKeywords::class, - 'pgsql' => PostgreSQLKeywords::class, + 'pgsql' => PostgreSQL94Keywords::class, 'pgsql100' => PostgreSQL100Keywords::class, - 'sqlanywhere' => SQLAnywhereKeywords::class, + 'sqlanywhere' => SQLAnywhere16Keywords::class, 'sqlite' => SQLiteKeywords::class, - 'sqlserver' => SQLServerKeywords::class, + 'sqlserver' => SQLServer2012Keywords::class, ]; /** diff --git a/tests/Doctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php b/tests/Doctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php index 4e0de15de2e..29eebd0768a 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php @@ -9,7 +9,7 @@ use Doctrine\DBAL\Driver\AbstractPostgreSQLDriver; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\PostgreSQL100Platform; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Schema\AbstractSchemaManager; use Doctrine\DBAL\Schema\PostgreSqlSchemaManager; @@ -22,7 +22,7 @@ protected function createDriver() : Driver protected function createPlatform() : AbstractPlatform { - return new PostgreSqlPlatform(); + return new PostgreSQL94Platform(); } protected function createSchemaManager(Connection $connection) : AbstractSchemaManager @@ -36,9 +36,9 @@ protected function createSchemaManager(Connection $connection) : AbstractSchemaM protected function getDatabasePlatformsForVersions() : array { return [ - ['9.4', PostgreSqlPlatform::class], - ['9.4.0', PostgreSqlPlatform::class], - ['9.4.1', PostgreSqlPlatform::class], + ['9.4', PostgreSQL94Platform::class], + ['9.4.0', PostgreSQL94Platform::class], + ['9.4.1', PostgreSQL94Platform::class], ['10', PostgreSQL100Platform::class], ]; } diff --git a/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLAnywhereDriverTest.php b/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLAnywhereDriverTest.php index 8931dc6069a..19cd7778d50 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLAnywhereDriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLAnywhereDriverTest.php @@ -8,7 +8,7 @@ use Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver; use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Platforms\SQLAnywherePlatform; +use Doctrine\DBAL\Platforms\SQLAnywhere16Platform; use Doctrine\DBAL\Schema\AbstractSchemaManager; use Doctrine\DBAL\Schema\SQLAnywhereSchemaManager; @@ -21,7 +21,7 @@ protected function createDriver() : Driver protected function createPlatform() : AbstractPlatform { - return new SQLAnywherePlatform(); + return new SQLAnywhere16Platform(); } protected function createSchemaManager(Connection $connection) : AbstractSchemaManager @@ -35,13 +35,13 @@ protected function createSchemaManager(Connection $connection) : AbstractSchemaM protected function getDatabasePlatformsForVersions() : array { return [ - ['16', SQLAnywherePlatform::class], - ['16.0', SQLAnywherePlatform::class], - ['16.0.0', SQLAnywherePlatform::class], - ['16.0.0.0', SQLAnywherePlatform::class], - ['16.1.2.3', SQLAnywherePlatform::class], - ['16.9.9.9', SQLAnywherePlatform::class], - ['17', SQLAnywherePlatform::class], + ['16', SQLAnywhere16Platform::class], + ['16.0', SQLAnywhere16Platform::class], + ['16.0.0', SQLAnywhere16Platform::class], + ['16.0.0.0', SQLAnywhere16Platform::class], + ['16.1.2.3', SQLAnywhere16Platform::class], + ['16.9.9.9', SQLAnywhere16Platform::class], + ['17', SQLAnywhere16Platform::class], ]; } diff --git a/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLServerDriverTest.php b/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLServerDriverTest.php index 33ef93b3523..fdad1660112 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLServerDriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLServerDriverTest.php @@ -8,7 +8,7 @@ use Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver\AbstractSQLServerDriver; use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\DBAL\Schema\AbstractSchemaManager; use Doctrine\DBAL\Schema\SQLServerSchemaManager; @@ -21,7 +21,7 @@ protected function createDriver() : Driver protected function createPlatform() : AbstractPlatform { - return new SQLServerPlatform(); + return new SQLServer2012Platform(); } protected function createSchemaManager(Connection $connection) : AbstractSchemaManager @@ -35,7 +35,7 @@ protected function createSchemaManager(Connection $connection) : AbstractSchemaM protected function getDatabasePlatformsForVersions() : array { return [ - ['12', SQLServerPlatform::class], + ['12', SQLServer2012Platform::class], ]; } } diff --git a/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php b/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php index 7634338b9ff..7471f33925e 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php @@ -11,7 +11,7 @@ use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\SqlitePlatform; -use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\Tests\DbalFunctionalTestCase; use Doctrine\Tests\TestUtil; use Error; @@ -365,7 +365,7 @@ public function testPersistentConnection() : void $platform = $this->connection->getDatabasePlatform(); if ($platform instanceof SqlitePlatform - || $platform instanceof SQLServerPlatform) { + || $platform instanceof SQLServer2012Platform) { self::markTestSkipped('The platform does not support persistent connections'); } diff --git a/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php b/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php index a7bdc75b81c..ec4b6649ec6 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php @@ -6,7 +6,7 @@ use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\FetchMode; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\Tests\DbalFunctionalTestCase; use function extension_loaded; @@ -20,7 +20,7 @@ protected function setUp() : void parent::setUp(); - if ($this->connection->getDatabasePlatform() instanceof PostgreSqlPlatform) { + if ($this->connection->getDatabasePlatform() instanceof PostgreSQL94Platform) { return; } diff --git a/tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php b/tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php index 9d1c9b170cd..c2a4412f965 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php @@ -9,7 +9,7 @@ use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\MySqlPlatform; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Table; @@ -219,7 +219,7 @@ public function testConnectionException(array $params) : void $this->markTestSkipped('Only skipped if platform is not sqlite'); } - if ($platform instanceof PostgreSqlPlatform && isset($params['password'])) { + if ($platform instanceof PostgreSQL94Platform && isset($params['password'])) { $this->markTestSkipped('Does not work on Travis'); } diff --git a/tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest/PostgreSQL.php b/tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest/PostgreSQL.php index b6997a45479..df7f0d639a7 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest/PostgreSQL.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest/PostgreSQL.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\DBAL\Functional\Platform\ColumnTest; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\Tests\DBAL\Functional\Platform\ColumnTest; final class PostgreSQL extends ColumnTest @@ -13,6 +13,6 @@ protected function setUp() : void { parent::setUp(); - $this->requirePlatform(PostgreSqlPlatform::class); + $this->requirePlatform(PostgreSQL94Platform::class); } } diff --git a/tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest/SQLServer.php b/tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest/SQLServer.php index 0ca863eb788..69079388923 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest/SQLServer.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Platform/ColumnTest/SQLServer.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\DBAL\Functional\Platform\ColumnTest; -use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\Tests\DBAL\Functional\Platform\ColumnTest; final class SQLServer extends ColumnTest @@ -13,7 +13,7 @@ protected function setUp() : void { parent::setUp(); - $this->requirePlatform(SQLServerPlatform::class); + $this->requirePlatform(SQLServer2012Platform::class); } public function testVariableLengthStringNoLength() : void diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php index 590f9edddea..d18c0a70de8 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php @@ -5,7 +5,7 @@ namespace Doctrine\Tests\DBAL\Functional\Schema; use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Schema; use Doctrine\DBAL\Schema\Comparator; use Doctrine\DBAL\Schema\ForeignKeyConstraint; @@ -417,7 +417,7 @@ public function testPartialIndexes() : void public function testJsonbColumn() : void { - if (! $this->schemaManager->getDatabasePlatform() instanceof PostgreSqlPlatform) { + if (! $this->schemaManager->getDatabasePlatform() instanceof PostgreSQL94Platform) { $this->markTestSkipped('Requires PostgresSQL 9.4+'); return; diff --git a/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php b/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSQLPlatformTestCase.php similarity index 98% rename from tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php rename to tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSQLPlatformTestCase.php index 51070aef575..5c5118d3ba9 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSQLPlatformTestCase.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\DBAL\Platforms; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\ColumnDiff; use Doctrine\DBAL\Schema\Comparator; @@ -18,9 +18,9 @@ use function assert; use function sprintf; -abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCase +abstract class AbstractPostgreSQLPlatformTestCase extends AbstractPlatformTestCase { - /** @var PostgreSqlPlatform */ + /** @var PostgreSQL94Platform */ protected $platform; public function getGenerateTableSql() : string @@ -921,7 +921,7 @@ public function testInitializesTsvectorTypeMapping() : void */ public function testReturnsDisallowDatabaseConnectionsSQL() : void { - assert($this->platform instanceof PostgreSqlPlatform); + assert($this->platform instanceof PostgreSQL94Platform); self::assertSame( "UPDATE pg_database SET datallowconn = 'false' WHERE datname = 'foo'", @@ -934,7 +934,7 @@ public function testReturnsDisallowDatabaseConnectionsSQL() : void */ public function testReturnsCloseActiveDatabaseConnectionsSQL() : void { - assert($this->platform instanceof PostgreSqlPlatform); + assert($this->platform instanceof PostgreSQL94Platform); self::assertSame( "SELECT pg_terminate_backend(procpid) FROM pg_stat_activity WHERE datname = 'foo'", @@ -1024,7 +1024,7 @@ public function testQuotesSchemaNameInListTableColumnsSQL() : void */ public function testQuotesDatabaseNameInCloseActiveDatabaseConnectionsSQL() : void { - assert($this->platform instanceof PostgreSqlPlatform); + assert($this->platform instanceof PostgreSQL94Platform); self::assertStringContainsStringIgnoringCase( "'Foo''Bar\\'", diff --git a/tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php b/tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php index 32b6ba9239b..17cf588ab9b 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/AbstractSQLServerPlatformTestCase.php @@ -6,7 +6,7 @@ use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Exception\ColumnLengthRequired; -use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\ColumnDiff; use Doctrine\DBAL\Schema\Index; @@ -1096,7 +1096,7 @@ protected function getQuotesDropConstraintSQL() : string */ public function testGeneratesIdentifierNamesInDefaultConstraintDeclarationSQL(string $table, array $column, string $expectedSql) : void { - assert($this->platform instanceof SQLServerPlatform); + assert($this->platform instanceof SQLServer2012Platform); self::assertSame($expectedSql, $this->platform->getDefaultConstraintDeclarationSQL($table, $column)); } diff --git a/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL100PlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL100PlatformTest.php index c5421cff9d4..0734c603017 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL100PlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL100PlatformTest.php @@ -7,7 +7,7 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\PostgreSQL100Platform; -class PostgreSQL100PlatformTest extends PostgreSqlPlatformTest +class PostgreSQL100PlatformTest extends PostgreSQL94PlatformTest { public function createPlatform() : AbstractPlatform { diff --git a/tests/Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL94PlatformTest.php similarity index 92% rename from tests/Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php rename to tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL94PlatformTest.php index c2dff638561..bf8f64dc356 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL94PlatformTest.php @@ -5,16 +5,16 @@ namespace Doctrine\Tests\DBAL\Platforms; use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Types\Types; use function assert; -class PostgreSqlPlatformTest extends AbstractPostgreSqlPlatformTestCase +class PostgreSQL94PlatformTest extends AbstractPostgreSQLPlatformTestCase { public function createPlatform() : AbstractPlatform { - return new PostgreSqlPlatform(); + return new PostgreSQL94Platform(); } public function testSupportsPartialIndexes() : void @@ -97,7 +97,7 @@ public function testInitializesJsonTypeMapping() : void */ public function testReturnsCloseActiveDatabaseConnectionsSQL() : void { - assert($this->platform instanceof PostgreSqlPlatform); + assert($this->platform instanceof PostgreSQL94Platform); self::assertSame( "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'foo'", diff --git a/tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/SQLAnywhere16PlatformTest.php similarity index 99% rename from tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php rename to tests/Doctrine/Tests/DBAL/Platforms/SQLAnywhere16PlatformTest.php index 26a4dd67340..1b4de84ef89 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/SQLAnywhere16PlatformTest.php @@ -8,7 +8,7 @@ use Doctrine\DBAL\Exception\ColumnLengthRequired; use Doctrine\DBAL\LockMode; use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Platforms\SQLAnywherePlatform; +use Doctrine\DBAL\Platforms\SQLAnywhere16Platform; use Doctrine\DBAL\Platforms\TrimMode; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\ColumnDiff; @@ -27,14 +27,14 @@ use function strlen; use function substr; -class SQLAnywherePlatformTest extends AbstractPlatformTestCase +class SQLAnywhere16PlatformTest extends AbstractPlatformTestCase { - /** @var SQLAnywherePlatform */ + /** @var SQLAnywhere16Platform */ protected $platform; public function createPlatform() : AbstractPlatform { - return new SQLAnywherePlatform(); + return new SQLAnywhere16Platform(); } /** @@ -414,7 +414,7 @@ public function testGeneratesForeignKeyConstraintsWithAdvancedPlatformOptionsSQL $this->platform->getForeignKeyDeclarationSQL( new ForeignKeyConstraint(['a', 'b'], 'foreign_table', ['c', 'd'], 'fk', [ 'notnull' => true, - 'match' => SQLAnywherePlatform::FOREIGN_KEY_MATCH_SIMPLE_UNIQUE, + 'match' => SQLAnywhere16Platform::FOREIGN_KEY_MATCH_SIMPLE_UNIQUE, 'onUpdate' => 'CASCADE', 'onDelete' => 'SET NULL', 'check_on_commit' => true, diff --git a/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatform2012Test.php similarity index 87% rename from tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php rename to tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatform2012Test.php index 59457f40f6f..8fcd9f78404 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatform2012Test.php @@ -6,13 +6,13 @@ use Doctrine\DBAL\LockMode; use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; -class SQLServerPlatformTest extends AbstractSQLServerPlatformTestCase +class SQLServerPlatform2012Test extends AbstractSQLServerPlatformTestCase { public function createPlatform() : AbstractPlatform { - return new SQLServerPlatform(); + return new SQLServer2012Platform(); } /** diff --git a/tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php b/tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php index 42fb07370bf..0d5fc1566fb 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php @@ -6,7 +6,7 @@ use Doctrine\DBAL\Platforms\MySqlPlatform; use Doctrine\DBAL\Platforms\SqlitePlatform; -use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\Exception\UnknownColumnOption; use Doctrine\DBAL\Types\Type; @@ -120,7 +120,7 @@ public function testQuotedColumnName() : void $column = new Column('[bar]', $string); - $sqlServerPlatform = new SQLServerPlatform(); + $sqlServerPlatform = new SQLServer2012Platform(); self::assertEquals('bar', $column->getName()); self::assertEquals('[bar]', $column->getQuotedName($sqlServerPlatform));