Skip to content

Commit

Permalink
Remove Doctrine\DBAL\Types\Type::__toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
Majkl578 authored and morozov committed Feb 6, 2019
1 parent bd21b59 commit 88a2be8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
4 changes: 4 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
20 changes: 0 additions & 20 deletions lib/Doctrine/DBAL/Types/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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?
*
Expand Down

0 comments on commit 88a2be8

Please sign in to comment.