From 88a2be814c617efdf3db580151578ae91927d15b Mon Sep 17 00:00:00 2001 From: Michael Moravec Date: Fri, 17 Aug 2018 22:30:20 +0200 Subject: [PATCH] Remove Doctrine\DBAL\Types\Type::__toString() --- UPGRADE.md | 4 ++++ lib/Doctrine/DBAL/Types/Type.php | 20 -------------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index 2ced4fb807d..552f0672264 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,9 @@ # Upgrade to 3.0 +## BC BREAK: `Doctrine\DBAL\Types\Type::__toString()` removed + +Relying on string representation was discouraged and has been removed. + ## BC BREAK: The `NULL` value of `$offset` in LIMIT queries is not allowed The `NULL` value of the `$offset` argument in `AbstractPlatform::(do)?ModifyLimitQuery()` methods is no longer allowed. The absence of the offset should be indicated with a `0` which is now the default value. diff --git a/lib/Doctrine/DBAL/Types/Type.php b/lib/Doctrine/DBAL/Types/Type.php index 025eb14cbda..45ddbdcf777 100644 --- a/lib/Doctrine/DBAL/Types/Type.php +++ b/lib/Doctrine/DBAL/Types/Type.php @@ -5,9 +5,6 @@ use Doctrine\DBAL\DBALException; use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Platforms\AbstractPlatform; -use function str_replace; -use function strrpos; -use function substr; /** * The base class for so-called Doctrine mapping types. @@ -248,23 +245,6 @@ public static function getTypesMap() return self::$_typesMap; } - /** - * @deprecated Relying on string representation is discouraged and will be removed in DBAL 3.0. - * - * @return string - */ - public function __toString() - { - $type = static::class; - $position = strrpos($type, '\\'); - - if ($position !== false) { - $type = substr($type, $position); - } - - return str_replace('Type', '', $type); - } - /** * Does working with this column require SQL conversion functions? *