odolbeau / phone-number-bundle

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

feat: Configurable Doctrine SQL Column Length #155

Closed Crovitche-1623 closed 1 year ago

Crovitche-1623 commented 1 year 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 1 year ago

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

Crovitche-1623 commented 1 year ago

Done

maxhelias commented 1 year ago

Thanks !