Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate more AbstractPlatform methods #4229

Merged
merged 3 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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