Skip to content

Commit

Permalink
Merge pull request #4229 from morozov/deprecate-platform-methods
Browse files Browse the repository at this point in the history
Deprecate more AbstractPlatform methods
  • Loading branch information
morozov authored Aug 26, 2020
2 parents 994e701 + acd5837 commit 6d28b1c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 2 deletions.
7 changes: 5 additions & 2 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ 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()`.
3. `prefersSequences()`.
4. `supportsForeignKeyOnUpdate()`.

##`ServerInfoAwareConnection::requiresQueryForServerVersion()` is deprecated.

Expand Down
6 changes: 6 additions & 0 deletions lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -3230,6 +3232,8 @@ public function supportsCreateDropForeignKeyConstraints(): bool
/**
* Whether this platform supports onUpdate in foreign key constraints.
*
* @deprecated
*
* @return bool
*/
public function supportsForeignKeyOnUpdate()
Expand Down Expand Up @@ -3481,6 +3485,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.
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/DBAL/Platforms/DB2Platform.php
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,8 @@ public function prefersIdentityColumns()
* {@inheritDoc}
*
* DB2 returns all column names in SQL result sets in uppercase.
*
* @deprecated
*/
public function getSQLResultCasing($column)
{
Expand Down
6 changes: 6 additions & 0 deletions lib/Doctrine/DBAL/Platforms/OraclePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,8 @@ protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName)

/**
* {@inheritDoc}
*
* @deprecated
*/
public function prefersSequences()
{
Expand Down Expand Up @@ -1055,6 +1057,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)
{
Expand Down Expand Up @@ -1126,6 +1130,8 @@ public function supportsSequences()

/**
* {@inheritDoc}
*
* @deprecated
*/
public function supportsForeignKeyOnUpdate()
{
Expand Down
4 changes: 4 additions & 0 deletions lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ public function supportsCommentOnStatement()

/**
* {@inheritDoc}
*
* @deprecated
*/
public function prefersSequences()
{
Expand Down Expand Up @@ -1090,6 +1092,8 @@ public function getName()
* {@inheritDoc}
*
* PostgreSQL returns all column names in SQL result sets in lowercase.
*
* @deprecated
*/
public function getSQLResultCasing($column)
{
Expand Down

0 comments on commit 6d28b1c

Please sign in to comment.