diff --git a/src/Money/BigDecimalType.php b/src/Money/BigDecimalType.php index 33725bf..0cee041 100644 --- a/src/Money/BigDecimalType.php +++ b/src/Money/BigDecimalType.php @@ -5,19 +5,11 @@ use Brick\Math\BigDecimal; use Doctrine\DBAL\Platforms\AbstractPlatform; -final class BigDecimalType extends \Doctrine\DBAL\Types\Type +final class BigDecimalType extends \Doctrine\DBAL\Types\StringType { public const NAME = 'big_decimal'; - /** - * @param string[] $fieldDeclaration - */ - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string - { - return $platform->getDecimalTypeDeclarationSQL($fieldDeclaration); - } - /** * @param mixed $value */ diff --git a/tests/DoctrineTypes/Money/BigDecimalTypeTest.phpt b/tests/DoctrineTypes/Money/BigDecimalTypeTest.phpt index 9b30e03..a30fe30 100644 --- a/tests/DoctrineTypes/Money/BigDecimalTypeTest.phpt +++ b/tests/DoctrineTypes/Money/BigDecimalTypeTest.phpt @@ -22,7 +22,7 @@ final class BigDecimalTypeTest extends \Tester\TestCase { $type = Type::getType(BigDecimalType::NAME); - Assert::same('NUMERIC(10, 0)', $type->getSQLDeclaration([], new Platform())); + Assert::same('VARCHAR(255)', $type->getSQLDeclaration([], new Platform())); } public function testConvertToPhpValue(): void