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 some DBALException factory methods #4134

Merged
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
5 changes: 5 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Upgrade to 2.11

## `DBALException` factory method deprecations

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.

The method is not used anywhere except for tests.
Expand Down
5 changes: 5 additions & 0 deletions lib/Doctrine/DBAL/DBALException.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ 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(
Expand Down Expand Up @@ -90,6 +93,8 @@ public static function invalidPlatformVersionSpecified($version, $expectedFormat
}

/**
* @deprecated Passing a PDO instance in connection parameters is deprecated.
*
* @return DBALException
*/
public static function invalidPdoInstance()
Expand Down