diff --git a/tests/Tests/ORM/Functional/Ticket/GH10747Test.php b/tests/Tests/ORM/Functional/Ticket/GH10747Test.php index bbe15501e94..f7f8d2f6ac8 100644 --- a/tests/Tests/ORM/Functional/Ticket/GH10747Test.php +++ b/tests/Tests/ORM/Functional/Ticket/GH10747Test.php @@ -135,23 +135,19 @@ public function __construct(GH10747Article $article, public string $name) class GH10747CustomIdObjectHashType extends DBALType { - public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): mixed + public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): string { return $value->id . '_test'; } - public function convertToPHPValue(mixed $value, AbstractPlatform $platform): mixed + public function convertToPHPValue(mixed $value, AbstractPlatform $platform): CustomIdObject { return new CustomIdObject(str_replace('_test', '', $value)); } - public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string + public function getSQLDeclaration(array $column, AbstractPlatform $platform): string { - if (method_exists($platform, 'getStringTypeDeclarationSQL')) { - return $platform->getStringTypeDeclarationSQL($fieldDeclaration); - } - - return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); + return $platform->getStringTypeDeclarationSQL($column); } public function getName(): string