From 69ec5c8a4869ad11fb93b10235cfea96de6aa6eb Mon Sep 17 00:00:00 2001 From: chris Date: Sat, 24 Feb 2024 17:33:29 +0100 Subject: [PATCH] feat: replace deprecated call to getVarcharTypeDeclarationSQL() (#158) Co-authored-by: Christopher Georg Co-authored-by: Johan Wilfer --- Tests/Type/MoneyTypeTest.php | 2 +- src/Type/MoneyType.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/Type/MoneyTypeTest.php b/Tests/Type/MoneyTypeTest.php index 44f8adf5..e7af107e 100644 --- a/Tests/Type/MoneyTypeTest.php +++ b/Tests/Type/MoneyTypeTest.php @@ -27,7 +27,7 @@ public function testGetSqlDeclaration(): void { $this->platform ->expects($this->once()) - ->method('getVarcharTypeDeclarationSQL') + ->method('getStringTypeDeclarationSQL') ->with(['varchar']) ->willReturn('varchar(255)'); self::assertSame('varchar(255)', $this->type->getSqlDeclaration(['varchar'], $this->platform)); diff --git a/src/Type/MoneyType.php b/src/Type/MoneyType.php index e4795895..4448b4e4 100644 --- a/src/Type/MoneyType.php +++ b/src/Type/MoneyType.php @@ -24,7 +24,7 @@ class MoneyType extends Type public function getSqlDeclaration(array $column, AbstractPlatform $platform): string { - return $platform->getVarcharTypeDeclarationSQL($column); + return $platform->getStringTypeDeclarationSQL($column); } public function requiresSQLCommentHint(AbstractPlatform $platform): bool