Merge remote-tracking branch 'origin/master' into issue469_budget

This commit is contained in:
2022-03-02 22:01:28 +01:00
90 changed files with 1283 additions and 416 deletions

View File

@@ -39,6 +39,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;
@@ -393,15 +394,10 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* The person's mobile phone number.
*
* @ORM\Column(type="text")
* @Assert\Regex(
* pattern="/^([\+{1}])([0-9\s*]{4,20})$/",
* )
* @PhonenumberConstraint(
* type="mobile",
* )
* @PhonenumberConstraint(type="mobile")
* @ORM\Column(type="phone_number", nullable=true)
*/
private string $mobilenumber = '';
private ?PhoneNumber $mobilenumber = null;
/**
* The person's nationality.
@@ -451,15 +447,12 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/**
* The person's phonenumber.
*
* @ORM\Column(type="text")
* @Assert\Regex(
* pattern="/^([\+{1}])([0-9\s*]{4,20})$/",
* )
* @ORM\Column(type="phone_number", nullable=true)
* @PhonenumberConstraint(
* type="landline",
* )
*/
private string $phonenumber = '';
private ?PhoneNumber $phonenumber = null;
/**
* The person's place of birth.
@@ -1213,7 +1206,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
return $this->memo;
}
public function getMobilenumber(): string
public function getMobilenumber(): ?PhoneNumber
{
return $this->mobilenumber;
}
@@ -1273,7 +1266,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
return $this->otherPhoneNumbers;
}
public function getPhonenumber(): string
public function getPhonenumber(): ?PhoneNumber
{
return $this->phonenumber;
}
@@ -1631,9 +1624,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
return $this;
}
public function setMobilenumber(?string $mobilenumber = ''): self
public function setMobilenumber(?PhoneNumber $mobilenumber): self
{
$this->mobilenumber = (string) $mobilenumber;
$this->mobilenumber = $mobilenumber;
return $this;
}
@@ -1659,9 +1652,9 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
return $this;
}
public function setPhonenumber(?string $phonenumber = ''): self
public function setPhonenumber(?PhoneNumber $phonenumber): self
{
$this->phonenumber = (string) $phonenumber;
$this->phonenumber = $phonenumber;
return $this;
}