Skip to content

Commit

Permalink
[doctrineGH-3255] Trigger deprecation for Type::getDefaultLength
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Mar 27, 2021
1 parent b620d18 commit 9ee8278
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Doctrine/DBAL/Types/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\Deprecations\Deprecation;

use function array_map;
use function get_class;
Expand Down Expand Up @@ -173,6 +174,12 @@ public function convertToPHPValue($value, AbstractPlatform $platform)
*/
public function getDefaultLength(AbstractPlatform $platform)
{
Deprecation::trigger(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/3255',
'Type::getDefaultLength() is deprecated, use AbstractPlatform directly.'
);

return null;
}

Expand Down

0 comments on commit 9ee8278

Please sign in to comment.