Skip to content

Commit

Permalink
[doctrineGH-3258] Trigger deprecation for Type::__toString().
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Mar 22, 2021
1 parent 4e2bbfe commit 3a17360
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Doctrine/DBAL/Types/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, '\\');

Expand Down

0 comments on commit 3a17360

Please sign in to comment.