Skip to content

Commit

Permalink
feat: Configurable Doctrine SQL Column Length
Browse files Browse the repository at this point in the history
Add the possibility to configure the Doctrine SQL Column Length
  • Loading branch information
Crovitche-1623 authored Nov 16, 2023
1 parent f4a5d9f commit 3b12c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Doctrine/DBAL/Types/PhoneNumberType.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function getName(): string

public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string
{
return $platform->getVarcharTypeDeclarationSQL(['length' => 35]);
return $platform->getVarcharTypeDeclarationSQL(['length' => $fieldDeclaration['length'] ?? 35]);
}

public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string
Expand Down

0 comments on commit 3b12c21

Please sign in to comment.