Skip to content

Commit

Permalink
Merge pull request #3257 from Majkl578/dev/removal/Type-__toString
Browse files Browse the repository at this point in the history
Remove Doctrine\DBAL\Types\Type::__toString()
  • Loading branch information
morozov committed Dec 6, 2018
2 parents c405841 + 46f60bb commit dcf864e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 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
15 changes: 0 additions & 15 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 end;
use function explode;
use function str_replace;

/**
* The base class for so-called Doctrine mapping types.
Expand Down Expand Up @@ -248,18 +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()
{
$e = explode('\\', static::class);

return str_replace('Type', '', end($e));
}

/**
* Does working with this column require SQL conversion functions?
*
Expand Down

0 comments on commit dcf864e

Please sign in to comment.