odolbeau / phone-number-bundle

Integrates libphonenumber into your Symfony application
MIT License
215 stars 43 forks source link

feat: Configurable Doctrine SQL Column Length #155

Closed Crovitche-1623 closed 11 months ago

Crovitche-1623 commented 11 months ago

Using the form type supplied, the number is automatically converted to the E164 format. The E164 format has a maximum of 15 digits (without the "+"), so the length must be configurable, as the doctrine format is 35 characters long and hard-coded.

With my PR, it's now possible to configure the length of the column. For instance:

#[ORM\Column(type: PhoneNumberType::NAME, length: 16)]
private ?PhoneNumber $phoneNumber = null;

156

maxhelias commented 11 months ago

Can you add a line to the changelog and rebase pls ?

Crovitche-1623 commented 11 months ago

Done

maxhelias commented 11 months ago

Thanks !