mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Use PhoneNumber form type.
This commit is contained in:
@@ -37,6 +37,7 @@ use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Collections\Criteria;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Exception;
|
||||
use libphonenumber\PhoneNumber;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
@@ -371,12 +372,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
/**
|
||||
* The person's mobile phone number.
|
||||
*
|
||||
* @ORM\Column(type="text")
|
||||
* @PhonenumberConstraint(
|
||||
* type="mobile",
|
||||
* )
|
||||
* @ORM\Column(type="phone_number")
|
||||
*/
|
||||
private string $mobilenumber = '';
|
||||
private ?PhoneNumber $mobilenumber;
|
||||
|
||||
/**
|
||||
* The person's nationality.
|
||||
@@ -426,12 +424,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
|
||||
/**
|
||||
* The person's phonenumber.
|
||||
*
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
* @PhonenumberConstraint(
|
||||
* type="landline",
|
||||
* )
|
||||
* @ORM\Column(type="phone_number")
|
||||
*/
|
||||
private ?string $phonenumber = null;
|
||||
private ?PhoneNumber $phonenumber;
|
||||
|
||||
/**
|
||||
* The person's place of birth.
|
||||
|
Reference in New Issue
Block a user