diff --git a/lib/Doctrine/DBAL/Types/Type.php b/lib/Doctrine/DBAL/Types/Type.php index 9a642b5cd65..64e59fec068 100644 --- a/lib/Doctrine/DBAL/Types/Type.php +++ b/lib/Doctrine/DBAL/Types/Type.php @@ -315,6 +315,12 @@ static function (Type $type): string { */ public function __toString() { + Deprecation::trigger( + 'doctrine/dbal', + 'https://github.com/doctrine/dbal/pull/3258', + 'Type::__toString() is deprecated, use Type::getName() or get_class($type) instead.' + ); + $type = static::class; $position = strrpos($type, '\\');