From dd87ed0ec330864a0c404177b6600b81d7a242ff Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Tue, 25 Aug 2020 21:25:51 -0700 Subject: [PATCH 1/3] Deprecate AbstractPlatform::getSQLResultCasing() --- UPGRADE.md | 5 +++-- lib/Doctrine/DBAL/Platforms/AbstractPlatform.php | 2 ++ lib/Doctrine/DBAL/Platforms/DB2Platform.php | 2 ++ lib/Doctrine/DBAL/Platforms/OraclePlatform.php | 2 ++ lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php | 2 ++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 6479312d553..23cbf9f35b4 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -45,9 +45,10 @@ The following PDO-related classes outside of the PDO namespace have been depreca 1. `DBALException::invalidPlatformType()` is deprecated as unused as of v2.7.0. 2. `DBALException::invalidPdoInstance()` as passing a PDO instance via configuration is deprecated. -## `AbstractPlatform::fixSchemaElementName()` is deprecated. +## Deprecated `AbstractPlatform` methods. -The method is not used anywhere except for tests. +1. `fixSchemaElementName()`. +2. `getSQLResultCasing()`. ##`ServerInfoAwareConnection::requiresQueryForServerVersion()` is deprecated. diff --git a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index 3becfb65d13..dd02f31ae27 100644 --- a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -3481,6 +3481,8 @@ public function supportsLimitOffset() /** * Gets the character casing of a column in an SQL result set of this platform. * + * @deprecated + * * @param string $column The column name for which to get the correct character casing. * * @return string The column name in the character casing used in SQL result sets. diff --git a/lib/Doctrine/DBAL/Platforms/DB2Platform.php b/lib/Doctrine/DBAL/Platforms/DB2Platform.php index 9b9a0622b62..0b6c38e0afb 100644 --- a/lib/Doctrine/DBAL/Platforms/DB2Platform.php +++ b/lib/Doctrine/DBAL/Platforms/DB2Platform.php @@ -864,6 +864,8 @@ public function prefersIdentityColumns() * {@inheritDoc} * * DB2 returns all column names in SQL result sets in uppercase. + * + * @deprecated */ public function getSQLResultCasing($column) { diff --git a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php index faf76de197b..b5403c6b212 100644 --- a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -1055,6 +1055,8 @@ protected function doModifyLimitQuery($query, $limit, $offset = null) * {@inheritDoc} * * Oracle returns all column names in SQL result sets in uppercase. + * + * @deprecated */ public function getSQLResultCasing($column) { diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php index db9bec13d52..3dcbf49f198 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -1090,6 +1090,8 @@ public function getName() * {@inheritDoc} * * PostgreSQL returns all column names in SQL result sets in lowercase. + * + * @deprecated */ public function getSQLResultCasing($column) { From fef8e7a11353cd9660498736f2c949494c7c54a8 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Tue, 25 Aug 2020 21:27:08 -0700 Subject: [PATCH 2/3] Deprecate AbstractPlatform::prefersSequences() --- UPGRADE.md | 1 + lib/Doctrine/DBAL/Platforms/AbstractPlatform.php | 2 ++ lib/Doctrine/DBAL/Platforms/OraclePlatform.php | 2 ++ lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php | 2 ++ 4 files changed, 7 insertions(+) diff --git a/UPGRADE.md b/UPGRADE.md index 23cbf9f35b4..ed0a062cfdf 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -49,6 +49,7 @@ The following PDO-related classes outside of the PDO namespace have been depreca 1. `fixSchemaElementName()`. 2. `getSQLResultCasing()`. +3. `prefersSequences()`. ##`ServerInfoAwareConnection::requiresQueryForServerVersion()` is deprecated. diff --git a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index dd02f31ae27..6cf6d2d7aa0 100644 --- a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -2651,6 +2651,8 @@ public function getColumnCollationDeclarationSQL($collation) * Whether the platform prefers sequences for ID generation. * Subclasses should override this method to return TRUE if they prefer sequences. * + * @deprecated + * * @return bool */ public function prefersSequences() diff --git a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php index b5403c6b212..678b36ce470 100644 --- a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -968,6 +968,8 @@ protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName) /** * {@inheritDoc} + * + * @deprecated */ public function prefersSequences() { diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php index 3dcbf49f198..9d5b88cc344 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -210,6 +210,8 @@ public function supportsCommentOnStatement() /** * {@inheritDoc} + * + * @deprecated */ public function prefersSequences() { From acd58378367259cda9c500047123acfba1b2d30c Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Tue, 25 Aug 2020 21:28:20 -0700 Subject: [PATCH 3/3] Deprecate AbstractPlatform::supportsForeignKeyOnUpdate() --- UPGRADE.md | 1 + lib/Doctrine/DBAL/Platforms/AbstractPlatform.php | 2 ++ lib/Doctrine/DBAL/Platforms/OraclePlatform.php | 2 ++ 3 files changed, 5 insertions(+) diff --git a/UPGRADE.md b/UPGRADE.md index ed0a062cfdf..5c22213f691 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -50,6 +50,7 @@ The following PDO-related classes outside of the PDO namespace have been depreca 1. `fixSchemaElementName()`. 2. `getSQLResultCasing()`. 3. `prefersSequences()`. +4. `supportsForeignKeyOnUpdate()`. ##`ServerInfoAwareConnection::requiresQueryForServerVersion()` is deprecated. diff --git a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index 6cf6d2d7aa0..ec2aab5ce5c 100644 --- a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -3232,6 +3232,8 @@ public function supportsCreateDropForeignKeyConstraints(): bool /** * Whether this platform supports onUpdate in foreign key constraints. * + * @deprecated + * * @return bool */ public function supportsForeignKeyOnUpdate() diff --git a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php index 678b36ce470..ccf1e600822 100644 --- a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -1130,6 +1130,8 @@ public function supportsSequences() /** * {@inheritDoc} + * + * @deprecated */ public function supportsForeignKeyOnUpdate() {