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

@@ -120,12 +120,12 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
private ?int $id = null;
/**
* @var ArrayCollection<int, Invite>
* @var \Doctrine\Common\Collections\Collection<int, \Chill\CalendarBundle\Entity\Invite>&Selectable
*/
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\OneToMany(mappedBy: 'calendar', targetEntity: Invite::class, cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)]
#[ORM\JoinTable(name: 'chill_calendar.calendar_to_invites')]
private ArrayCollection $invites;
private Collection&Selectable $invites;
#[Serializer\Groups(['read', 'docgen:read'])]
#[Assert\NotNull(message: 'calendar.A location is required')]