Remove no longer used annotation use statements and replace with attribute use statements

This commit is contained in:
2025-10-01 18:38:41 +02:00
parent d8528dceab
commit 32d2bb002b
486 changed files with 495 additions and 1063 deletions

View File

@@ -44,8 +44,8 @@ use Doctrine\Common\Collections\Order;
use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\Common\Collections\Selectable;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Component\Validator\GroupSequenceProviderInterface;
@@ -631,7 +631,7 @@ class AccompanyingPeriod implements
return $this->getOpenParticipations();
}
public function getGroupSequence(): \Symfony\Component\Validator\Constraints\GroupSequence|array
public function getGroupSequence(): Assert\GroupSequence|array
{
if (self::STEP_DRAFT === $this->getStep()) {
return [[self::STEP_DRAFT]];

View File

@@ -28,7 +28,7 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
use Symfony\Component\Validator\Constraints as Assert;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work' => AccompanyingPeriodWork::class])]

View File

@@ -18,7 +18,7 @@ use Chill\PersonBundle\Entity\SocialWork\Evaluation;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work_evaluation' => AccompanyingPeriodWorkEvaluation::class])]
#[ORM\Entity]
@@ -140,7 +140,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
/**
* @return Collection<AccompanyingPeriodWorkEvaluationDocument>
*/
public function getDocuments(): \Doctrine\Common\Collections\Collection
public function getDocuments(): Collection
{
return $this->documents;
}

View File

@@ -16,7 +16,7 @@ use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
use Symfony\Component\Validator\Constraints as Assert;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work_evaluation_document' => AccompanyingPeriodWorkEvaluationDocument::class])]

View File

@@ -16,7 +16,7 @@ use Chill\PersonBundle\Entity\SocialWork\Result;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work_goal' => AccompanyingPeriodWorkGoal::class])]
#[ORM\Entity]

View File

@@ -14,7 +14,7 @@ namespace Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
/**
* ClosingMotive give an explanation why we closed the Accompanying period.
@@ -81,8 +81,6 @@ class ClosingMotive
/**
* Get id.
*
* @return int
*/
public function getId(): ?int
{
@@ -91,8 +89,6 @@ class ClosingMotive
/**
* Get name.
*
* @return array
*/
public function getName(): array
{
@@ -104,10 +100,7 @@ class ClosingMotive
return $this->ordering;
}
/**
* @return ClosingMotive
*/
public function getParent(): ?\Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive
public function getParent(): ?ClosingMotive
{
return $this->parent;
}

View File

@@ -16,8 +16,8 @@ use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Entity\User;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Validator\Constraints as Assert;
#[DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_comment' => Comment::class])]

View File

@@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['origin' => Origin::class])]
#[ORM\Entity]

View File

@@ -15,8 +15,8 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
use Symfony\Component\Serializer\Attribute\Groups;
/**
* **About denormalization**: this operation is operated by @see{AccompanyingPeriodResourdeNormalizer}.

View File

@@ -12,8 +12,8 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
use Symfony\Component\Serializer\Attribute\Groups;
/**
* AccompanyingPeriodParticipation Class.

View File

@@ -13,7 +13,7 @@ namespace Chill\PersonBundle\Entity;
use Chill\PersonBundle\Repository\AdministrativeStatusRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['chill_person_administrative_status' => AdministrativeStatus::class])]
#[ORM\Entity(repositoryClass: AdministrativeStatusRepository::class)]

View File

@@ -13,7 +13,7 @@ namespace Chill\PersonBundle\Entity;
use Chill\PersonBundle\Repository\EmploymentStatusRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['chill_person_employment_status' => EmploymentStatus::class])]
#[ORM\Entity(repositoryClass: EmploymentStatusRepository::class)]

View File

@@ -23,7 +23,7 @@ use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\Common\Collections\Selectable;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface;

View File

@@ -17,7 +17,7 @@ use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Chill\MainBundle\Entity\Embeddable\CommentEmbeddable;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
use Symfony\Component\Validator\Constraints as Assert;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household_composition_type' => HouseholdCompositionType::class])]

View File

@@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Entity\Household;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household_composition_type' => HouseholdCompositionType::class])]
#[ORM\Entity]

View File

@@ -13,7 +13,7 @@ namespace Chill\PersonBundle\Entity\Household;
use Chill\PersonBundle\Entity\Person;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity]

View File

@@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Entity\Household;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household_position' => Position::class])]
#[ORM\Entity]

View File

@@ -47,7 +47,7 @@ use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\Common\Collections\Selectable;
use Doctrine\ORM\Mapping as ORM;
use libphonenumber\PhoneNumber;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
@@ -1175,7 +1175,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @throws \Exception
*/
public function getLastAddress(?\DateTime $from = null): ?\Chill\MainBundle\Entity\Address
public function getLastAddress(?\DateTime $from = null): ?Address
{
return $this->getCurrentHouseholdAddress(
null !== $from ? \DateTimeImmutable::createFromMutable($from) : null
@@ -1288,7 +1288,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*
* @return Collection<Language>
*/
public function getSpokenLanguages(): \Doctrine\Common\Collections\Collection
public function getSpokenLanguages(): Collection
{
return $this->spokenLanguages;
}

View File

@@ -20,7 +20,7 @@ use Chill\PersonBundle\Entity\Person;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\MappedSuperclass]

View File

@@ -14,8 +14,8 @@ namespace Chill\PersonBundle\Entity\Person;
use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Attribute as Serializer;
use Symfony\Component\Serializer\Attribute\Groups;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['personResource' => PersonResource::class])]
#[ORM\Entity]

View File

@@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Entity\Person;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[ORM\Entity]
#[ORM\Table(name: 'chill_person_resource_kind')]

View File

@@ -17,8 +17,9 @@ use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Repository\ResidentialAddressRepository;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Context;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Attribute\Context;
use Symfony\Component\Serializer\Attribute\Groups;
#[ORM\Entity(repositoryClass: ResidentialAddressRepository::class)]
#[ORM\Table(name: 'chill_person_residential_address')]

View File

@@ -12,7 +12,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Attribute\Groups;
/**
* PersonAltName.
@@ -39,8 +39,6 @@ class PersonAltName
/**
* Get id.
*
* @return int
*/
public function getId(): ?int
{
@@ -49,8 +47,6 @@ class PersonAltName
/**
* Get key.
*
* @return string
*/
public function getKey(): string
{
@@ -59,8 +55,6 @@ class PersonAltName
/**
* Get label.
*
* @return string
*/
public function getLabel(): string
{

View File

@@ -56,17 +56,17 @@ class PersonNotDuplicate
return $this->id;
}
public function getPerson1(): ?\Chill\PersonBundle\Entity\Person
public function getPerson1(): ?Person
{
return $this->person1;
}
public function getPerson2(): ?\Chill\PersonBundle\Entity\Person
public function getPerson2(): ?Person
{
return $this->person2;
}
public function getUser(): ?\Chill\MainBundle\Entity\User
public function getUser(): ?User
{
return $this->user;
}

View File

@@ -12,8 +12,8 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Entity\Relationships;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Attribute as Serializer;
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
#[DiscriminatorMap(typeProperty: 'type', mapping: ['relation' => Relation::class])]
#[ORM\Entity]

View File

@@ -20,8 +20,8 @@ use Chill\PersonBundle\Validator\Constraints\Relationship\RelationshipNoDuplicat
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\DiscriminatorColumn;
use RuntimeException;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Attribute as Serializer;
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
use Symfony\Component\Validator\Constraints as Assert;
#[DiscriminatorMap(typeProperty: 'type', mapping: ['relationship' => Relationship::class])]

View File

@@ -14,7 +14,7 @@ namespace Chill\PersonBundle\Entity\SocialWork;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['social_work_evaluation' => Evaluation::class])]
#[ORM\Entity]

View File

@@ -14,7 +14,7 @@ namespace Chill\PersonBundle\Entity\SocialWork;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['social_work_goal' => Goal::class])]
#[ORM\Entity]

View File

@@ -16,7 +16,7 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkGoal;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['social_work_result' => Result::class])]
#[ORM\Entity]

View File

@@ -15,7 +15,7 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Attribute as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['social_work_social_action' => SocialAction::class])]
#[ORM\Entity]

View File

@@ -15,8 +15,8 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
use Symfony\Component\Serializer\Attribute\Groups;
#[DiscriminatorMap(typeProperty: 'type', mapping: ['social_issue' => SocialIssue::class])]
#[ORM\Entity]