diff --git a/UPGRADE.md b/UPGRADE.md index d8cf618481d..9898e669d57 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -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. diff --git a/lib/Doctrine/DBAL/DBALException.php b/lib/Doctrine/DBAL/DBALException.php index 9a85c110bb8..18ca800f330 100644 --- a/lib/Doctrine/DBAL/DBALException.php +++ b/lib/Doctrine/DBAL/DBALException.php @@ -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( @@ -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()