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 7, 2021
1 parent 2aedbdb commit 59eeec8
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 59eeec8

Please sign in to comment.