From 93595993df61c84ce200edc42bb72a11e5293f6a Mon Sep 17 00:00:00 2001 From: Michael Moravec Date: Fri, 16 Mar 2018 18:50:24 +0100 Subject: [PATCH 1/3] Drop support for SQL Server <2008 --- .../Keywords/SQLServer2005Keywords.php | 39 ------ .../Keywords/SQLServer2008Keywords.php | 31 ----- .../DBAL/Platforms/SQLServer2008Platform.php | 119 ------------------ .../Platforms/SQLServer2008PlatformTest.php | 19 --- 4 files changed, 208 deletions(-) delete mode 100644 lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php delete mode 100644 lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2008Keywords.php delete mode 100644 lib/Doctrine/DBAL/Platforms/SQLServer2008Platform.php delete mode 100644 tests/Doctrine/Tests/DBAL/Platforms/SQLServer2008PlatformTest.php diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php deleted file mode 100644 index c4fc6c838ff..00000000000 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php +++ /dev/null @@ -1,39 +0,0 @@ -doctrineTypeMapping['datetime2'] = 'datetime'; - $this->doctrineTypeMapping['date'] = 'date'; - $this->doctrineTypeMapping['time'] = 'time'; - $this->doctrineTypeMapping['datetimeoffset'] = 'datetimetz'; - } - - /** - * {@inheritdoc} - * - * Returns Microsoft SQL Server 2008 specific keywords class - */ - protected function getReservedKeywordsClass() - { - return Keywords\SQLServer2008Keywords::class; - } - - protected function getLikeWildcardCharacters() : string - { - return parent::getLikeWildcardCharacters() . '[]^'; - } -} diff --git a/tests/Doctrine/Tests/DBAL/Platforms/SQLServer2008PlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/SQLServer2008PlatformTest.php deleted file mode 100644 index 60abcad7c06..00000000000 --- a/tests/Doctrine/Tests/DBAL/Platforms/SQLServer2008PlatformTest.php +++ /dev/null @@ -1,19 +0,0 @@ -platform->getDateTimeTzTypeDeclarationSQL([])); - } -} From cf67e01412701f7a09925c12746c72936cf1da57 Mon Sep 17 00:00:00 2001 From: Michael Moravec Date: Fri, 16 Mar 2018 20:06:21 +0100 Subject: [PATCH 2/3] Drop support for SQL Anywhere <16 --- .../Keywords/SQLAnywhere11Keywords.php | 39 --------------- .../Keywords/SQLAnywhere12Keywords.php | 48 ------------------- .../Keywords/SQLAnywhere16Keywords.php | 39 --------------- 3 files changed, 126 deletions(-) delete mode 100644 lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php delete mode 100644 lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere12Keywords.php delete mode 100644 lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php deleted file mode 100644 index 09513c5770e..00000000000 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php +++ /dev/null @@ -1,39 +0,0 @@ - Date: Thu, 19 Mar 2020 11:34:14 -0700 Subject: [PATCH 3/3] Made some platform class names reflect the lowest server version they support The `PostgreSqlPlatform`, `SQLAnywherePlatform` and `SQLServerPlatform` classes have been renamed to `PostgreSQL94Platform`, `SQLAnywhere16Platform` and `SQLServer2012Platform` respectively. When deprecating an old platform version, we can deprecate and later remove a specific class. Otherwise, there's no way to express the deprecation on the class level and the upgrade notes contain sentences like: "`XYZPlatform` and `XYZKeywords` now represent XYZ (version)". --- UPGRADE.md | 58 ++++++++----------- docs/en/reference/platforms.rst | 6 +- .../DBAL/Driver/AbstractPostgreSQLDriver.php | 6 +- .../DBAL/Driver/AbstractSQLAnywhereDriver.php | 6 +- .../DBAL/Driver/AbstractSQLServerDriver.php | 4 +- .../Keywords/PostgreSQL100Keywords.php | 2 +- ...LKeywords.php => PostgreSQL94Keywords.php} | 4 +- .../Keywords/SQLAnywhereKeywords.php | 2 +- ...Keywords.php => SQLServer2012Keywords.php} | 6 +- .../DBAL/Platforms/PostgreSQL100Platform.php | 2 +- ...lPlatform.php => PostgreSQL94Platform.php} | 6 +- ...Platform.php => SQLAnywhere16Platform.php} | 9 ++- ...Platform.php => SQLServer2012Platform.php} | 7 +-- .../DBAL/Schema/PostgreSqlSchemaManager.php | 6 +- .../DBAL/Schema/SQLAnywhereSchemaManager.php | 6 +- .../DBAL/Schema/SQLServerSchemaManager.php | 4 +- .../Console/Command/ReservedWordsCommand.php | 8 +-- phpstan.neon.dist | 2 +- .../Driver/AbstractPostgreSQLDriverTest.php | 10 ++-- .../Driver/AbstractSQLAnywhereDriverTest.php | 18 +++--- .../Driver/AbstractSQLServerDriverTest.php | 6 +- .../Tests/DBAL/Functional/ConnectionTest.php | 4 +- .../Driver/PDOPgsqlConnectionTest.php | 4 +- .../Tests/DBAL/Functional/ExceptionTest.php | 4 +- .../Schema/PostgreSqlSchemaManagerTest.php | 4 +- ...=> AbstractPostgreSQLPlatformTestCase.php} | 2 +- .../Platforms/PostgreSQL100PlatformTest.php | 2 +- ...mTest.php => PostgreSQL94PlatformTest.php} | 6 +- ...Test.php => SQLAnywhere16PlatformTest.php} | 10 ++-- .../DBAL/Platforms/SQLServerPlatformTest.php | 4 +- .../Doctrine/Tests/DBAL/Schema/ColumnTest.php | 4 +- 31 files changed, 102 insertions(+), 120 deletions(-) rename lib/Doctrine/DBAL/Platforms/Keywords/{PostgreSQLKeywords.php => PostgreSQL94Keywords.php} (96%) rename lib/Doctrine/DBAL/Platforms/Keywords/{SQLServerKeywords.php => SQLServer2012Keywords.php} (96%) rename lib/Doctrine/DBAL/Platforms/{PostgreSqlPlatform.php => PostgreSQL94Platform.php} (99%) rename lib/Doctrine/DBAL/Platforms/{SQLAnywherePlatform.php => SQLAnywhere16Platform.php} (99%) rename lib/Doctrine/DBAL/Platforms/{SQLServerPlatform.php => SQLServer2012Platform.php} (99%) rename tests/Doctrine/Tests/DBAL/Platforms/{AbstractPostgreSqlPlatformTestCase.php => AbstractPostgreSQLPlatformTestCase.php} (99%) rename tests/Doctrine/Tests/DBAL/Platforms/{PostgreSqlPlatformTest.php => PostgreSQL94PlatformTest.php} (94%) rename tests/Doctrine/Tests/DBAL/Platforms/{SQLAnywherePlatformTest.php => SQLAnywhere16PlatformTest.php} (99%) diff --git a/UPGRADE.md b/UPGRADE.md index c6ecc04fca2..28b191c0e11 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,15 +1,32 @@ # 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 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\Keywords\SQLAnywhereKeywords` + * `Doctrine\DBAL\Platforms\Keywords\SQLAnywhere11Keywords` + * `Doctrine\DBAL\Platforms\Keywords\SQLAnywhere12Keywords` + ## 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. +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). -`Doctrine\DBAL\Platforms\PostgreSqlPlatform` and `Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords` now represent PostgreSQL 9.4. The following classes have been removed: - * `Doctrine\DBAL\Platforms\PostgreSQL94Platform` - * `Doctrine\DBAL\Platforms\Keywords\PostgreSQL94Keywords` + * `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 support for MariaDB 10.0 and older @@ -37,51 +54,22 @@ The following class has been removed: * `Doctrine\DBAL\Driver\PDOIbm\Driver` -## 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 a newer SQL Anywhere version (16+). -`Doctrine\DBAL\Platforms\SQLAnywherePlatform` and `Doctrine\DBAL\Platforms\Keywords\SQLAnywhereKeywords` now represent SQL Anywhere 16. - -The following classes have been removed: - - * `Doctrine\DBAL\Platforms\SQLAnywhere11Platform` - * `Doctrine\DBAL\Platforms\SQLAnywhere12Platform` - * `Doctrine\DBAL\Platforms\SQLAnywhere16Platform` - * `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 a newer SQL Server version. -`Doctrine\DBAL\Platforms\SQLServerPlatform` and `Doctrine\DBAL\Platforms\Keywords\SQLServerKeywords` now represent SQL Server 2012. The following classes have been removed: + * `Doctrine\DBAL\Platforms\SQLServerPlatform` * `Doctrine\DBAL\Platforms\SQLServer2005Platform` * `Doctrine\DBAL\Platforms\SQLServer2008Platform` - * `Doctrine\DBAL\Platforms\SQLServer2012Platform` + * `Doctrine\DBAL\Platforms\Keywords\SQLServerKeywords` * `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 - -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 a newer PostgreSQL version (9.6+ is recommended). -`Doctrine\DBAL\Platforms\PostgreSqlPlatform` and `Doctrine\DBAL\Platforms\Keywords\PostgreSQLKeywords` now represent PostgreSQL 9.3. - -The following classes have been removed: - - * `Doctrine\DBAL\Platforms\PostgreSQL91Platform` - * `Doctrine\DBAL\Platforms\PostgreSQL92Platform` - * `Doctrine\DBAL\Platforms\Keywords\PostgreSQL91Keywords` - * `Doctrine\DBAL\Platforms\Keywords\PostgreSQL92Keywords` - ## BC BREAK: Removed Doctrine\DBAL\Version The `Doctrine\DBAL\Version` class is no longer available: please refrain from checking the DBAL version at runtime. diff --git a/docs/en/reference/platforms.rst b/docs/en/reference/platforms.rst index 142f6fd7550..c8cb9618c89 100644 --- a/docs/en/reference/platforms.rst +++ b/docs/en/reference/platforms.rst @@ -50,18 +50,18 @@ 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 16 and above. +- ``SQLAnywhere16Platform`` for version 16 and above. SQLite ^^^^^^ diff --git a/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php b/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php index a051bf569c5..35b473ea06a 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php @@ -6,7 +6,7 @@ use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\PostgreSQL100Platform; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Schema\PostgreSqlSchemaManager; use Doctrine\DBAL\VersionAwarePlatformDriver; use function preg_match; @@ -96,7 +96,7 @@ public function createDatabasePlatformForVersion($version) return new PostgreSQL100Platform(); } - return new PostgreSqlPlatform(); + return new PostgreSQL94Platform(); } /** @@ -114,7 +114,7 @@ public function getDatabase(Connection $conn) */ public function getDatabasePlatform() { - return new PostgreSqlPlatform(); + return new PostgreSQL94Platform(); } /** diff --git a/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php b/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php index fdf4432c773..bc1ef504aef 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php @@ -5,7 +5,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Exception; -use Doctrine\DBAL\Platforms\SQLAnywherePlatform; +use Doctrine\DBAL\Platforms\SQLAnywhere16Platform; use Doctrine\DBAL\Schema\SQLAnywhereSchemaManager; use Doctrine\DBAL\VersionAwarePlatformDriver; use function preg_match; @@ -84,7 +84,7 @@ public function createDatabasePlatformForVersion($version) switch (true) { default: - return new SQLAnywherePlatform(); + return new SQLAnywhere16Platform(); } } @@ -103,7 +103,7 @@ public function getDatabase(Connection $conn) */ public function getDatabasePlatform() { - return new SQLAnywherePlatform(); + return new SQLAnywhere16Platform(); } /** diff --git a/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php b/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php index f010fc325c7..cd549606b0b 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php @@ -4,7 +4,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver; -use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\DBAL\Schema\SQLServerSchemaManager; /** @@ -27,7 +27,7 @@ public function getDatabase(Connection $conn) */ public function getDatabasePlatform() { - return new SQLServerPlatform(); + return new SQLServer2012Platform(); } /** diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL100Keywords.php index 80e4efadd60..3402db1902c 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 { /** * {@inheritdoc} diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php similarity index 96% rename from lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php rename to lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php index c8adb0f6089..eeff23cab3d 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQLKeywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php @@ -3,9 +3,9 @@ namespace Doctrine\DBAL\Platforms\Keywords; /** - * PostgreSQL keywords list. + * PostgreSQL 9.4 reserved keywords list. */ -class PostgreSQLKeywords extends KeywordList +class PostgreSQL94Keywords extends KeywordList { /** * {@inheritdoc} diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php index dc60610738b..9faefb34f2f 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhereKeywords.php @@ -3,7 +3,7 @@ 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 { 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 dc77ed314b3..24e190bf537 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLServerKeywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php @@ -3,11 +3,9 @@ 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 { /** * {@inheritdoc} diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php b/lib/Doctrine/DBAL/Platforms/PostgreSQL100Platform.php index e9d720a8ed4..cfb079f94dd 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 { /** * {@inheritdoc} 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 3c03ca86637..ad55e6d501d 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSQL94Platform.php @@ -34,10 +34,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; @@ -1208,7 +1206,7 @@ public function hasNativeJsonType() */ protected function getReservedKeywordsClass() { - 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 0bde50c18f1..1241778a0a2 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLAnywhere16Platform.php @@ -33,10 +33,9 @@ use function substr; /** - * The SQLAnywherePlatform provides the behavior, features and SQL dialect of the - * SAP Sybase SQL Anywhere 16 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; @@ -549,7 +548,7 @@ public function getDropIndexSQL($index, $table = null) if (! is_string($index)) { throw new InvalidArgumentException( - 'SQLAnywherePlatform::getDropIndexSQL() expects $index parameter to be string or ' . Index::class . '.' + 'AbstractPlatform::getDropIndexSQL() expects $index parameter to be string or ' . Index::class . '.' ); } @@ -563,7 +562,7 @@ public function getDropIndexSQL($index, $table = null) if (! is_string($table)) { throw new InvalidArgumentException( - 'SQLAnywherePlatform::getDropIndexSQL() expects $table parameter to be string or ' . Index::class . '.' + 'AbstractPlatform::getDropIndexSQL() expects $table parameter to be string or ' . Index::class . '.' ); } 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 d17229d5cc5..c62d921a42f 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php @@ -35,10 +35,9 @@ use function substr_count; /** - * 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 { /** * {@inheritdoc} @@ -1568,7 +1567,7 @@ public function getForUpdateSQL() */ protected function getReservedKeywordsClass() { - return Keywords\SQLServerKeywords::class; + return Keywords\SQLServer2012Keywords::class; } /** diff --git a/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php b/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php index e9608e7c193..77b56bbf1ca 100644 --- a/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php @@ -4,7 +4,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 const CASE_LOWER; @@ -114,7 +114,7 @@ public function dropDatabase($database) throw $exception; } - assert($this->_platform instanceof PostgreSqlPlatform); + assert($this->_platform instanceof PostgreSQL94Platform); $this->_execSql( [ @@ -494,7 +494,7 @@ public function listTableDetails($tableName) : Table { $table = parent::listTableDetails($tableName); - /** @var PostgreSqlPlatform $platform */ + /** @var PostgreSQL94Platform $platform */ $platform = $this->_platform; $sql = $platform->getListTableMetadataSQL($tableName); diff --git a/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php b/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php index c169a6e0708..0fa4c072b31 100644 --- a/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php @@ -2,7 +2,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; @@ -50,7 +50,7 @@ public function dropDatabase($database) */ public function startDatabase($database) { - assert($this->_platform instanceof SQLAnywherePlatform); + assert($this->_platform instanceof SQLAnywhere16Platform); $this->_execSql($this->_platform->getStartDatabaseSQL($database)); } @@ -61,7 +61,7 @@ public function startDatabase($database) */ public function stopDatabase($database) { - 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 35cdc45089a..050c4041fc7 100644 --- a/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php @@ -4,7 +4,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; @@ -334,7 +334,7 @@ public function listTableDetails($tableName) : Table { $table = parent::listTableDetails($tableName); - /** @var SQLServerPlatform $platform */ + /** @var SQLServer2012Platform $platform */ $platform = $this->_platform; $sql = $platform->getListTableMetadataSQL($tableName); diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php index 60c8f021c74..f7e2e6cd998 100644 --- a/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php +++ b/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php @@ -10,11 +10,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\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; @@ -34,11 +34,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, 'sqlite' => SQLiteKeywords::class, - 'sqlserver' => SQLServerKeywords::class, + 'sqlserver' => SQLServer2012Keywords::class, ]; /** diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 5b597ae2e9d..0f126260dba 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -23,7 +23,7 @@ parameters: - '~^Property Doctrine\\DBAL\\Schema\\Schema::\$_schemaConfig \(Doctrine\\DBAL\\Schema\\SchemaConfig\) does not accept default value of type false\.\z~' - '~^Method Doctrine\\DBAL\\Schema\\ForeignKeyConstraint::onEvent\(\) should return string\|null but returns false\.\z~' - '~^Method Doctrine\\DBAL\\Schema\\(Oracle|PostgreSql|SQLServer)SchemaManager::_getPortableTableDefinition\(\) should return array but returns string\.\z~' - - '~^Method Doctrine\\DBAL\\Platforms\\(|SQLAnywhere|Sqlite)Platform::_getTransactionIsolationLevelSQL\(\) should return string but returns int\.\z~' + - '~^Method Doctrine\\DBAL\\Platforms\\(|SQLAnywhere16|Sqlite)Platform::_getTransactionIsolationLevelSQL\(\) should return string but returns int\.\z~' - '~^Method Doctrine\\DBAL\\Driver\\OCI8\\OCI8Connection::lastInsertId\(\) should return string but returns (int|false)\.\z~' - '~^Method Doctrine\\DBAL\\Driver\\SQLSrv\\SQLSrvConnection::errorCode\(\) should return string\|null but returns false\.\z~' diff --git a/tests/Doctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php b/tests/Doctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php index 7536c02fbde..e8f4ba37d36 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/AbstractPostgreSQLDriverTest.php @@ -8,7 +8,7 @@ use Doctrine\DBAL\Driver\ResultStatement; 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; @@ -50,7 +50,7 @@ protected function createDriver() : Driver protected function createPlatform() : AbstractPlatform { - return new PostgreSqlPlatform(); + return new PostgreSQL94Platform(); } protected function createSchemaManager(Connection $connection) : AbstractSchemaManager @@ -64,9 +64,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 e025ef82cd1..840293b324b 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLAnywhereDriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLAnywhereDriverTest.php @@ -6,7 +6,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; @@ -19,7 +19,7 @@ protected function createDriver() : Driver protected function createPlatform() : AbstractPlatform { - return new SQLAnywherePlatform(); + return new SQLAnywhere16Platform(); } protected function createSchemaManager(Connection $connection) : AbstractSchemaManager @@ -33,13 +33,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 a0ea28b63ab..e627c139b67 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLServerDriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/AbstractSQLServerDriverTest.php @@ -6,7 +6,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; @@ -19,7 +19,7 @@ protected function createDriver() : Driver protected function createPlatform() : AbstractPlatform { - return new SQLServerPlatform(); + return new SQLServer2012Platform(); } protected function createSchemaManager(Connection $connection) : AbstractSchemaManager @@ -33,7 +33,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 2ff0aef4361..162624725e1 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php @@ -10,7 +10,7 @@ use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\SqlitePlatform; -use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\DBAL\Types\Types; use Doctrine\Tests\DbalFunctionalTestCase; use Doctrine\Tests\TestUtil; @@ -362,7 +362,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 8336a3900d1..aa5c99ef819 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/PDOPgsqlConnectionTest.php @@ -4,7 +4,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; @@ -18,7 +18,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 cd47e77f4f5..0a2bb187ce8 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/ExceptionTest.php @@ -7,7 +7,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; @@ -356,7 +356,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/Schema/PostgreSqlSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php index b2aa46c296c..b8a26af3c65 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/PostgreSqlSchemaManagerTest.php @@ -3,7 +3,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; @@ -401,7 +401,7 @@ public function testPartialIndexes() : void */ public function testJsonbColumn(string $type) : 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 99% rename from tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php rename to tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSQLPlatformTestCase.php index 44c28018849..9e48b82bfd9 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSqlPlatformTestCase.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/AbstractPostgreSQLPlatformTestCase.php @@ -14,7 +14,7 @@ use UnexpectedValueException; use function sprintf; -abstract class AbstractPostgreSqlPlatformTestCase extends AbstractPlatformTestCase +abstract class AbstractPostgreSQLPlatformTestCase extends AbstractPlatformTestCase { public function getGenerateTableSql() : string { diff --git a/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL100PlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL100PlatformTest.php index 4fb9c795371..8eb58c98e72 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 { /** * {@inheritdoc} diff --git a/tests/Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL94PlatformTest.php similarity index 94% rename from tests/Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php rename to tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL94PlatformTest.php index 2549facca99..cebd826cceb 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/PostgreSqlPlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/PostgreSQL94PlatformTest.php @@ -3,15 +3,15 @@ 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\Type; -class PostgreSqlPlatformTest extends AbstractPostgreSqlPlatformTestCase +class PostgreSQL94PlatformTest extends AbstractPostgreSQLPlatformTestCase { public function createPlatform() : AbstractPlatform { - return new PostgreSqlPlatform(); + return new PostgreSQL94Platform(); } public function testSupportsPartialIndexes() : void 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 377abdb1abf..e4ebd4aed89 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/SQLAnywherePlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/SQLAnywhere16PlatformTest.php @@ -5,7 +5,7 @@ use Doctrine\DBAL\DBALException; 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; @@ -23,14 +23,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(); } /** @@ -418,7 +418,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/SQLServerPlatformTest.php index 4760c502149..dded3e4605d 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/SQLServerPlatformTest.php @@ -4,13 +4,13 @@ use Doctrine\DBAL\LockMode; use Doctrine\DBAL\Platforms\AbstractPlatform; -use Doctrine\DBAL\Platforms\SQLServerPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; class SQLServerPlatformTest 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 269df62de32..748cb011886 100644 --- a/tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php +++ b/tests/Doctrine/Tests/DBAL/Schema/ColumnTest.php @@ -4,7 +4,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\Types\Type; use Doctrine\DBAL\Types\Types; @@ -121,7 +121,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));