From c38bbcc09cd9579338dbb4c827b4cf42d17bfa9e Mon Sep 17 00:00:00 2001 From: Michael Moravec Date: Fri, 17 Aug 2018 22:02:09 +0200 Subject: [PATCH] Deprecate Doctrine\DBAL\Types\Type::getDefaultLength() --- UPGRADE.md | 4 ++++ lib/Doctrine/DBAL/Types/Type.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/UPGRADE.md b/UPGRADE.md index e1335b1441d..31d3fd94955 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,9 @@ # Upgrade to 2.9 +## Deprecated `Doctrine\DBAL\Types\Type::getDefaultLength()` + +This method was never used by DBAL internally. It is now deprecated and will be removed in DBAL 3.0. + ## Deprecated `Doctrine\DBAL\Types\Type::__toString()` Relying on string representation is discouraged and will be removed in DBAL 3.0. diff --git a/lib/Doctrine/DBAL/Types/Type.php b/lib/Doctrine/DBAL/Types/Type.php index 56405dfe909..31f93866b9a 100644 --- a/lib/Doctrine/DBAL/Types/Type.php +++ b/lib/Doctrine/DBAL/Types/Type.php @@ -146,7 +146,7 @@ public function convertToPHPValue($value, AbstractPlatform $platform) * * @return int|null * - * @todo Needed? + * @deprecated Rely on information provided by the platform instead. */ public function getDefaultLength(AbstractPlatform $platform) {