Skip to content

Remove deprecated components #4153

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

Merged
merged 2 commits into from
Jul 7, 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
8 changes: 8 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Upgrade to 3.0

## BC BREAK: Removed DBALException factory methods

The following factory methods of the DBALException class have been removed:

1. `DBALException::invalidPlatformSpecified()`.
2. `DBALException::invalidPdoInstance()`.

## BC BREAK: PDO-based driver classes are moved under the PDO namespace

The following classes have been renamed:
Expand Down Expand Up @@ -134,6 +141,7 @@ The `Doctrine\DBAL\Driver::getName()` has been removed.
* Removed `MysqlSessionInit` listener.
* Removed `MysqlPlatform::getCollationFieldDeclaration()`.
* Removed `AbstractPlatform::getIdentityColumnNullInsertSQL()`.
* Removed `AbstractPlatform::fixSchemaElementName()`.
* Removed `Table::addUnnamedForeignKeyConstraint()` and `Table::addNamedForeignKeyConstraint()`.
* Removed `Table::renameColumn()`.
* Removed `SQLParserUtils::getPlaceholderPositions()`.
Expand Down
23 changes: 0 additions & 23 deletions src/DBALException.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ public static function notSupported($method)
return new self(sprintf("Operation '%s' is not supported by platform.", $method));
}

/**
* @deprecated Use {@link invalidPlatformType()} instead.
*/
public static function invalidPlatformSpecified(): self
{
return new self(
"Invalid 'platform' option specified, need to give an instance of " . AbstractPlatform::class . '.'
);
}

/**
* @param mixed $invalidPlatform
*/
Expand Down Expand Up @@ -82,19 +72,6 @@ public static function invalidPlatformVersionSpecified($version, $expectedFormat
);
}

/**
* @deprecated Passing a PDO instance in connection parameters is deprecated.
*
* @return DBALException
*/
public static function invalidPdoInstance()
{
return new self(
"The 'pdo' option was used in DriverManager::getConnection() but no " .
'instance of PDO was given.'
);
}

/**
* @param string|null $url The URL that was provided in the connection parameters (if any).
*
Expand Down
15 changes: 0 additions & 15 deletions src/Platforms/AbstractPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -3380,21 +3380,6 @@ public function getSQLResultCasing($column)
return $column;
}

/**
* Makes any fixes to a name of a schema element (table, sequence, ...) that are required
* by restrictions of the platform, like a maximum length.
*
* @deprecated
*
* @param string $schemaElementName
*
* @return string
*/
public function fixSchemaElementName($schemaElementName)
{
return $schemaElementName;
}

/**
* Maximum length of any given database identifier, like tables or column names.
*
Expand Down
15 changes: 0 additions & 15 deletions src/Platforms/OraclePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -1088,21 +1088,6 @@ public function getTimeFormatString()
return '1900-01-01 H:i:s';
}

/**
* {@inheritDoc}
*
* @deprecated
*/
public function fixSchemaElementName($schemaElementName)
{
if (strlen($schemaElementName) > 30) {
// Trim it
return substr($schemaElementName, 0, 30);
}

return $schemaElementName;
}

/**
* {@inheritDoc}
*/
Expand Down