Skip to content

Commit

Permalink
Merge pull request #4134 from morozov/deprecate-some-dbal-exception-m…
Browse files Browse the repository at this point in the history
…ethods

Deprecate some DBALException factory methods
  • Loading branch information
morozov authored Jul 2, 2020
2 parents 28ac296 + 0fe1dc4 commit 8e4b2b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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

0 comments on commit 8e4b2b2

Please sign in to comment.