mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 07:33:50 +00:00
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:
@@ -83,10 +83,10 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
|
||||
private ?Location $mainLocation = null;
|
||||
|
||||
/**
|
||||
* @var ArrayCollection<int, UserScopeHistory>
|
||||
* @var \Doctrine\Common\Collections\Collection<int, \Chill\MainBundle\Entity\User\UserScopeHistory>&Selectable
|
||||
*/
|
||||
#[ORM\OneToMany(mappedBy: 'user', targetEntity: UserScopeHistory::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
private ArrayCollection $scopeHistories;
|
||||
private Collection&Selectable $scopeHistories;
|
||||
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)]
|
||||
private string $password = '';
|
||||
@@ -98,10 +98,10 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
|
||||
private ?string $salt = null;
|
||||
|
||||
/**
|
||||
* @var ArrayCollection<int, UserJobHistory>
|
||||
* @var \Doctrine\Common\Collections\Collection<int, \Chill\MainBundle\Entity\User\UserJobHistory>&Selectable
|
||||
*/
|
||||
#[ORM\OneToMany(mappedBy: 'user', targetEntity: UserJobHistory::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
private ArrayCollection $jobHistories;
|
||||
private Collection&Selectable $jobHistories;
|
||||
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 80)]
|
||||
private string $username = '';
|
||||
|
@@ -21,7 +21,6 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\Common\Collections\Order;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Exception;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
@@ -278,7 +277,7 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function getStepsChained(): array
|
||||
{
|
||||
|
Reference in New Issue
Block a user