Replace ArrayCollection with Collection&Selectable on some entity typing (fix previous commit)

Updated entity properties to use Collection&Selectable for better type safety and interoperability. This change affects User, Household, Calendar, Person, AccompanyingPeriod, and EntityWorkflow classes.
This commit is contained in:
2024-08-28 12:04:43 +02:00
parent c16219dc6d
commit b0485dbcc8
6 changed files with 22 additions and 19 deletions

View File

@@ -48,12 +48,12 @@ class Household implements HasCentersInterface
private CommentEmbeddable $commentMembers;
/**
* @var ArrayCollection<int, HouseholdComposition>
* @var \Doctrine\Common\Collections\Collection<int, \Chill\PersonBundle\Entity\Household\HouseholdComposition>&Selectable
*/
#[Assert\Valid(groups: ['household_composition'], traverse: true)]
#[ORM\OneToMany(mappedBy: 'household', targetEntity: HouseholdComposition::class, cascade: ['persist'], orphanRemoval: true)]
#[ORM\OrderBy(['startDate' => Criteria::DESC])]
private ArrayCollection $compositions;
private Collection&Selectable $compositions;
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id]