Unverified Commit 746e8e30 authored by Michael Moravec's avatar Michael Moravec Committed by Sergei Morozov

Remove Doctrine\DBAL\Types\Type::__toString()

parent 5b6b13ec
# Upgrade to 3.0 # 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 ## 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. 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.
......
...@@ -79,7 +79,7 @@ class Graphviz extends AbstractVisitor ...@@ -79,7 +79,7 @@ class Graphviz extends AbstractVisitor
$label .= '<TR>'; $label .= '<TR>';
$label .= '<TD BORDER="0" ALIGN="LEFT" BGCOLOR="#eeeeec">'; $label .= '<TD BORDER="0" ALIGN="LEFT" BGCOLOR="#eeeeec">';
$label .= '<FONT COLOR="#2e3436" FACE="Helvetica" POINT-SIZE="12">' . $columnLabel . '</FONT>'; $label .= '<FONT COLOR="#2e3436" FACE="Helvetica" POINT-SIZE="12">' . $columnLabel . '</FONT>';
$label .= '</TD><TD BORDER="0" ALIGN="LEFT" BGCOLOR="#eeeeec"><FONT COLOR="#2e3436" FACE="Helvetica" POINT-SIZE="10">' . strtolower($column->getType()) . '</FONT></TD>'; $label .= '</TD><TD BORDER="0" ALIGN="LEFT" BGCOLOR="#eeeeec"><FONT COLOR="#2e3436" FACE="Helvetica" POINT-SIZE="10">' . strtolower($column->getType()->getName()) . '</FONT></TD>';
$label .= '<TD BORDER="0" ALIGN="RIGHT" BGCOLOR="#eeeeec" PORT="col' . $column->getName() . '">'; $label .= '<TD BORDER="0" ALIGN="RIGHT" BGCOLOR="#eeeeec" PORT="col' . $column->getName() . '">';
$primaryKey = $table->getPrimaryKey(); $primaryKey = $table->getPrimaryKey();
......
...@@ -7,9 +7,6 @@ use Doctrine\DBAL\ParameterType; ...@@ -7,9 +7,6 @@ use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use function array_map; use function array_map;
use function get_class; use function get_class;
use function str_replace;
use function strrpos;
use function substr;
/** /**
* The base class for so-called Doctrine mapping types. * The base class for so-called Doctrine mapping types.
...@@ -302,23 +299,6 @@ abstract class Type ...@@ -302,23 +299,6 @@ abstract class Type
); );
} }
/**
* @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? * Does working with this column require SQL conversion functions?
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment