Quellcode durchsuchen

upgrade api platform to v4 and fix most phpstans warnings

Olivier Massot vor 11 Monaten
Ursprung
Commit
cd5c248a8e
100 geänderte Dateien mit 713 neuen und 382 gelöschten Zeilen
  1. 1 1
      composer.json
  2. 4 4
      src/ApiResources/Organization/OrganizationCreationRequest.php
  3. 2 2
      src/ApiResources/Profile/AccessProfile.php
  4. 2 2
      src/ApiResources/Profile/OrganizationProfile.php
  5. 9 2
      src/Doctrine/AbstractExtension.php
  6. 7 6
      src/Doctrine/ORM/AST/SphericalDistance.php
  7. 100 52
      src/Entity/Access/Access.php
  8. 5 2
      src/Entity/Access/AccessFamily.php
  9. 2 2
      src/Entity/Access/OrganizationFunction.php
  10. 3 3
      src/Entity/Access/PersonalizedList.php
  11. 1 1
      src/Entity/Access/Preferences.php
  12. 4 2
      src/Entity/AccessWish/AccessFamilyWish.php
  13. 1 1
      src/Entity/AccessWish/AccessTmp.php
  14. 13 8
      src/Entity/AccessWish/AccessWish.php
  15. 5 3
      src/Entity/AccessWish/DocumentWish.php
  16. 8 8
      src/Entity/AccessWish/EducationStudentWish.php
  17. 2 0
      src/Entity/Billing/AbstractBillingIntangible.php
  18. 10 6
      src/Entity/Billing/AccessBilling.php
  19. 5 3
      src/Entity/Billing/AccessFictionalIntangible.php
  20. 4 1
      src/Entity/Billing/AccessIntangible.php
  21. 3 1
      src/Entity/Billing/BergerLevrault.php
  22. 3 3
      src/Entity/Billing/Bill.php
  23. 6 0
      src/Entity/Billing/BillAccessDetail.php
  24. 16 10
      src/Entity/Billing/BillAccounting.php
  25. 3 3
      src/Entity/Billing/BillLine.php
  26. 7 4
      src/Entity/Billing/BillPayment.php
  27. 1 1
      src/Entity/Billing/BillingExportSetting.php
  28. 5 5
      src/Entity/Billing/BillingIntangibleExcludeDate.php
  29. 4 2
      src/Entity/Billing/BillingSetting.php
  30. 2 1
      src/Entity/Billing/Ciril.php
  31. 4 2
      src/Entity/Billing/EducationalProjectIntangible.php
  32. 2 2
      src/Entity/Billing/EducationalProjectPayer.php
  33. 4 2
      src/Entity/Billing/FamilyQuotient.php
  34. 2 1
      src/Entity/Billing/Jvs.php
  35. 2 1
      src/Entity/Billing/Pes.php
  36. 4 2
      src/Entity/Billing/ResidenceArea.php
  37. 6 4
      src/Entity/Booking/Attendance.php
  38. 7 7
      src/Entity/Booking/AttendanceBooking.php
  39. 3 1
      src/Entity/Booking/AttendanceBookingReason.php
  40. 18 8
      src/Entity/Booking/Course.php
  41. 1 1
      src/Entity/Booking/CourseRecur.php
  42. 23 12
      src/Entity/Booking/EducationalProject.php
  43. 3 1
      src/Entity/Booking/EducationalProjectPublic.php
  44. 1 1
      src/Entity/Booking/EducationalProjectRecur.php
  45. 21 11
      src/Entity/Booking/Event.php
  46. 1 1
      src/Entity/Booking/EventRecur.php
  47. 4 2
      src/Entity/Booking/EventReport.php
  48. 2 2
      src/Entity/Booking/EventUser.php
  49. 16 9
      src/Entity/Booking/Examen.php
  50. 3 1
      src/Entity/Booking/ExamenConvocation.php
  51. 1 1
      src/Entity/Booking/ExamenRecur.php
  52. 3 1
      src/Entity/Booking/OrganizationHoliday.php
  53. 1 1
      src/Entity/Booking/OrganizationHolidayRecur.php
  54. 4 2
      src/Entity/Booking/PersonHoliday.php
  55. 1 1
      src/Entity/Booking/PersonHolidayRecur.php
  56. 6 3
      src/Entity/Booking/Work.php
  57. 2 2
      src/Entity/Booking/WorkByUser.php
  58. 1 1
      src/Entity/Core/AbstractControl.php
  59. 5 3
      src/Entity/Core/AbstractInformation.php
  60. 5 3
      src/Entity/Core/AddressPostal.php
  61. 4 1
      src/Entity/Core/BankAccount.php
  62. 4 0
      src/Entity/Core/ContactPoint.php
  63. 36 27
      src/Entity/Core/File.php
  64. 28 0
      src/Entity/Core/Tagg.php
  65. 1 1
      src/Entity/Donor/Donor.php
  66. 8 4
      src/Entity/Education/CriteriaNotation.php
  67. 1 1
      src/Entity/Education/CustomNotation.php
  68. 3 1
      src/Entity/Education/Cycle.php
  69. 2 2
      src/Entity/Education/CycleByEducation.php
  70. 13 6
      src/Entity/Education/Education.php
  71. 3 1
      src/Entity/Education/EducationCategory.php
  72. 6 3
      src/Entity/Education/EducationCurriculum.php
  73. 3 1
      src/Entity/Education/EducationNotation.php
  74. 7 3
      src/Entity/Education/EducationNotationConfig.php
  75. 4 2
      src/Entity/Education/EducationNotationCriteriaConfig.php
  76. 10 5
      src/Entity/Education/EducationStudent.php
  77. 4 3
      src/Entity/Education/EducationTeacher.php
  78. 3 1
      src/Entity/Education/EducationTiming.php
  79. 1 1
      src/Entity/Education/SeizurePeriodNotation.php
  80. 3 3
      src/Entity/Message/AbstractMessage.php
  81. 7 3
      src/Entity/Message/Email.php
  82. 4 1
      src/Entity/Message/Mail.php
  83. 1 1
      src/Entity/Message/ReportEmail.php
  84. 1 1
      src/Entity/Message/ReportSms.php
  85. 5 2
      src/Entity/Message/Sms.php
  86. 2 1
      src/Entity/Message/TemplateSystem.php
  87. 3 1
      src/Entity/Network/Network.php
  88. 2 2
      src/Entity/Network/NetworkOrganization.php
  89. 8 4
      src/Entity/Organization/Activity.php
  90. 5 1
      src/Entity/Organization/Jury.php
  91. 2 2
      src/Entity/Organization/OnlineRegistrationDocument.php
  92. 8 2
      src/Entity/Organization/OnlineRegistrationOpeningPeriod.php
  93. 21 6
      src/Entity/Organization/OnlineRegistrationSettings.php
  94. 67 30
      src/Entity/Organization/Organization.php
  95. 1 1
      src/Entity/Organization/OrganizationArticle.php
  96. 22 22
      src/Entity/Organization/OrganizationIdentification.php
  97. 6 1
      src/Entity/Organization/OrganizationLicence.php
  98. 8 6
      src/Entity/Organization/Parameters.php
  99. 1 1
      src/Entity/Organization/Settings.php
  100. 1 0
      src/Entity/Organization/Subdomain.php

+ 1 - 1
composer.json

@@ -11,7 +11,7 @@
     "php": ">=8.2",
     "ext-ctype": "*",
     "ext-iconv": "*",
-    "api-platform/core": "3.4.16",
+    "api-platform/core": "^4.0",
     "beberlei/doctrineextensions": "^1.3",
     "composer/package-versions-deprecated": "^1.11",
     "doctrine/dbal": "^3.9",

+ 4 - 4
src/ApiResources/Organization/OrganizationCreationRequest.php

@@ -371,24 +371,24 @@ class OrganizationCreationRequest
         return $this;
     }
 
-    public function getPresident(): ?OrganizationMemberCreationRequest
+    public function getPresident(): int|OrganizationMemberCreationRequest|null
     {
         return $this->president;
     }
 
-    public function setPresident(?OrganizationMemberCreationRequest $president): self
+    public function setPresident(int|OrganizationMemberCreationRequest|null $president): self
     {
         $this->president = $president;
 
         return $this;
     }
 
-    public function getDirector(): ?OrganizationMemberCreationRequest
+    public function getDirector(): int|OrganizationMemberCreationRequest|null
     {
         return $this->director;
     }
 
-    public function setDirector(?OrganizationMemberCreationRequest $director): self
+    public function setDirector(int|OrganizationMemberCreationRequest|null $director): self
     {
         $this->director = $director;
 

+ 2 - 2
src/ApiResources/Profile/AccessProfile.php

@@ -56,14 +56,14 @@ class AccessProfile implements ApiResourcesInterface
 
     /** @var list<string> $roles */
     #[Groups('access_profile_read')]
-    private ?array $roles = [];
+    private array $roles = [];
 
     #[Groups('access_profile_read')]
     private ?int $activityYear = null;
 
     /** @var bool[] $historical */
     #[Groups('access_profile_read')]
-    private ?array $historical = [];
+    private array $historical = [];
 
     #[Groups('access_profile_read')]
     private bool $isGuardian = false;

+ 2 - 2
src/ApiResources/Profile/OrganizationProfile.php

@@ -47,14 +47,14 @@ class OrganizationProfile implements ApiResourcesInterface
 
     /** @var list<string> $modules */
     #[Groups('access_profile_read')]
-    private ?array $modules = [];
+    private array $modules = [];
 
     #[Groups('access_profile_read')]
     private bool $hasChildren = false;
 
     /** @var list<OrganizationProfile> */
     #[Groups('access_profile_read')]
-    private ?array $parents = [];
+    private array $parents = [];
 
     #[Groups('access_profile_read')]
     private bool $showAdherentList = false;

+ 9 - 2
src/Doctrine/AbstractExtension.php

@@ -30,12 +30,19 @@ abstract class AbstractExtension implements QueryCollectionExtensionInterface, Q
     /**
      * Called by doctrine when getting an item.
      *
-     * @param list<int> $identifiers
+     * @param array<string, mixed> $identifiers
      * @param mixed[]   $context
      *
      * @throws \Exception
      */
-    public function applyToItem(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, array $identifiers, ?Operation $operation = null, array $context = []): void
+    public function applyToItem(
+        QueryBuilder $queryBuilder,
+        QueryNameGeneratorInterface $queryNameGenerator,
+        string $resourceClass,
+        array $identifiers,
+        ?Operation $operation = null,
+        array $context = []
+    ): void
     {
         $this->apply($queryBuilder, $resourceClass, $operation);
     }

+ 7 - 6
src/Doctrine/ORM/AST/SphericalDistance.php

@@ -9,6 +9,7 @@ use Doctrine\ORM\Query\Lexer;
 use Doctrine\ORM\Query\Parser;
 use Doctrine\ORM\Query\QueryException;
 use Doctrine\ORM\Query\SqlWalker;
+use Doctrine\ORM\Query\TokenType;
 
 /**
  * SphericalDistanceFunction ::= "SPHERICAL_DISTANCE" "(" ArithmeticPrimary "," ArithmeticPrimary "," ArithmeticPrimary "," ArithmeticPrimary ")".
@@ -40,16 +41,16 @@ class SphericalDistance extends FunctionNode
      */
     public function parse(Parser $parser): void
     {
-        $parser->match(Lexer::T_IDENTIFIER);
-        $parser->match(Lexer::T_OPEN_PARENTHESIS);
+        $parser->match(TokenType::T_IDENTIFIER);
+        $parser->match(TokenType::T_OPEN_PARENTHESIS);
         $this->latitude1 = $parser->ArithmeticPrimary();
-        $parser->match(Lexer::T_COMMA);
+        $parser->match(TokenType::T_COMMA);
         $this->longitude1 = $parser->ArithmeticPrimary();
-        $parser->match(Lexer::T_COMMA);
+        $parser->match(TokenType::T_COMMA);
         $this->latitude2 = $parser->ArithmeticPrimary();
-        $parser->match(Lexer::T_COMMA);
+        $parser->match(TokenType::T_COMMA);
         $this->longitude2 = $parser->ArithmeticPrimary();
-        $parser->match(Lexer::T_CLOSE_PARENTHESIS);
+        $parser->match(TokenType::T_CLOSE_PARENTHESIS);
     }
 
     /**

+ 100 - 52
src/Entity/Access/Access.php

@@ -121,79 +121,100 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     private ?array $setting = [];
 
     #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
-    private AccessBilling $accessBilling;
+    private ?AccessBilling $accessBilling;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonActivity::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, PersonActivity> */
+    #[ORM\OneToMany(targetEntity: PersonActivity::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $personActivity;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: OrganizationFunction::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, OrganizationFunction> */
+    #[ORM\OneToMany(targetEntity: OrganizationFunction::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $organizationFunction;
 
-    #[ORM\OneToMany(mappedBy: 'licensee', targetEntity: OrganizationLicence::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, OrganizationLicence> */
+    #[ORM\OneToMany(targetEntity: OrganizationLicence::class, mappedBy: 'licensee', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $organizationLicences;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonalizedList::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, PersonalizedList> */
+    #[ORM\OneToMany(targetEntity: PersonalizedList::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $personalizedLists;
 
-    #[ORM\OneToMany(mappedBy: 'recipientAccess', targetEntity: Notification::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Notification> */
+    #[ORM\OneToMany(targetEntity: Notification::class, mappedBy: 'recipientAccess', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $notifications;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: NotificationUser::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, NotificationUser> */
+    #[ORM\OneToMany(targetEntity: NotificationUser::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $notificationUsers;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, mappedBy: 'children', cascade: ['persist'])]
     private Collection $guardians;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'guardians', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'children_guardians')]
     #[ORM\JoinColumn(name: 'guardians_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'children_id', referencedColumnName: 'id')]
     private Collection $children;
 
-    #[ORM\OneToMany(mappedBy: 'accessPayer', targetEntity: AccessPayer::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, AccessPayer> */
+    #[ORM\OneToMany(targetEntity: AccessPayer::class, mappedBy: 'accessPayer', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $billingPayers;
 
-    #[ORM\OneToMany(mappedBy: 'accessReceiver', targetEntity: AccessPayer::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, AccessPayer> */
+    #[ORM\OneToMany(targetEntity: AccessPayer::class, mappedBy: 'accessReceiver', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $billingReceivers;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessIntangible::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, AccessIntangible> */
+    #[ORM\OneToMany(targetEntity: AccessIntangible::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $accessIntangibles;
 
     #[ORM\ManyToOne(inversedBy: 'publicationDirectors')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false)]
-    private ?Parameters $publicationDirector;
+    private Parameters $publicationDirector;
 
     #[ORM\ManyToOne(inversedBy: 'teachers')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     private ?EducationNotationConfig $educationNotationConfig;
 
-    #[ORM\OneToMany(mappedBy: 'company', targetEntity: CompanyPerson::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, CompanyPerson> */
+    #[ORM\OneToMany(targetEntity: CompanyPerson::class, mappedBy: 'company', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $companyPersonAccesses;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: CompanyPerson::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, CompanyPerson> */
+    #[ORM\OneToMany(targetEntity: CompanyPerson::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $companyPersonCompany;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: EducationStudent::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EducationStudent> */
+    #[ORM\OneToMany(targetEntity: EducationStudent::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $educationStudent;
 
+    /** @var Collection<int, EducationStudent> */
     #[ORM\ManyToMany(targetEntity: EducationStudent::class, mappedBy: 'teachers', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $educationStudentByTeacher;
 
-    #[ORM\OneToMany(mappedBy: 'teacher', targetEntity: EducationTeacher::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EducationTeacher> */
+    #[ORM\OneToMany(targetEntity: EducationTeacher::class, mappedBy: 'teacher', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $educationTeachers;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: PersonHoliday::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, PersonHoliday> */
+    #[ORM\OneToMany(targetEntity: PersonHoliday::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $holidays;
 
+    /** @var Collection<int, Course> */
     #[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'students', cascade: ['persist'])]
     private Collection $courses;
 
+    /** @var Collection<int, Course> */
     #[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'organizer', cascade: ['persist'])]
     private Collection $practicalCourses;
 
+    /** @var Collection<int, Event> */
     #[ORM\ManyToMany(targetEntity: Event::class, mappedBy: 'organizer', cascade: ['persist'])]
     private Collection $eventOrganizers;
 
+    /** @var Collection<int, EducationalProject> */
     #[ORM\ManyToMany(targetEntity: EducationalProject::class, mappedBy: 'organizer', cascade: ['persist'])]
     private Collection $educationalProjectOrganizers;
 
@@ -207,99 +228,131 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     #[ORM\Column]
     private bool $ielEnabled = false;
 
-    #[ORM\OneToMany(mappedBy: 'educationalProjectPayer', targetEntity: EducationalProjectPayer::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EducationalProjectPayer> */
+    #[ORM\OneToMany(targetEntity: EducationalProjectPayer::class, mappedBy: 'educationalProjectPayer', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $billingEducationalProjectPayers;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: Bill::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Bill> */
+    #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $bills;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: BillLine::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, BillLine> */
+    #[ORM\OneToMany(targetEntity: BillLine::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $billLines;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: BillCredit::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, BillCredit> */
+    #[ORM\OneToMany(targetEntity: BillCredit::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $billCredits;
 
-    #[ORM\OneToMany(mappedBy: 'silentPartner', targetEntity: EducationalProject::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EducationalProject> */
+    #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'silentPartner', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $silentPartners;
 
-    #[ORM\OneToMany(mappedBy: 'operationalPartner', targetEntity: EducationalProject::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EducationalProject> */
+    #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'operationalPartner', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $operationalPartners;
 
-    #[ORM\OneToMany(mappedBy: 'guest', targetEntity: EventUser::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EventUser> */
+    #[ORM\OneToMany(targetEntity: EventUser::class, mappedBy: 'guest', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $eventUsers;
 
-    #[ORM\OneToMany(mappedBy: 'student', targetEntity: ExamenConvocation::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, ExamenConvocation> */
+    #[ORM\OneToMany(targetEntity: ExamenConvocation::class, mappedBy: 'student', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $examenConvocations;
 
-    #[ORM\OneToMany(mappedBy: 'provider', targetEntity: EquipmentRepair::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EquipmentRepair> */
+    #[ORM\OneToMany(targetEntity: EquipmentRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $equipmentRepairProviders;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: Attendance::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Attendance> */
+    #[ORM\OneToMany(targetEntity: Attendance::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $attendances;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: AttendanceBooking::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, AttendanceBooking> */
+    #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $attendanceBookings;
 
-    #[ORM\OneToMany(mappedBy: 'replacement', targetEntity: Attendance::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Attendance> */
+    #[ORM\OneToMany(targetEntity: Attendance::class, mappedBy: 'replacement', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $attendanceReplacements;
 
-    #[ORM\OneToMany(mappedBy: 'provider', targetEntity: RoomRepair::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, RoomRepair> */
+    #[ORM\OneToMany(targetEntity: RoomRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $roomRepairProviders;
 
-    #[ORM\OneToMany(mappedBy: 'provider', targetEntity: PlaceRepair::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, PlaceRepair> */
+    #[ORM\OneToMany(targetEntity: PlaceRepair::class, mappedBy: 'provider', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $placeRepairProviders;
 
-    #[ORM\OneToMany(mappedBy: 'author', targetEntity: Email::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Email> */
+    #[ORM\OneToMany(targetEntity: Email::class, mappedBy: 'author', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $emails;
 
-    #[ORM\OneToMany(mappedBy: 'author', targetEntity: Mail::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Mail> */
+    #[ORM\OneToMany(targetEntity: Mail::class, mappedBy: 'author', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $mails;
 
-    #[ORM\OneToMany(mappedBy: 'author', targetEntity: Sms::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Sms> */
+    #[ORM\OneToMany(targetEntity: Sms::class, mappedBy: 'author', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $sms;
 
+    /** @var Collection<int, Jury> */
     #[ORM\ManyToMany(targetEntity: Jury::class, mappedBy: 'members', orphanRemoval: true)]
     private Collection $juryMembers;
 
-    #[ORM\OneToMany(mappedBy: 'contactPerson', targetEntity: Organization::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Organization> */
+    #[ORM\OneToMany(targetEntity: Organization::class, mappedBy: 'contactPerson', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $organizationContacts;
 
-    #[ORM\OneToMany(mappedBy: 'member', targetEntity: CommissionMember::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, CommissionMember> */
+    #[ORM\OneToMany(targetEntity: CommissionMember::class, mappedBy: 'member', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $commissionMembers;
 
-    #[ORM\OneToMany(mappedBy: 'supplier', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Equipment> */
+    #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'supplier', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $equipmentSuppliers;
 
-    #[ORM\OneToMany(mappedBy: 'controlManager', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Equipment> */
+    #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'controlManager', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $equipmentControlManagers;
 
-    #[ORM\OneToMany(mappedBy: 'editor', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Equipment> */
+    #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'editor', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $equipmentEditors;
 
-    #[ORM\OneToMany(mappedBy: 'borrower', targetEntity: EquipmentLoan::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EquipmentLoan> */
+    #[ORM\OneToMany(targetEntity: EquipmentLoan::class, mappedBy: 'borrower', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $equipmentLoans;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Equipment> */
+    #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $equipments;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessFictionalIntangible::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, AccessFictionalIntangible> */
+    #[ORM\OneToMany(targetEntity: AccessFictionalIntangible::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $accessFictionalIntangibles;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: Donor::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Donor> */
+    #[ORM\OneToMany(targetEntity: Donor::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $donors;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: AccessReward::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, AccessReward> */
+    #[ORM\OneToMany(targetEntity: AccessReward::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $accessRewards;
 
-    #[ORM\OneToMany(mappedBy: 'access', targetEntity: OrganizationResponsability::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, OrganizationResponsability> */
+    #[ORM\OneToMany(targetEntity: OrganizationResponsability::class, mappedBy: 'access', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $organizationResponsabilities;
 
-    #[ORM\OneToMany(mappedBy: 'accessOriginal', targetEntity: AccessWish::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, AccessWish> */
+    #[ORM\OneToMany(targetEntity: AccessWish::class, mappedBy: 'accessOriginal', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $accessWishes;
 
-    #[ORM\OneToMany(mappedBy: 'student', targetEntity: WorkByUser::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, WorkByUser> */
+    #[ORM\OneToMany(targetEntity: WorkByUser::class, mappedBy: 'student', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $workByUsers;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'accesses', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_access')]
     #[ORM\JoinColumn(name: 'access_id', referencedColumnName: 'id')]
@@ -1185,12 +1238,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
 
     public function removeBill(Bill $bill): self
     {
-        if ($this->bills->removeElement($bill)) {
-            // set the owning side to null (unless already changed)
-            if ($bill->getAccess() === $this) {
-                $bill->setAccess(null);
-            }
-        }
+        $this->bills->removeElement($bill);
 
         return $this;
     }

+ 5 - 2
src/Entity/Access/AccessFamily.php

@@ -7,6 +7,7 @@ namespace App\Entity\Access;
 use ApiPlatform\Metadata\ApiResource;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use App\Entity\Billing\AccessFictionalIntangible;
+use App\Entity\Person\PersonActivity;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -24,10 +25,12 @@ class AccessFamily
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToMany(mappedBy: 'accessFamily', targetEntity: Access::class)]
+    /** @var Collection<int, Access> */
+    #[ORM\OneToMany(targetEntity: Access::class, mappedBy: 'accessFamily')]
     private Collection $accesses;
 
-    #[ORM\OneToMany(mappedBy: 'accessFamily', targetEntity: AccessFictionalIntangible::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, AccessFictionalIntangible> */
+    #[ORM\OneToMany(targetEntity: AccessFictionalIntangible::class, mappedBy: 'accessFamily', cascade: ['persist'], orphanRemoval: true)]
     private Collection $accessFictionalIntangibles;
 
     public function __construct()

+ 2 - 2
src/Entity/Access/OrganizationFunction.php

@@ -33,7 +33,7 @@ class OrganizationFunction
 
     #[ORM\ManyToOne(inversedBy: 'organizationFunction')]
     #[ORM\JoinColumn(nullable: false)]
-    private ?Access $access = null;
+    private Access $access;
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(nullable: false)]
@@ -44,7 +44,7 @@ class OrganizationFunction
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private Activity $activity;
+    private ?Activity $activity = null;
 
     #[ORM\Column(length: 255, nullable: true, enumType: DeparturesCauseEnum::class)]
     private ?DeparturesCauseEnum $departureCause = null;

+ 3 - 3
src/Entity/Access/PersonalizedList.php

@@ -41,7 +41,7 @@ class PersonalizedList
 
     #[ORM\ManyToOne(inversedBy: 'personalizedLists')]
     #[ORM\JoinColumn(nullable: false)]
-    private ?Access $access = null;
+    private Access $access;
 
     #[ORM\Column(length: 200, nullable: true)]
     #[Groups(['lists:output'])]
@@ -61,7 +61,7 @@ class PersonalizedList
 
     #[ORM\Column(length: 150, nullable: true)]
     #[Groups(['lists:output'])]
-    private string $menuKey;
+    private ?string $menuKey = null;
 
     #[Pure]
     public function __construct()
@@ -125,7 +125,7 @@ class PersonalizedList
         return $this->access;
     }
 
-    public function setMenuKey(string $menuKey): self
+    public function setMenuKey(?string $menuKey): self
     {
         $this->menuKey = $menuKey;
 

+ 1 - 1
src/Entity/Access/Preferences.php

@@ -34,7 +34,7 @@ class Preferences
 
     #[ORM\OneToOne(inversedBy: 'preferences', fetch: 'EAGER')]
     #[ORM\JoinColumn(nullable: true)]
-    private Access $access;
+    private ?Access $access = null;
 
     #[ORM\Column(options: ['default' => true])]
     private bool $messageReport = true;

+ 4 - 2
src/Entity/AccessWish/AccessFamilyWish.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\AccessWish;
 
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Person\PersonActivity;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -21,14 +22,15 @@ class AccessFamilyWish
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToMany(mappedBy: 'accessFamilyWish', targetEntity: AccessWish::class, cascade: ['remove'])]
+    /** @var Collection<int, AccessWish> */
+    #[ORM\OneToMany(targetEntity: AccessWish::class, mappedBy: 'accessFamilyWish', cascade: ['remove'])]
     private Collection $accessWishes;
 
     /**
      * Date de dernière mise à jour de l'entité.
      */
     #[ORM\Column(type: 'datetime', nullable: true)]
-    private \DateTimeInterface $updateDate;
+    private ?\DateTimeInterface $updateDate;
 
     #[ORM\Column]
     private bool $registrationCompleted = false;

+ 1 - 1
src/Entity/AccessWish/AccessTmp.php

@@ -21,7 +21,7 @@ class AccessTmp
     private ?int $id = null;
 
     #[ORM\ManyToOne]
-    private Organization $organization;
+    private ?Organization $organization = null;
 
     public function getId(): ?int
     {

+ 13 - 8
src/Entity/AccessWish/AccessWish.php

@@ -11,6 +11,7 @@ use App\Entity\Core\File;
 use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Person\PersonActivity;
 use App\Enum\OnlineRegistration\ValidationStateEnum;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
@@ -35,27 +36,31 @@ class AccessWish
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'accessWishes')]
     #[ORM\JoinColumn(onDelete: 'CASCADE')]
-    private Access $accessOriginal;
+    private ?Access $accessOriginal = null;
 
     #[ORM\ManyToOne(inversedBy: 'accessWishes')]
-    private AccessFamilyWish $accessFamilyWish;
+    private ?AccessFamilyWish $accessFamilyWish = null;
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
     private File $image;
 
     #[ORM\ManyToOne]
-    private Country $addressCountry;
+    private ?Country $addressCountry = null;
 
-    #[ORM\OneToMany(mappedBy: 'accessWish', targetEntity: EducationStudentWish::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, EducationStudentWish> */
+    #[ORM\OneToMany(targetEntity: EducationStudentWish::class, mappedBy: 'accessWish', cascade: ['persist'], orphanRemoval: true)]
     private Collection $educationStudentWishes;
 
-    #[ORM\OneToMany(mappedBy: 'accessWishReregistrations', targetEntity: EducationStudentWish::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, EducationStudentWish> */
+    #[ORM\OneToMany(targetEntity: EducationStudentWish::class, mappedBy: 'accessWishReregistrations', cascade: ['persist'], orphanRemoval: true)]
     private Collection $educationStudentReregistrationsWishes;
 
-    #[ORM\OneToMany(mappedBy: 'accessWish', targetEntity: DocumentWish::class, cascade: ['persist'])]
+    /** @var Collection<int, DocumentWish> */
+    #[ORM\OneToMany(targetEntity: DocumentWish::class, mappedBy: 'accessWish', cascade: ['persist'])]
     private Collection $documentWishes;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'accessWishes', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_accessWish')]
     #[ORM\JoinColumn(name: 'accessWish_id', referencedColumnName: 'id')]
@@ -71,7 +76,7 @@ class AccessWish
      * @var \DateTime
      */
     #[ORM\Column(type: 'datetime', nullable: true)]
-    private \DateTimeInterface $createDate;
+    private ?\DateTimeInterface $createDate = null;
 
     /**
      * Date de dernière mise à jour de l'entité.
@@ -79,7 +84,7 @@ class AccessWish
      * @var \DateTime
      */
     #[ORM\Column(type: 'datetime', nullable: true)]
-    private \DateTimeInterface $updateDate;
+    private ?\DateTimeInterface $updateDate = null;
 
     public function __construct()
     {

+ 5 - 3
src/Entity/AccessWish/DocumentWish.php

@@ -7,6 +7,7 @@ namespace App\Entity\AccessWish;
 use App\Entity\Core\File;
 use App\Entity\Person\Person;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Person\PersonActivity;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -25,13 +26,14 @@ class DocumentWish
 
     #[ORM\ManyToOne(inversedBy: 'documentWishes')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private AccessWish $accessWish;
+    private ?AccessWish $accessWish = null;
 
     #[ORM\ManyToOne(inversedBy: 'documentWishes')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private Person $personOwner;
+    private ?Person $personOwner = null;
 
-    #[ORM\OneToMany(mappedBy: 'documentWish', targetEntity: File::class, orphanRemoval: true)]
+    /** @var Collection<int, File> */
+    #[ORM\OneToMany(targetEntity: File::class, mappedBy: 'documentWish', orphanRemoval: true)]
     private Collection $files;
 
     public function __construct()

+ 8 - 8
src/Entity/AccessWish/EducationStudentWish.php

@@ -26,32 +26,32 @@ class EducationStudentWish
     private ?int $id = null;
 
     #[ORM\Column(length: 50, enumType: WishRegistrationEnum::class)]
-    private ?WishRegistrationEnum $wishRegistration = null;
+    private WishRegistrationEnum $wishRegistration;
 
     #[ORM\Column(length: 50, enumType: RegistrationStatusEnum::class)]
-    private ?RegistrationStatusEnum $registrationStatus = null;
+    private RegistrationStatusEnum $registrationStatus;
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private Education $educationWish;
+    private ?Education $educationWish = null;
 
     #[ORM\ManyToOne(inversedBy: 'educationStudentWishes')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private AccessWish $accessWish;
+    private ?AccessWish $accessWish = null;
 
     #[ORM\ManyToOne(inversedBy: 'educationStudentReregistrationsWishes')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private AccessWish $accessWishReregistrations;
+    private ?AccessWish $accessWishReregistrations = null;
 
     #[ORM\ManyToOne]
-    private EducationCurriculum $educationCurriculum;
+    private ?EducationCurriculum $educationCurriculum = null;
 
     #[ORM\ManyToOne]
-    private EducationStudent $educationStudent;
+    private ?EducationStudent $educationStudent = null;
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private EducationTiming $educationTiming;
+    private ?EducationTiming $educationTiming = null;
 
     public function getId(): ?int
     {

+ 2 - 0
src/Entity/Billing/AbstractBillingIntangible.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Billing;
 
 use App\Entity\Core\Tagg;
+use App\Entity\Person\PersonActivity;
 use App\Entity\Product\Intangible;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
@@ -33,6 +34,7 @@ abstract class AbstractBillingIntangible
     #[ORM\JoinColumn(nullable: false)]
     protected Intangible $intangible;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'billingIntangibles', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_billingIntangible')]
     #[ORM\JoinColumn(name: 'billingIntangible_id', referencedColumnName: 'id')]

+ 10 - 6
src/Entity/Billing/AccessBilling.php

@@ -7,6 +7,7 @@ namespace App\Entity\Billing;
 use ApiPlatform\Metadata\ApiResource;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use App\Entity\Access\Access;
+use App\Entity\Person\PersonActivity;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -26,23 +27,26 @@ class AccessBilling
 
     #[ORM\OneToOne(inversedBy: 'accessBilling', cascade: ['persist'], fetch: 'EAGER')]
     #[ORM\JoinColumn(nullable: true, onDelete: 'CASCADE')]
-    private Access $access;
+    private ?Access $access = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'accessBilling')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private FamilyQuotient $familyQuotient;
+    private ?FamilyQuotient $familyQuotient = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'accessBilling')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private ResidenceArea $residenceArea;
+    private ?ResidenceArea $residenceArea = null;
 
-    #[ORM\OneToMany(mappedBy: 'accessBilling', targetEntity: BillPayment::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillPayment> */
+    #[ORM\OneToMany(targetEntity: BillPayment::class, mappedBy: 'accessBilling', cascade: ['persist'], orphanRemoval: true)]
     private Collection $billDetachedPayments;
 
-    #[ORM\OneToMany(mappedBy: 'accessBilling', targetEntity: BillDebitBalance::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillDebitBalance> */
+    #[ORM\OneToMany(targetEntity: BillDebitBalance::class, mappedBy: 'accessBilling', cascade: ['persist'], orphanRemoval: true)]
     private Collection $billDebitBalances;
 
-    #[ORM\OneToMany(mappedBy: 'accessBillingAccountBalanceReimbursement', targetEntity: BillPayment::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillPayment> */
+    #[ORM\OneToMany(targetEntity: BillPayment::class, mappedBy: 'accessBillingAccountBalanceReimbursement', cascade: ['persist'], orphanRemoval: true)]
     private Collection $accountBalanceReimbursements;
 
     public function __construct()

+ 5 - 3
src/Entity/Billing/AccessFictionalIntangible.php

@@ -7,6 +7,7 @@ namespace App\Entity\Billing;
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 use App\Entity\Access\AccessFamily;
+use App\Entity\Person\PersonActivity;
 use App\Entity\Product\FictionalIntangible;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -27,16 +28,17 @@ class AccessFictionalIntangible
     private ?int $id = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'accessFictionalIntangibles')]
-    private Access $access;
+    private ?Access $access = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'accessFictionalIntangibles')]
-    private AccessFamily $accessFamily;
+    private ?AccessFamily $accessFamily = null;
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(nullable: false)]
     private FictionalIntangible $fictionalIntangible;
 
-    #[ORM\OneToMany(mappedBy: 'accessFictionalIntangible', targetEntity: BillingIntangibleExcludeDate::class, cascade: ['persist'], orphanRemoval: true, )]
+    /** @var Collection<int, BillingIntangibleExcludeDate> */
+    #[ORM\OneToMany(targetEntity: BillingIntangibleExcludeDate::class, mappedBy: 'accessFictionalIntangible', cascade: ['persist'], orphanRemoval: true, )]
     private Collection $billingIntangibleExcludeDates;
 
     public function __construct()

+ 4 - 1
src/Entity/Billing/AccessIntangible.php

@@ -7,6 +7,7 @@ namespace App\Entity\Billing;
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Person\PersonActivity;
 use App\Repository\Billing\AccessIntangibleRepository;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
@@ -23,12 +24,14 @@ class AccessIntangible extends AbstractBillingIntangible
     #[ORM\ManyToOne(inversedBy: 'accessIntangibles')]
     private ?Access $access = null;
 
-    #[ORM\OneToMany(mappedBy: 'accessIntangible', targetEntity: BillingIntangibleExcludeDate::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillingIntangibleExcludeDate> */
+    #[ORM\OneToMany(targetEntity: BillingIntangibleExcludeDate::class, mappedBy: 'accessIntangible', cascade: ['persist'], orphanRemoval: true)]
     private Collection $billingIntangibleExcludeDates;
 
     public function __construct()
     {
         $this->billingIntangibleExcludeDates = new ArrayCollection();
+        parent::__construct();
     }
 
     public function setAccess(?Access $access): self

+ 3 - 1
src/Entity/Billing/BergerLevrault.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Billing;
 
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Person\PersonActivity;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -21,7 +22,8 @@ class BergerLevrault
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToMany(mappedBy: 'bergerLevrault', targetEntity: Bill::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, Bill> */
+    #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'bergerLevrault', cascade: ['persist'], orphanRemoval: true)]
     private Collection $bills;
 
     public function __construct()

+ 3 - 3
src/Entity/Billing/Bill.php

@@ -21,14 +21,14 @@ class Bill extends BillAccounting implements BillAccountingInterface
 {
     #[ORM\ManyToOne(inversedBy: 'bills')]
     #[ORM\JoinColumn(nullable: false)]
-    public ?Access $access;
+    public Access $access;
 
-    public function getAccess(): ?Access
+    public function getAccess(): Access
     {
         return $this->access;
     }
 
-    public function setAccess(?Access $access): self
+    public function setAccess(Access $access): self
     {
         $this->access = $access;
 

+ 6 - 0
src/Entity/Billing/BillAccessDetail.php

@@ -22,4 +22,10 @@ class BillAccessDetail
     {
         return $this->id;
     }
+
+    public function setId(?int $id): self
+    {
+        $this->id = $id;
+        return $this;
+    }
 }

+ 16 - 10
src/Entity/Billing/BillAccounting.php

@@ -8,6 +8,7 @@ use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Person\PersonActivity;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -37,40 +38,45 @@ class BillAccounting
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(nullable: true)]
-    protected Organization $organization;
+    protected ?Organization $organization = null;
 
-    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillLine::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillLine> */
+    #[ORM\OneToMany(targetEntity: BillLine::class, mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billLines;
 
-    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillCredit::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillCredit> */
+    #[ORM\OneToMany(targetEntity: BillCredit::class, mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billCredits;
 
-    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillPayment::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillPayment> */
+    #[ORM\OneToMany(targetEntity: BillPayment::class, mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billPayments;
 
     #[ORM\ManyToOne(inversedBy: 'billCredits')]
     #[ORM\JoinColumn(nullable: true)]
-    protected BillAccounting $bill;
+    protected ?BillAccounting $bill = null;
 
-    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillingIntangibleExcludeDate::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillingIntangibleExcludeDate> */
+    #[ORM\OneToMany(targetEntity: BillingIntangibleExcludeDate::class, mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billingIntangibleExcludeDates;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'bills')]
     #[ORM\JoinColumn(nullable: true)]
-    protected Pes $pes;
+    protected ?Pes $pes = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'bills')]
     #[ORM\JoinColumn(nullable: true)]
-    protected BergerLevrault $bergerLevrault;
+    protected ?BergerLevrault $bergerLevrault = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'bills')]
     #[ORM\JoinColumn(nullable: true)]
-    protected Ciril $ciril;
+    protected ?Ciril $ciril = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'bills')]
     #[ORM\JoinColumn(nullable: true)]
-    protected Jvs $jvs;
+    protected ?Jvs $jvs = null;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'billAccountings', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_billAccounting')]
     #[ORM\JoinColumn(name: 'billAccounting_id', referencedColumnName: 'id')]

+ 3 - 3
src/Entity/Billing/BillLine.php

@@ -29,13 +29,13 @@ class BillLine
     private BillAccounting $bill;
 
     #[ORM\ManyToOne(inversedBy: 'billLines')]
-    private Access $access;
+    private ?Access $access = null;
 
     #[ORM\ManyToOne(inversedBy: 'billLines')]
-    private EducationalProject $educationalProject;
+    private ?EducationalProject $educationalProject = null;
 
     #[ORM\ManyToOne(inversedBy: 'billLines')]
-    private EquipmentLoan $equipmentLoan;
+    private ?EquipmentLoan $equipmentLoan = null;
 
     public function getId(): ?int
     {

+ 7 - 4
src/Entity/Billing/BillPayment.php

@@ -6,6 +6,7 @@ namespace App\Entity\Billing;
 
 use App\Entity\Core\Tagg;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Person\PersonActivity;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -24,20 +25,22 @@ class BillPayment
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billPayments')]
     #[ORM\JoinColumn(nullable: true)]
-    private BillAccounting $bill;
+    private ?BillAccounting $bill = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billDetachedPayments')]
     #[ORM\JoinColumn(nullable: true)]
-    private AccessBilling $accessBilling;
+    private ?AccessBilling $accessBilling = null;
 
-    #[ORM\OneToMany(mappedBy: 'billPayment', targetEntity: BillDebitBalance::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillDebitBalance> */
+    #[ORM\OneToMany(targetEntity: BillDebitBalance::class, mappedBy: 'billPayment', cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: true)]
     private Collection $billDebitBalances;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'accountBalanceReimbursements')]
     #[ORM\JoinColumn(nullable: true)]
-    private AccessBilling $accessBillingAccountBalanceReimbursement;
+    private ?AccessBilling $accessBillingAccountBalanceReimbursement = null;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'payments', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_billPayment')]
     #[ORM\JoinColumn(name: 'billPayment_id', referencedColumnName: 'id')]

+ 1 - 1
src/Entity/Billing/BillingExportSetting.php

@@ -21,7 +21,7 @@ class BillingExportSetting
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(nullable: true)]
-    private SddTeneur $teneur;
+    private ?SddTeneur $teneur = null;
 
     public function getId(): ?int
     {

+ 5 - 5
src/Entity/Billing/BillingIntangibleExcludeDate.php

@@ -23,19 +23,19 @@ class BillingIntangibleExcludeDate
     private ?int $id = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billingIntangibleExcludeDates')]
-    private AccessIntangible $accessIntangible;
+    private ?AccessIntangible $accessIntangible = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billingIntangibleExcludeDates')]
-    private AccessFictionalIntangible $accessFictionalIntangible;
+    private ?AccessFictionalIntangible $accessFictionalIntangible = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billingIntangibleExcludeDates')]
-    private EducationalProjectIntangible $educationalProjectIntangible;
+    private ?EducationalProjectIntangible $educationalProjectIntangible = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billingIntangibleExcludeDates')]
-    private EquipmentLoan $equipmentLoan;
+    private ?EquipmentLoan $equipmentLoan = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billingIntangibleExcludeDates')]
-    private Bill $bill;
+    private ?Bill $bill = null;
 
     public function getId(): ?int
     {

+ 4 - 2
src/Entity/Billing/BillingSetting.php

@@ -27,13 +27,15 @@ class BillingSetting
     #[ORM\JoinColumn(nullable: false)]
     private Organization $organization;
 
-    #[ORM\OneToMany(mappedBy: 'billingSetting', targetEntity: ResidenceArea::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, ResidenceArea> */
+    #[ORM\OneToMany(targetEntity: ResidenceArea::class, mappedBy: 'billingSetting', cascade: ['persist'], orphanRemoval: true)]
     private Collection $residenceAreas;
 
     #[ORM\Column(options: ['default' => false])]
     private bool $applyVat = false;
 
-    #[ORM\OneToMany(mappedBy: 'billingSetting', targetEntity: FamilyQuotient::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, FamilyQuotient> */
+    #[ORM\OneToMany(targetEntity: FamilyQuotient::class, mappedBy: 'billingSetting', cascade: ['persist'], orphanRemoval: true)]
     private Collection $familyQuotients;
 
     #[Pure]

+ 2 - 1
src/Entity/Billing/Ciril.php

@@ -21,7 +21,8 @@ class Ciril
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToMany(mappedBy: 'ciril', targetEntity: Bill::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, Bill> */
+    #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'ciril', cascade: ['persist'], orphanRemoval: true)]
     private Collection $bills;
 
     public function __construct()

+ 4 - 2
src/Entity/Billing/EducationalProjectIntangible.php

@@ -18,14 +18,16 @@ use Doctrine\ORM\Mapping as ORM;
 class EducationalProjectIntangible extends AbstractBillingIntangible
 {
     #[ORM\ManyToOne(inversedBy: 'educationalProjectIntangibles')]
-    private EducationalProject $educationalProject;
+    private ?EducationalProject $educationalProject = null;
 
-    #[ORM\OneToMany(mappedBy: 'educationalProjectIntangible', targetEntity: BillingIntangibleExcludeDate::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, BillingIntangibleExcludeDate> */
+    #[ORM\OneToMany(targetEntity: BillingIntangibleExcludeDate::class, mappedBy: 'educationalProjectIntangible', cascade: ['persist'], orphanRemoval: true)]
     private Collection $billingIntangibleExcludeDates;
 
     public function __construct()
     {
         $this->billingIntangibleExcludeDates = new ArrayCollection();
+        parent::__construct();
     }
 
     public function getId(): ?int

+ 2 - 2
src/Entity/Billing/EducationalProjectPayer.php

@@ -30,10 +30,10 @@ class EducationalProjectPayer
     private ?int $id = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billingEducationalProjectPayers')]
-    private Access $educationalProjectPayer;
+    private ?Access $educationalProjectPayer = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'billingReceivers')]
-    private EducationalProject $educationalProjectReceiver;
+    private ?EducationalProject $educationalProjectReceiver = null;
 
     public function getId(): ?int
     {

+ 4 - 2
src/Entity/Billing/FamilyQuotient.php

@@ -28,10 +28,12 @@ class FamilyQuotient
     #[ORM\JoinColumn(nullable: false)]
     private BillingSetting $billingSetting;
 
-    #[ORM\OneToMany(mappedBy: 'familyQuotient', targetEntity: AccessBilling::class)]
+    /** @var Collection<int, AccessBilling> */
+    #[ORM\OneToMany(targetEntity: AccessBilling::class, mappedBy: 'familyQuotient')]
     private Collection $accessBilling;
 
-    #[ORM\OneToMany(mappedBy: 'familyQuotient', targetEntity: IntangibleDiscountDetail::class)]
+    /** @var Collection<int, IntangibleDiscountDetail> */
+    #[ORM\OneToMany(targetEntity: IntangibleDiscountDetail::class, mappedBy: 'familyQuotient')]
     private Collection $intangibleDiscountDetails;
 
     public function __construct()

+ 2 - 1
src/Entity/Billing/Jvs.php

@@ -21,7 +21,8 @@ class Jvs
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToMany(mappedBy: 'jvs', targetEntity: Bill::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, Bill> */
+    #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'jvs', cascade: ['persist'], orphanRemoval: true)]
     private Collection $bills;
 
     public function __construct()

+ 2 - 1
src/Entity/Billing/Pes.php

@@ -21,7 +21,8 @@ class Pes
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToMany(mappedBy: 'pes', targetEntity: Bill::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, Bill> */
+    #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'pes', cascade: ['persist'], orphanRemoval: true)]
     private Collection $bills;
 
     public function __construct()

+ 4 - 2
src/Entity/Billing/ResidenceArea.php

@@ -58,10 +58,12 @@ class ResidenceArea
     #[ORM\JoinColumn(nullable: false)]
     private BillingSetting $billingSetting;
 
-    #[ORM\OneToMany(mappedBy: 'residenceArea', targetEntity: AccessBilling::class)]
+    /** @var Collection<int, AccessBilling> */
+    #[ORM\OneToMany(targetEntity: AccessBilling::class, mappedBy: 'residenceArea')]
     private Collection $accessBilling;
 
-    #[ORM\OneToMany(mappedBy: 'residenceArea', targetEntity: IntangibleDiscountDetail::class)]
+    /** @var Collection<int, IntangibleDiscountDetail> */
+    #[ORM\OneToMany(targetEntity: IntangibleDiscountDetail::class, mappedBy: 'residenceArea')]
     private Collection $intangibleDiscountDetails;
 
     #[ORM\Column(length: 255)]

+ 6 - 4
src/Entity/Booking/Attendance.php

@@ -6,6 +6,7 @@ namespace App\Entity\Booking;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\Organization;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -26,15 +27,16 @@ class Attendance
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'attendances')]
-    private Organization $organization;
+    private ?Organization $organization = null;
 
     #[ORM\ManyToOne(inversedBy: 'attendances')]
-    private Access $access;
+    private ?Access $access = null;
 
     #[ORM\ManyToOne(inversedBy: 'attendanceReplacements')]
-    private Access $replacement;
+    private ?Access $replacement = null;
 
-    #[ORM\OneToMany(mappedBy: 'attendance', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, AttendanceBooking> */
+    #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'attendance', cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $attendanceBooking;
 

+ 7 - 7
src/Entity/Booking/AttendanceBooking.php

@@ -23,26 +23,26 @@ class AttendanceBooking
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'attendanceBookings')]
-    private Access $access;
+    private ?Access $access = null;
 
     #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
-    private Attendance $attendance;
+    private ?Attendance $attendance = null;
 
     #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
-    private Course $course;
+    private ?Course $course = null;
 
     #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
-    private EducationalProject $educationalProject;
+    private ?EducationalProject $educationalProject = null;
 
     #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
-    private Event $event;
+    private ?Event $event = null;
 
     #[ORM\ManyToOne(inversedBy: 'attendanceBooking')]
-    private Examen $examen;
+    private ?Examen $examen = null;
 
     #[ORM\ManyToOne(inversedBy: 'attendanceBookings')]
     #[ORM\JoinColumn(nullable: true)]
-    private ?AttendanceBookingReason $reason;
+    private ?AttendanceBookingReason $reason = null;
 
     public function getId(): ?int
     {

+ 3 - 1
src/Entity/Booking/AttendanceBookingReason.php

@@ -9,6 +9,7 @@ use ApiPlatform\Metadata\GetCollection;
 use ApiPlatform\Metadata\Post;
 use ApiPlatform\Metadata\Put;
 use App\Attribute\OrganizationDefaultValue;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\Organization;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
@@ -57,7 +58,8 @@ class AttendanceBookingReason
     #[ORM\Column(length: 255, nullable: false)]
     private string $reason;
 
-    #[ORM\OneToMany(mappedBy: 'reason', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, AttendanceBooking> */
+    #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'reason', cascade: ['persist'], orphanRemoval: true)]
     private Collection $attendanceBookings;
 
     public function __construct()

+ 18 - 8
src/Entity/Booking/Course.php

@@ -6,6 +6,7 @@ namespace App\Entity\Booking;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\Tagg;
 use App\Entity\Education\Education;
 use App\Entity\Education\EducationCurriculum;
@@ -38,23 +39,26 @@ class Course extends AbstractBooking
     #[ORM\Column(length: 255, nullable: false)]
     private string $discr = 'course';
 
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: CourseRecur::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, CourseRecur> */
+    #[ORM\OneToMany(targetEntity: CourseRecur::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     private Collection $eventRecur;
 
-    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: Course::class, orphanRemoval: true)]
+    /** @var Collection<int, Course> */
+    #[ORM\OneToMany(targetEntity: Course::class, mappedBy: 'parent', orphanRemoval: true)]
     private Collection $timeline;
 
     #[ORM\ManyToOne(inversedBy: 'timeline')]
-    private Course $parent;
+    private ?Course $parent = null;
 
     #[ORM\ManyToOne(inversedBy: 'courses')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Place $place;
+    protected ?Place $place = null;
 
     #[ORM\ManyToOne(inversedBy: 'courses')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Room $room;
+    protected ?Room $room = null;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'practicalCourses')]
     #[ORM\JoinTable(name: 'booking_organizer')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
@@ -67,30 +71,36 @@ class Course extends AbstractBooking
 
     #[ORM\ManyToOne(inversedBy: 'courses')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private Education $education;
+    private ?Education $education = null;
 
+    /** @var Collection<int, EducationCurriculum> */
     #[ORM\ManyToMany(targetEntity: EducationCurriculum::class)]
     private Collection $educationCurriculum;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'courses')]
     #[ORM\JoinTable(name: 'course_student')]
     #[ORM\JoinColumn(name: 'course_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'student_id', referencedColumnName: 'id')]
     private Collection $students;
 
-    #[ORM\OneToMany(mappedBy: 'course', targetEntity: Work::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, Work> */
+    #[ORM\OneToMany(targetEntity: Work::class, mappedBy: 'course', cascade: ['persist'], orphanRemoval: true)]
     private Collection $work;
 
+    /** @var Collection<int, Equipment> */
     #[ORM\ManyToMany(targetEntity: Equipment::class)]
     #[ORM\JoinTable(name: 'booking_equipment')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'equipment_id', referencedColumnName: 'id')]
     private Collection $equipments;
 
-    #[ORM\OneToMany(mappedBy: 'course', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, AttendanceBooking> */
+    #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'course', cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $attendanceBooking;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'courses', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_booking')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]

+ 1 - 1
src/Entity/Booking/CourseRecur.php

@@ -21,7 +21,7 @@ class CourseRecur extends AbstractBookingRecur
     private string $discr = 'course';
 
     #[ORM\ManyToOne(inversedBy: 'eventRecur')]
-    private Course $event;
+    private ?Course $event = null;
 
     public function getDiscr(): ?string
     {

+ 23 - 12
src/Entity/Booking/EducationalProject.php

@@ -9,6 +9,7 @@ use App\Entity\Access\Access;
 use App\Entity\Billing\BillLine;
 use App\Entity\Billing\EducationalProjectIntangible;
 use App\Entity\Billing\EducationalProjectPayer;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\File;
 use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
@@ -33,14 +34,16 @@ class EducationalProject extends AbstractBooking
     #[ORM\Column(length: 255, nullable: false)]
     private string $discr = 'educationalproject';
 
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: EducationalProjectRecur::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, EducationalProjectRecur> */
+    #[ORM\OneToMany(targetEntity: EducationalProjectRecur::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     private Collection $eventRecur;
 
-    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: EducationalProject::class, orphanRemoval: true)]
+    /** @var Collection<int, EducationalProject> */
+    #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'parent', orphanRemoval: true)]
     private Collection $timeline;
 
     #[ORM\ManyToOne(inversedBy: 'timeline')]
-    private EducationalProject $parent;
+    private ?EducationalProject $parent = null;
 
     #[ORM\ManyToOne(inversedBy: 'educationalProjects')]
     #[ORM\JoinColumn(nullable: false)]
@@ -48,50 +51,58 @@ class EducationalProject extends AbstractBooking
 
     #[ORM\ManyToOne(inversedBy: 'silentPartners')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private Access $silentPartner;
+    private ?Access $silentPartner = null;
 
     #[ORM\ManyToOne(inversedBy: 'educationalProjects')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private EducationalProjectPublic $public;
+    private ?EducationalProjectPublic $public = null;
 
     #[ORM\ManyToOne(inversedBy: 'operationalPartners')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private Access $operationalPartner;
+    private ?Access $operationalPartner = null;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class)]
     #[ORM\JoinTable(name: 'educationalproject_financier')]
     private Collection $financiers;
 
+    /** @var Collection<int, File> */
     #[ORM\ManyToMany(targetEntity: File::class)]
     private Collection $files;
 
-    #[ORM\OneToMany(mappedBy: 'educationalProject', targetEntity: EducationalProjectIntangible::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, EducationalProjectIntangible> */
+    #[ORM\OneToMany(targetEntity: EducationalProjectIntangible::class, mappedBy: 'educationalProject', cascade: ['persist'], orphanRemoval: true)]
     private Collection $educationalProjectIntangibles;
 
-    #[ORM\OneToMany(mappedBy: 'educationalProjectReceiver', targetEntity: EducationalProjectPayer::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, EducationalProjectPayer> */
+    #[ORM\OneToMany(targetEntity: EducationalProjectPayer::class, mappedBy: 'educationalProjectReceiver', cascade: ['persist'], orphanRemoval: true)]
     private Collection $billingReceivers;
 
-    #[ORM\OneToMany(mappedBy: 'educationalProject', targetEntity: BillLine::class, orphanRemoval: true)]
+    /** @var Collection<int, BillLine> */
+    #[ORM\OneToMany(targetEntity: BillLine::class, mappedBy: 'educationalProject', orphanRemoval: true)]
     private Collection $billLines;
 
-    #[ORM\OneToMany(mappedBy: 'educationalProject', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, AttendanceBooking> */
+    #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'educationalProject', cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $attendanceBooking;
 
     #[ORM\ManyToOne(inversedBy: 'educationalProjects')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Place $place;
+    protected ?Place $place = null;
 
     #[ORM\ManyToOne(inversedBy: 'educationalProjects')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Room $room;
+    protected ?Room $room = null;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'educationalProjectOrganizers')]
     #[ORM\JoinTable(name: 'booking_organizer')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'organizer_id', referencedColumnName: 'id')]
     private Collection $organizer;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'educationalProjects', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_booking')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]

+ 3 - 1
src/Entity/Booking/EducationalProjectPublic.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Booking;
 
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Billing\ResidenceArea;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -18,7 +19,8 @@ class EducationalProjectPublic
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToMany(mappedBy: 'public', targetEntity: EducationalProject::class, )]
+    /** @var Collection<int, EducationalProject> */
+    #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'public', )]
     private Collection $educationalProjects;
 
     public function __construct()

+ 1 - 1
src/Entity/Booking/EducationalProjectRecur.php

@@ -19,7 +19,7 @@ class EducationalProjectRecur extends AbstractBookingRecur
     private string $discr = 'educationalproject';
 
     #[ORM\ManyToOne(inversedBy: 'eventRecur')]
-    private EducationalProject $event;
+    private ?EducationalProject $event = null;
 
     public function getDiscr(): ?string
     {

+ 21 - 11
src/Entity/Booking/Event.php

@@ -6,6 +6,7 @@ namespace App\Entity\Booking;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\Categories;
 use App\Entity\Core\File;
 use App\Entity\Core\Tagg;
@@ -38,39 +39,45 @@ class Event extends AbstractBooking
 
     #[ORM\ManyToOne(inversedBy: 'events')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Place $place;
+    protected ?Place $place = null;
 
     #[ORM\ManyToOne(inversedBy: 'events')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Room $room;
+    protected ?Room $room = null;
 
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: EventRecur::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, EventRecur> */
+    #[ORM\OneToMany(targetEntity: EventRecur::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     private Collection $eventRecur;
 
-    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: Event::class, orphanRemoval: true)]
+    /** @var Collection<int, Event> */
+    #[ORM\OneToMany(targetEntity: Event::class, mappedBy: 'parent', orphanRemoval: true)]
     private Collection $timeline;
 
     #[ORM\ManyToOne(inversedBy: 'timeline')]
-    private Event $parent;
+    private ?Event $parent = null;
 
     #[Assert\Valid]
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'events')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private File $image;
+    private ?File $image = null;
 
     #[ORM\ManyToOne]
-    private EventGender $gender;
+    private ?EventGender $gender = null;
 
+    /** @var Collection<int, EventUser> */
     #[Assert\Valid]
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: EventUser::class, cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(targetEntity: EventUser::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     private Collection $eventUser;
 
+    /** @var Collection<int, Categories> */
     #[ORM\ManyToMany(targetEntity: Categories::class, cascade: ['persist'])]
     private Collection $categories;
 
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: EventReport::class, orphanRemoval: true)]
+    /** @var Collection<int, EventReport> */
+    #[ORM\OneToMany(targetEntity: EventReport::class, mappedBy: 'event', orphanRemoval: true)]
     private Collection $eventReports;
 
+    /** @var Collection<int, File> */
     #[ORM\ManyToMany(targetEntity: File::class, cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinTable(name: 'event_files')]
     #[ORM\JoinColumn(name: 'event_id', referencedColumnName: 'id', onDelete: 'cascade')]
@@ -79,18 +86,21 @@ class Event extends AbstractBooking
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private PlaceSystem $placeSystem;
+    private ?PlaceSystem $placeSystem = null;
 
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, AttendanceBooking> */
+    #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $attendanceBooking;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'eventOrganizers')]
     #[ORM\JoinTable(name: 'booking_organizer')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'organizer_id', referencedColumnName: 'id')]
     private Collection $organizer;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'events', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_booking')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]

+ 1 - 1
src/Entity/Booking/EventRecur.php

@@ -19,7 +19,7 @@ class EventRecur extends AbstractBookingRecur
     private string $discr = 'event';
 
     #[ORM\ManyToOne(inversedBy: 'eventRecur')]
-    private Event $event;
+    private ?Event $event = null;
 
     public function getDiscr(): ?string
     {

+ 4 - 2
src/Entity/Booking/EventReport.php

@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace App\Entity\Booking;
 
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\File;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -20,9 +21,10 @@ class EventReport
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'eventReports')]
-    private Event $event;
+    private ?Event $event = null;
 
-    #[ORM\OneToMany(mappedBy: 'eventReport', targetEntity: File::class, orphanRemoval: true)]
+    /** @var Collection<int, File> */
+    #[ORM\OneToMany(targetEntity: File::class, mappedBy: 'eventReport', orphanRemoval: true)]
     private Collection $files;
 
     public function __construct()

+ 2 - 2
src/Entity/Booking/EventUser.php

@@ -23,10 +23,10 @@ class EventUser
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'eventUser')]
-    private Event $event;
+    private ?Event $event = null;
 
     #[ORM\ManyToOne(inversedBy: 'eventUsers')]
-    private Access $guest;
+    private ?Access $guest = null;
 
     public function getId(): ?int
     {

+ 16 - 9
src/Entity/Booking/Examen.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Booking;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\Tagg;
 use App\Entity\Education\Education;
 use App\Entity\Education\EducationCurriculum;
@@ -35,41 +36,47 @@ class Examen extends AbstractBooking
     #[ORM\JoinColumn(nullable: false)]
     protected Organization $organization;
 
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: ExamenRecur::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, ExamenRecur> */
+    #[ORM\OneToMany(targetEntity: ExamenRecur::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     private Collection $eventRecur;
 
-    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: Examen::class, orphanRemoval: true)]
+    /** @var Collection<int, Examen> */
+    #[ORM\OneToMany(targetEntity: Examen::class, mappedBy: 'parent', orphanRemoval: true)]
     private Collection $timeline;
 
     #[ORM\ManyToOne(inversedBy: 'timeline')]
-    private Examen $parent;
+    private ?Examen $parent = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'examens')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private Jury $jury;
+    private ?Jury $jury = null;
 
     #[ORM\ManyToOne(inversedBy: 'examens')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private Education $education;
+    private ?Education $education = null;
 
+    /** @var Collection<int, EducationCurriculum> */
     #[ORM\ManyToMany(targetEntity: EducationCurriculum::class)]
     private Collection $educationCurriculum;
 
-    #[ORM\OneToMany(mappedBy: 'examen', targetEntity: ExamenConvocation::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, ExamenConvocation> */
+    #[ORM\OneToMany(targetEntity: ExamenConvocation::class, mappedBy: 'examen', cascade: ['persist'], orphanRemoval: true)]
     private Collection $convocation;
 
-    #[ORM\OneToMany(mappedBy: 'examen', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, AttendanceBooking> */
+    #[ORM\OneToMany(targetEntity: AttendanceBooking::class, mappedBy: 'examen', cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $attendanceBooking;
 
     #[ORM\ManyToOne(inversedBy: 'examens')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Place $place;
+    protected ?Place $place = null;
 
     #[ORM\ManyToOne(inversedBy: 'examens')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    protected Room $room;
+    protected ?Room $room = null;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'examens', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_booking')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]

+ 3 - 1
src/Entity/Booking/ExamenConvocation.php

@@ -6,6 +6,7 @@ namespace App\Entity\Booking;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Product\Equipment;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -27,12 +28,13 @@ class ExamenConvocation
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'convocation')]
-    private Examen $examen;
+    private ?Examen $examen = null;
 
     #[ORM\ManyToOne(inversedBy: 'examenConvocations')]
     #[ORM\JoinColumn(nullable: false)]
     private Access $student;
 
+    /** @var Collection<int, Equipment> */
     #[ORM\ManyToMany(targetEntity: Equipment::class)]
     #[ORM\JoinColumn(name: 'examenconvocation_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'equipment_id', referencedColumnName: 'id')]

+ 1 - 1
src/Entity/Booking/ExamenRecur.php

@@ -21,7 +21,7 @@ class ExamenRecur extends AbstractBookingRecur
     private string $discr = 'examen';
 
     #[ORM\ManyToOne(inversedBy: 'eventRecur')]
-    private Examen $event;
+    private ?Examen $event = null;
 
     public function getDiscr(): ?string
     {

+ 3 - 1
src/Entity/Booking/OrganizationHoliday.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Booking;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\Organization;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -25,7 +26,8 @@ class OrganizationHoliday extends AbstractBooking
     #[ORM\Column(length: 255, nullable: false)]
     private string $discr = 'organizationholiday';
 
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: OrganizationHolidayRecur::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, OrganizationHolidayRecur> */
+    #[ORM\OneToMany(targetEntity: OrganizationHolidayRecur::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     private Collection $eventRecur;
 
     #[ORM\ManyToOne(inversedBy: 'holidays')]

+ 1 - 1
src/Entity/Booking/OrganizationHolidayRecur.php

@@ -19,7 +19,7 @@ class OrganizationHolidayRecur extends AbstractBookingRecur
     private string $discr = 'organizationholiday';
 
     #[ORM\ManyToOne(inversedBy: 'eventRecur')]
-    private OrganizationHoliday $event;
+    private ?OrganizationHoliday $event = null;
 
     public function getDiscr(): ?string
     {

+ 4 - 2
src/Entity/Booking/PersonHoliday.php

@@ -7,6 +7,7 @@ namespace App\Entity\Booking;
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Billing\ResidenceArea;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -25,11 +26,12 @@ class PersonHoliday extends AbstractBooking
     #[ORM\Column(length: 255, nullable: false)]
     private string $discr = 'personholiday';
 
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: PersonHolidayRecur::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, PersonHolidayRecur> */
+    #[ORM\OneToMany(targetEntity: PersonHolidayRecur::class, mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $eventRecur;
 
     #[ORM\ManyToOne(inversedBy: 'holidays')]
-    private Access $access;
+    private ?Access $access = null;
 
     public function __construct()
     {

+ 1 - 1
src/Entity/Booking/PersonHolidayRecur.php

@@ -21,7 +21,7 @@ class PersonHolidayRecur extends AbstractBookingRecur
     private string $discr = 'personholiday';
 
     #[ORM\ManyToOne(inversedBy: 'eventRecur')]
-    private PersonHoliday $event;
+    private ?PersonHoliday $event = null;
 
     public function getDiscr(): ?string
     {

+ 6 - 3
src/Entity/Booking/Work.php

@@ -4,6 +4,7 @@ declare(strict_types=1);
 
 namespace App\Entity\Booking;
 
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\File;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -23,12 +24,14 @@ class Work
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'work')]
-    private Course $course;
+    private ?Course $course = null;
 
-    #[ORM\OneToMany(mappedBy: 'work', targetEntity: WorkByUser::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, WorkByUser> */
+    #[ORM\OneToMany(targetEntity: WorkByUser::class, mappedBy: 'work', cascade: ['persist'], orphanRemoval: true)]
     private Collection $workByUsers;
 
-    #[ORM\OneToMany(mappedBy: 'work', targetEntity: File::class, orphanRemoval: true)]
+    /** @var Collection<int, File> */
+    #[ORM\OneToMany(targetEntity: File::class, mappedBy: 'work', orphanRemoval: true)]
     private Collection $files;
 
     public function __construct()

+ 2 - 2
src/Entity/Booking/WorkByUser.php

@@ -21,10 +21,10 @@ class WorkByUser
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'workByUsers')]
-    private Work $work;
+    private ?Work $work = null;
 
     #[ORM\ManyToOne(inversedBy: 'workByUsers')]
-    private Access $student;
+    private ?Access $student = null;
 
     public function getId(): ?int
     {

+ 1 - 1
src/Entity/Core/AbstractControl.php

@@ -17,7 +17,7 @@ abstract class AbstractControl
 
     #[ORM\ManyToOne(inversedBy: 'accompanistControl')]
     #[ORM\JoinColumn(nullable: true)]
-    protected Access $accompanist;
+    protected ?Access $accompanist = null;
 
     public function getId(): ?int
     {

+ 5 - 3
src/Entity/Core/AbstractInformation.php

@@ -6,6 +6,7 @@ namespace App\Entity\Core;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\Organization;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use App\Enum\Core\NotificationTypeEnum;
@@ -40,11 +41,11 @@ class AbstractInformation
 
     #[ORM\ManyToOne(inversedBy: 'notifications')]
     #[ORM\JoinColumn(nullable: false)]
-    protected ?Access $recipientAccess;
+    protected Access $recipientAccess;
 
     #[ORM\ManyToOne(inversedBy: 'notifications')]
     #[ORM\JoinColumn(nullable: false)]
-    protected ?Organization $recipientOrganization;
+    protected Organization $recipientOrganization;
 
     #[ORM\Column(length: 40, nullable: true)]
     protected ?string $name = null;
@@ -68,7 +69,8 @@ class AbstractInformation
     #[Context(normalizationContext: [DateTimeNormalizer::FORMAT_KEY => 'Y-m-d'])]
     protected ?\DateTimeInterface $availabilityDate = null;
 
-    #[ORM\OneToMany(mappedBy: 'notification', targetEntity: NotificationUser::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, NotificationUser> */
+    #[ORM\OneToMany(targetEntity: NotificationUser::class, mappedBy: 'notification', cascade: ['persist'], orphanRemoval: true)]
     protected Collection $notificationUsers;
 
     #[Pure]

+ 5 - 3
src/Entity/Core/AddressPostal.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Core;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\OrganizationAddressPostal;
 use App\Entity\Person\PersonAddressPostal;
 use App\Entity\Place\Place;
@@ -73,12 +74,13 @@ class AddressPostal
     private ?float $longitude = null;
 
     #[ORM\OneToOne(mappedBy: 'addressPostal')]
-    private OrganizationAddressPostal $organizationAddressPostal;
+    private ?OrganizationAddressPostal $organizationAddressPostal = null;
 
     #[ORM\OneToOne(mappedBy: 'addressPostal')]
-    private PersonAddressPostal $personAddressPostal;
+    private ?PersonAddressPostal $personAddressPostal = null;
 
-    #[ORM\OneToMany(mappedBy: 'addressPostal', targetEntity: Place::class)]
+    /** @var Collection<int, Place> */
+    #[ORM\OneToMany(targetEntity: Place::class, mappedBy: 'addressPostal')]
     private Collection $places;
 
     public function __construct()

+ 4 - 1
src/Entity/Core/BankAccount.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Core;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\Organization;
 use App\Entity\Person\Person;
 use App\Repository\Core\BankAccountRepository;
@@ -55,7 +56,7 @@ class BankAccount
      * 0 => jamais facturé, 1 => facturé 1 fois, 2 => facturé plusieurs fois.
      */
     #[ORM\Column(options: ['default' => 0])]
-    private ?int $countInvoiced = 0;
+    private int $countInvoiced = 0;
 
     #[ORM\Column(length: 255, nullable: true)]
     private ?string $holder = null;
@@ -73,9 +74,11 @@ class BankAccount
     #[ORM\Column(type: 'date', nullable: true)]
     private ?\DateTimeInterface $signatureDateSamplingMandate;
 
+    /** @var Collection<int, Organization> */
     #[ORM\ManyToMany(targetEntity: Organization::class, mappedBy: 'bankAccounts', cascade: ['persist'])]
     private Collection $organization;
 
+    /** @var Collection<int, Person> */
     #[ORM\ManyToMany(targetEntity: Person::class, mappedBy: 'bankAccount', cascade: ['persist'])]
     private Collection $person;
 

+ 4 - 0
src/Entity/Core/ContactPoint.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Core;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\Organization;
 use App\Entity\Person\Person;
 use App\Entity\Place\Place;
@@ -68,18 +69,21 @@ class ContactPoint
     #[ORM\Column(length: 255, nullable: true)]
     private ?string $mobilPhoneInvalid = null;
 
+    /** @var Collection<int, Organization> */
     #[ORM\ManyToMany(targetEntity: Organization::class, inversedBy: 'contactPoints')]
     #[ORM\JoinTable(name: 'organization_contactpoint')]
     #[ORM\JoinColumn(name: 'contactPoint_id', referencedColumnName: 'id', unique: true)]
     #[ORM\InverseJoinColumn(name: 'organization_id', referencedColumnName: 'id')]
     private Collection $organization;
 
+    /** @var Collection<int, Person> */
     #[ORM\ManyToMany(targetEntity: Person::class, inversedBy: 'contactPoints')]
     #[ORM\JoinTable(name: 'person_contactpoint')]
     #[ORM\JoinColumn(name: 'contactPoint_id', referencedColumnName: 'id', unique: true)]
     #[ORM\InverseJoinColumn(name: 'person_id', referencedColumnName: 'id')]
     private Collection $person;
 
+    /** @var Collection<int, Place> */
     #[ORM\ManyToMany(targetEntity: Place::class, inversedBy: 'contactpoint')]
     #[ORM\JoinTable(name: 'place_contactpoint')]
     #[ORM\JoinColumn(name: 'contactPoint_id', referencedColumnName: 'id', unique: true)]

+ 36 - 27
src/Entity/Core/File.php

@@ -13,11 +13,13 @@ use App\Entity\AccessWish\DocumentWish;
 use App\Entity\Booking\Event;
 use App\Entity\Booking\EventReport;
 use App\Entity\Booking\Work;
+use App\Entity\Education\EducationStudent;
 use App\Entity\Message\TemplateSystem;
 use App\Entity\Organization\Activity;
 use App\Entity\Organization\OnlineRegistrationSettings;
 use App\Entity\Organization\Organization;
 use App\Entity\Organization\Parameters;
+use App\Entity\Person\CommissionMember;
 use App\Entity\Person\Person;
 use App\Enum\Core\FileHostEnum;
 use App\Enum\Core\FileStatusEnum;
@@ -73,13 +75,13 @@ class File
      * Slug du fichier (i.e. le chemin d'accès relatif).
      */
     #[ORM\Column(length: 255)]
-    private ?string $slug = null;
+    private string $slug;
 
     /**
      * Chemin d'accès du fichier.
      */
     #[ORM\Column(length: 255)]
-    private ?string $path = null;
+    private string $path;
 
     /**
      * Nom du fichier.
@@ -114,7 +116,7 @@ class File
     /**
      * Taille du document en octets.
      */
-    #[ORM\Column]
+    #[ORM\Column(nullable: true)]
     private ?int $size;
 
     /**
@@ -134,32 +136,32 @@ class File
     /**
      * Id de l'access ayant créé ce fichier.
      */
-    #[ORM\Column]
-    private ?int $createdBy;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?int $createdBy = null;
 
     /**
      * Date de dernière mise à jour du fichier.
      */
-    #[ORM\Column]
-    private \DateTime $updateDate;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?\DateTime $updateDate = null;
 
     /**
      * Id de l'access ayant mis à jour ce fichier le dernier.
      */
-    #[ORM\Column]
-    private ?int $updatedBy;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?int $updatedBy = null;
 
     /**
      * Statut du fichier (en cours de génération, prêt, supprimé, etc.).
      */
     #[ORM\Column(length: 50, enumType: FileStatusEnum::class)]
-    private ?FileStatusEnum $status = null;
+    private FileStatusEnum $status;
 
     /**
      * Serveur sur lequel le fichier est physiquement stocké.
      */
     #[ORM\Column(length: 5, enumType: FileHostEnum::class, options: ['default' => FileHostEnum::AP2I])]
-    private ?FileHostEnum $host = FileHostEnum::AP2I;
+    private FileHostEnum $host = FileHostEnum::AP2I;
 
     //    #[ORM\Column]
     //    private ?int $eventReport_id;
@@ -167,8 +169,8 @@ class File
     /**
      * TODO: complete.
      */
-    #[ORM\Column]
-    private ?\DateTime $availabilityDate;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?\DateTime $availabilityDate = null;
 
     //    #[ORM\Column]
     //    private ?int $documentWish_id;
@@ -182,54 +184,61 @@ class File
     //    #[ORM\Column]
     //    private ?int $work_id;
 
+    /** @var Collection<int, Person> */
     #[ORM\ManyToMany(targetEntity: Person::class, inversedBy: 'personFiles')]
     #[Groups(['file_person'])]
     private Collection $accessPersons;
 
-    #[ORM\OneToMany(mappedBy: 'image', targetEntity: Person::class, orphanRemoval: true)]
+    /** @var Collection<int, Person> */
+    #[ORM\OneToMany(targetEntity: Person::class, mappedBy: 'image', orphanRemoval: true)]
     private Collection $personImages;
 
-    #[ORM\OneToMany(mappedBy: 'logo', targetEntity: Organization::class, orphanRemoval: true)]
+    /** @var Collection<int, Organization> */
+    #[ORM\OneToMany(targetEntity: Organization::class, mappedBy: 'logo', orphanRemoval: true)]
     private Collection $organizationLogos;
 
-    #[ORM\OneToMany(mappedBy: 'image', targetEntity: Organization::class, orphanRemoval: true)]
+    /** @var Collection<int, Organization> */
+    #[ORM\OneToMany(targetEntity: Organization::class, mappedBy: 'image', orphanRemoval: true)]
     private Collection $organizationImages;
 
-    #[ORM\OneToOne(mappedBy: 'qrCode', targetEntity: Parameters::class, fetch: 'EAGER')]
-    private Parameters $qrCode;
+    #[ORM\OneToOne(targetEntity: Parameters::class, mappedBy: 'qrCode', fetch: 'EAGER')]
+    private ?Parameters $qrCode = null;
 
-    #[ORM\OneToMany(mappedBy: 'image', targetEntity: Event::class)]
+    /** @var Collection<int, Event> */
+    #[ORM\OneToMany(targetEntity: Event::class, mappedBy: 'image')]
     private Collection $events;
 
-    #[ORM\OneToMany(mappedBy: 'logo', targetEntity: Activity::class)]
+    /** @var Collection<int, Activity> */
+    #[ORM\OneToMany(targetEntity: Activity::class, mappedBy: 'logo')]
     private Collection $activityLogos;
 
-    #[ORM\OneToMany(mappedBy: 'imageActivity', targetEntity: Activity::class)]
+    /** @var Collection<int, Activity> */
+    #[ORM\OneToMany(targetEntity: Activity::class, mappedBy: 'imageActivity')]
     private Collection $activityImages;
 
     #[ORM\ManyToOne(inversedBy: 'files')]
     #[ORM\JoinColumn(onDelete: 'CASCADE')]
-    private EventReport $eventReport;
+    private ?EventReport $eventReport = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'files')]
     #[ORM\JoinColumn(onDelete: 'CASCADE')]
-    private DocumentWish $documentWish;
+    private ?DocumentWish $documentWish = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'introductionFiles')]
     #[ORM\JoinColumn(onDelete: 'CASCADE')]
-    private OnlineRegistrationSettings $onlineRegistrationSetting;
+    private ?OnlineRegistrationSettings $onlineRegistrationSetting = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'introductionFilesNewEnrolments')]
     #[ORM\JoinColumn(onDelete: 'CASCADE')]
-    private OnlineRegistrationSettings $onlineRegistrationSettingNewEnrolments;
+    private ?OnlineRegistrationSettings $onlineRegistrationSettingNewEnrolments = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'files')]
     #[ORM\JoinColumn(onDelete: 'CASCADE')]
-    private Work $work;
+    private ?Work $work = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'files')]
     #[ORM\JoinColumn(onDelete: 'CASCADE')]
-    private TemplateSystem $templateSystem;
+    private ?TemplateSystem $templateSystem = null;
 
     #[Pure]
     public function __construct()

+ 28 - 0
src/Entity/Core/Tagg.php

@@ -10,6 +10,7 @@ use App\Entity\AccessWish\AccessWish;
 use App\Entity\Billing\AbstractBillingIntangible;
 use App\Entity\Billing\BillAccounting;
 use App\Entity\Billing\BillPayment;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Booking\Course;
 use App\Entity\Booking\EducationalProject;
 use App\Entity\Booking\Event;
@@ -54,84 +55,111 @@ class Tagg
     #[ORM\JoinColumn(nullable: false)]
     private Organization $organization;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, mappedBy: 'tags')]
     protected Collection $accesses;
 
+    /** @var Collection<int, Organization> */
     #[ORM\ManyToMany(targetEntity: Organization::class, mappedBy: 'tags')]
     protected Collection $organizations;
 
+    /** @var Collection<int, BillAccounting> */
     #[ORM\ManyToMany(targetEntity: BillAccounting::class, mappedBy: 'tags')]
     protected Collection $billAccountings;
 
+    /** @var Collection<int, Equipment> */
     #[ORM\ManyToMany(targetEntity: Equipment::class, mappedBy: 'tags')]
     protected Collection $equipments;
 
+    /** @var Collection<int, Intangible> */
     #[ORM\ManyToMany(targetEntity: Intangible::class, mappedBy: 'tags')]
     protected Collection $intangibles;
 
+    /** @var Collection<int, Course> */
     #[ORM\ManyToMany(targetEntity: Course::class, mappedBy: 'tags')]
     protected Collection $courses;
 
+    /** @var Collection<int, Event> */
     #[ORM\ManyToMany(targetEntity: Event::class, mappedBy: 'tags')]
     protected Collection $events;
 
+    /** @var Collection<int, EducationalProject> */
     #[ORM\ManyToMany(targetEntity: EducationalProject::class, mappedBy: 'tags')]
     protected Collection $educationalProjects;
 
+    /** @var Collection<int, Examen> */
     #[ORM\ManyToMany(targetEntity: Examen::class, mappedBy: 'tags')]
     protected Collection $examens;
 
+    /** @var Collection<int, Activity> */
     #[ORM\ManyToMany(targetEntity: Activity::class, mappedBy: 'tags')]
     protected Collection $activities;
 
+    /** @var Collection<int, BillPayment> */
     #[ORM\ManyToMany(targetEntity: BillPayment::class, mappedBy: 'tags')]
     protected Collection $payments;
 
+    /** @var Collection<int, Commission> */
     #[ORM\ManyToMany(targetEntity: Commission::class, mappedBy: 'tags')]
     protected Collection $commissions;
 
+    /** @var Collection<int, Education> */
     #[ORM\ManyToMany(targetEntity: Education::class, mappedBy: 'tags')]
     protected Collection $educations;
 
+    /** @var Collection<int, EducationNotation> */
     #[ORM\ManyToMany(targetEntity: EducationNotation::class, mappedBy: 'tags')]
     protected Collection $educationNotations;
 
+    /** @var Collection<int, EducationStudent> */
     #[ORM\ManyToMany(targetEntity: EducationStudent::class, mappedBy: 'tags')]
     protected Collection $educationStudents;
 
+    /** @var Collection<int, Jury> */
     #[ORM\ManyToMany(targetEntity: Jury::class, mappedBy: 'tags')]
     protected Collection $juries;
 
+    /** @var Collection<int, PlaceRepair> */
     #[ORM\ManyToMany(targetEntity: PlaceRepair::class, mappedBy: 'tags')]
     protected Collection $placeRepairs;
 
+    /** @var Collection<int, EquipmentRepair> */
     #[ORM\ManyToMany(targetEntity: EquipmentRepair::class, mappedBy: 'tags')]
     protected Collection $equipmentRepairs;
 
+    /** @var Collection<int, PlaceControl> */
     #[ORM\ManyToMany(targetEntity: PlaceControl::class, mappedBy: 'tags')]
     protected Collection $placeControls;
 
+    /** @var Collection<int, EquipmentControl> */
     #[ORM\ManyToMany(targetEntity: EquipmentControl::class, mappedBy: 'tags')]
     protected Collection $equipmentControls;
 
+    /** @var Collection<int, AccessWish> */
     #[ORM\ManyToMany(targetEntity: AccessWish::class, mappedBy: 'tags')]
     protected Collection $accessWishes;
 
+    /** @var Collection<int, AbstractBillingIntangible> */
     #[ORM\ManyToMany(targetEntity: AbstractBillingIntangible::class, mappedBy: 'tags')]
     protected Collection $billingIntangibles;
 
+    /** @var Collection<int, EquipmentLoan> */
     #[ORM\ManyToMany(targetEntity: EquipmentLoan::class, mappedBy: 'tags')]
     protected Collection $equipmentLoans;
 
+    /** @var Collection<int, Place> */
     #[ORM\ManyToMany(targetEntity: Place::class, mappedBy: 'tags')]
     protected Collection $places;
 
+    /** @var Collection<int, Email> */
     #[ORM\ManyToMany(targetEntity: Email::class, mappedBy: 'tags')]
     protected Collection $emails;
 
+    /** @var Collection<int, Mail> */
     #[ORM\ManyToMany(targetEntity: Mail::class, mappedBy: 'tags')]
     protected Collection $mails;
 
+    /** @var Collection<int, Sms> */
     #[ORM\ManyToMany(targetEntity: Sms::class, mappedBy: 'tags')]
     protected Collection $sms;
 

+ 1 - 1
src/Entity/Donor/Donor.php

@@ -28,7 +28,7 @@ class Donor
     private Access $access;
 
     #[ORM\ManyToOne(inversedBy: 'donors')]
-    private Organization $organization;
+    private ?Organization $organization = null;
 
     public function getId(): ?int
     {

+ 8 - 4
src/Entity/Education/CriteriaNotation.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Education;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\Organization;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use App\Enum\Education\TypeCriteriaEnum;
@@ -30,13 +31,16 @@ class CriteriaNotation
     #[ORM\JoinColumn(nullable: false)]
     private Organization $organization;
 
-    #[ORM\OneToMany(mappedBy: 'criteriaNotation', targetEntity: EducationNotation::class)]
+    /** @var Collection<int, EducationNotation> */
+    #[ORM\OneToMany(targetEntity: EducationNotation::class, mappedBy: 'criteriaNotation')]
     private Collection $educationNotations;
 
-    #[ORM\OneToMany(mappedBy: 'criteriaNotation', targetEntity: CustomNotation::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, CustomNotation> */
+    #[ORM\OneToMany(targetEntity: CustomNotation::class, mappedBy: 'criteriaNotation', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $customNotation;
 
-    #[ORM\OneToMany(mappedBy: 'criteriaNotation', targetEntity: EducationNotationCriteriaConfig::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EducationNotationCriteriaConfig> */
+    #[ORM\OneToMany(targetEntity: EducationNotationCriteriaConfig::class, mappedBy: 'criteriaNotation', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $educationNotationCriteriaConfigs;
 
     #[ORM\Column(length: 50, enumType: TypeCriteriaEnum::class)]
@@ -45,7 +49,7 @@ class CriteriaNotation
     #[ORM\Column]
     #[Assert\GreaterThanOrEqual(value: 0)]
     #[Assert\Range(notInRangeMessage: 'between_{{ min }}_and_{{ max }}', min: 0, max: 100)]
-    private ?int $noteMax;
+    private int $noteMax;
 
     public function __construct()
     {

+ 1 - 1
src/Entity/Education/CustomNotation.php

@@ -20,7 +20,7 @@ class CustomNotation
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'customNotation')]
-    private CriteriaNotation $criteriaNotation;
+    private ?CriteriaNotation $criteriaNotation = null;
 
     public function getId(): ?int
     {

+ 3 - 1
src/Entity/Education/Cycle.php

@@ -8,6 +8,7 @@ use ApiPlatform\Metadata\ApiResource;
 use ApiPlatform\Metadata\Get;
 use ApiPlatform\Metadata\GetCollection;
 use ApiPlatform\Metadata\Put;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\Organization;
 use App\Enum\Education\CycleEnum;
 use App\Repository\Education\CycleRepository;
@@ -62,7 +63,8 @@ class Cycle
     #[ORM\Column(options: ['default' => false])]
     private bool $isSystem = false;
 
-    #[ORM\OneToMany(mappedBy: 'cycle', targetEntity: CycleByEducation::class, orphanRemoval: true)]
+    /** @var Collection<int, CycleByEducation> */
+    #[ORM\OneToMany(targetEntity: CycleByEducation::class, mappedBy: 'cycle', orphanRemoval: true)]
     private Collection $cycleByEducations;
 
     public function __construct()

+ 2 - 2
src/Entity/Education/CycleByEducation.php

@@ -20,10 +20,10 @@ class CycleByEducation
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'cycleByEducations')]
-    private Education $education;
+    private ?Education $education = null;
 
     #[ORM\ManyToOne(inversedBy: 'cycleByEducations')]
-    private Cycle $cycle;
+    private ?Cycle $cycle = null;
 
     public function getId(): ?int
     {

+ 13 - 6
src/Entity/Education/Education.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Education;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Booking\Course;
 use App\Entity\Booking\Examen;
 use App\Entity\Core\Tagg;
@@ -26,10 +27,12 @@ class Education
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToMany(mappedBy: 'education', targetEntity: EducationCurriculum::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, EducationCurriculum> */
+    #[ORM\OneToMany(targetEntity: EducationCurriculum::class, mappedBy: 'education', cascade: ['persist'], orphanRemoval: true)]
     private Collection $educationCurriculums;
 
-    #[ORM\OneToMany(mappedBy: 'education', targetEntity: CycleByEducation::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, CycleByEducation> */
+    #[ORM\OneToMany(targetEntity: CycleByEducation::class, mappedBy: 'education', cascade: ['persist'], orphanRemoval: true)]
     private Collection $cycleByEducations;
 
     #[ORM\ManyToOne(fetch: 'EAGER', inversedBy: 'educations')]
@@ -40,15 +43,19 @@ class Education
     #[ORM\JoinColumn(nullable: false)]
     private EducationComplement $educationComplement;
 
-    #[ORM\OneToMany(mappedBy: 'education', targetEntity: Course::class)]
+    /** @var Collection<int, Course> */
+    #[ORM\OneToMany(targetEntity: Course::class, mappedBy: 'education')]
     private Collection $courses;
 
-    #[ORM\OneToMany(mappedBy: 'education', targetEntity: Examen::class)]
+    /** @var Collection<int, Examen> */
+    #[ORM\OneToMany(targetEntity: Examen::class, mappedBy: 'education')]
     private Collection $examens;
 
-    #[ORM\OneToMany(mappedBy: 'education', targetEntity: EducationTeacher::class, orphanRemoval: true)]
+    /** @var Collection<int, EducationTeacher> */
+    #[ORM\OneToMany(targetEntity: EducationTeacher::class, mappedBy: 'education', orphanRemoval: true)]
     private Collection $educationTeachers;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'educations', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_education')]
     #[ORM\JoinColumn(name: 'education_id', referencedColumnName: 'id')]
@@ -57,7 +64,7 @@ class Education
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private EducationNotationConfig $educationNotationConfig;
+    private ?EducationNotationConfig $educationNotationConfig = null;
 
     public function __construct()
     {

+ 3 - 1
src/Entity/Education/EducationCategory.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Education;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\Organization;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -28,7 +29,8 @@ class EducationCategory
     #[ORM\JoinColumn(nullable: false)]
     private Organization $organization;
 
-    #[ORM\OneToMany(mappedBy: 'educationCategory', targetEntity: Education::class, orphanRemoval: true)]
+    /** @var Collection<int, Education> */
+    #[ORM\OneToMany(targetEntity: Education::class, mappedBy: 'educationCategory', orphanRemoval: true)]
     private Collection $educations;
 
     public function __construct()

+ 6 - 3
src/Entity/Education/EducationCurriculum.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Education;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\ResidenceArea;
 use App\Repository\Education\EducationCurriculumRepository;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -29,14 +30,16 @@ class EducationCurriculum
     private ?EducationNotationConfig $educationNotationConfig;
 
     #[ORM\ManyToOne(inversedBy: 'educationCurriculums')]
-    private Education $education;
+    private ?Education $education = null;
 
     #[ORM\ManyToOne]
-    private Cycle $cycle;
+    private ?Cycle $cycle = null;
 
-    #[ORM\OneToMany(mappedBy: 'educationCurriculum', targetEntity: EducationStudent::class, cascade: ['persist'])]
+    /** @var Collection<int, EducationStudent> */
+    #[ORM\OneToMany(targetEntity: EducationStudent::class, mappedBy: 'educationCurriculum', cascade: ['persist'])]
     private Collection $educationStudent;
 
+    /** @var Collection<int, EducationTiming> */
     #[ORM\ManyToMany(targetEntity: EducationTiming::class, inversedBy: 'educationCurriculums')]
     #[ORM\JoinColumn(name: 'educationCurriculum_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'educationTiming_id', referencedColumnName: 'id')]

+ 3 - 1
src/Entity/Education/EducationNotation.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Education;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\Tagg;
 use App\Repository\Education\EducationNotationRepository;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
@@ -38,6 +39,7 @@ class EducationNotation
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     private ?EducationNotationCriteriaConfig $criteriaNotationConfig;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'educationNotations', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_educationNotation')]
     #[ORM\JoinColumn(name: 'educationNotation_id', referencedColumnName: 'id')]
@@ -46,7 +48,7 @@ class EducationNotation
 
     #[ORM\Column(type: 'decimal', precision: 10, scale: 2, nullable: true)]
     #[Assert\Range(notInRangeMessage: 'between_{{ min }}_and_{{ max }}', min: 0, max: 100)]
-    private ?float $note;
+    private ?float $note = null;
 
     public function __construct()
     {

+ 7 - 3
src/Entity/Education/EducationNotationConfig.php

@@ -7,6 +7,7 @@ namespace App\Entity\Education;
 use ApiPlatform\Metadata\ApiResource;
 use App\Attribute\OrganizationDefaultValue;
 use App\Entity\Access\Access;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Organization\Organization;
 use App\Repository\Education\EducationNotationConfigRepository;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
@@ -51,13 +52,16 @@ class EducationNotationConfig
     #[Assert\Range(notInRangeMessage: 'between_{{ min }}_and_{{ max }}', min: 1, max: 10)]
     private int $coefficient = 1;
 
-    #[ORM\OneToMany(mappedBy: 'educationNotationConfig', targetEntity: Access::class)]
+    /** @var Collection<int, Access> */
+    #[ORM\OneToMany(targetEntity: Access::class, mappedBy: 'educationNotationConfig')]
     private Collection $teachers;
 
-    #[ORM\OneToMany(mappedBy: 'educationNotationConfig', targetEntity: EducationCurriculum::class)]
+    /** @var Collection<int, EducationCurriculum> */
+    #[ORM\OneToMany(targetEntity: EducationCurriculum::class, mappedBy: 'educationNotationConfig')]
     private Collection $educationCurriculums;
 
-    #[ORM\OneToMany(mappedBy: 'educationNotationConfig', targetEntity: EducationNotationCriteriaConfig::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EducationNotationCriteriaConfig> */
+    #[ORM\OneToMany(targetEntity: EducationNotationCriteriaConfig::class, mappedBy: 'educationNotationConfig', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $educationNotationCriteriaConfigs;
 
     #[Pure]

+ 4 - 2
src/Entity/Education/EducationNotationCriteriaConfig.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Education;
 
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Billing\ResidenceArea;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -22,13 +23,14 @@ class EducationNotationCriteriaConfig
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'educationNotationCriteriaConfigs')]
-    private EducationNotationConfig $educationNotationConfig;
+    private ?EducationNotationConfig $educationNotationConfig = null;
 
     #[ORM\ManyToOne(inversedBy: 'educationNotationCriteriaConfigs')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false)]
     private CriteriaNotation $criteriaNotation;
 
-    #[ORM\OneToMany(mappedBy: 'criteriaNotationConfig', targetEntity: EducationNotation::class)]
+    /** @var Collection<int, EducationNotation> */
+    #[ORM\OneToMany(targetEntity: EducationNotation::class, mappedBy: 'criteriaNotationConfig')]
     private Collection $educationNotations;
 
     public function __construct()

+ 10 - 5
src/Entity/Education/EducationStudent.php

@@ -6,6 +6,7 @@ namespace App\Entity\Education;
 
 use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
+use App\Entity\Billing\ResidenceArea;
 use App\Entity\Core\Tagg;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -31,22 +32,26 @@ class EducationStudent
 
     #[ORM\ManyToOne(inversedBy: 'educationStudent')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private EducationCurriculum $educationCurriculum;
+    private ?EducationCurriculum $educationCurriculum = null;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'educationStudentByTeacher')]
     #[ORM\JoinTable(name: 'educationstudent_teacher')]
     private Collection $teachers;
 
-    #[ORM\OneToMany(mappedBy: 'educationStudent', targetEntity: EducationNotation::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, EducationNotation> */
+    #[ORM\OneToMany(targetEntity: EducationNotation::class, mappedBy: 'educationStudent', cascade: ['persist'], orphanRemoval: true)]
     private Collection $educationNotations;
 
     #[ORM\ManyToOne(inversedBy: 'referencedEducationStudent')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private EducationStudent $educationStudentLastYear;
+    private ?EducationStudent $educationStudentLastYear = null;
 
-    #[ORM\OneToMany(mappedBy: 'educationStudentLastYear', targetEntity: EducationStudent::class)]
+    /** @var Collection<int, EducationStudent> */
+    #[ORM\OneToMany(targetEntity: EducationStudent::class, mappedBy: 'educationStudentLastYear')]
     protected Collection $referencedEducationStudent;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'educationStudents', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_educationStudent')]
     #[ORM\JoinColumn(name: 'educationStudent_id', referencedColumnName: 'id')]
@@ -55,7 +60,7 @@ class EducationStudent
 
     #[ORM\ManyToOne(inversedBy: 'educationStudents')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private EducationTiming $educationTiming;
+    private ?EducationTiming $educationTiming = null;
 
     public function __construct()
     {

+ 4 - 3
src/Entity/Education/EducationTeacher.php

@@ -26,12 +26,13 @@ class EducationTeacher
 
     #[ORM\ManyToOne(inversedBy: 'educationTeachers')]
     #[ORM\JoinColumn(onDelete: 'CASCADE')]
-    private Education $education;
+    private ?Education $education = null;
 
     #[ORM\ManyToOne(inversedBy: 'educationTeachers')]
-    private Access $teacher;
+    private ?Access $teacher = null;
 
-    #[ORM\OneToMany(mappedBy: 'educationTeacher', targetEntity: SeizurePeriodNotation::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, SeizurePeriodNotation> */
+    #[ORM\OneToMany(targetEntity: SeizurePeriodNotation::class, mappedBy: 'educationTeacher', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $seizurePeriodNotations;
 
     public function __construct()

+ 3 - 1
src/Entity/Education/EducationTiming.php

@@ -66,9 +66,11 @@ class EducationTiming
     #[ORM\Column]
     private int $timing;
 
-    #[ORM\OneToMany(mappedBy: 'educationTiming', targetEntity: EducationStudent::class, orphanRemoval: true)]
+    /** @var Collection<int, EducationStudent> */
+    #[ORM\OneToMany(targetEntity: EducationStudent::class, mappedBy: 'educationTiming', orphanRemoval: true)]
     private Collection $educationStudents;
 
+    /** @var Collection<int, EducationCurriculum> */
     #[ORM\ManyToMany(targetEntity: EducationCurriculum::class, mappedBy: 'educationTimings')]
     private Collection $educationCurriculums;
 

+ 1 - 1
src/Entity/Education/SeizurePeriodNotation.php

@@ -20,7 +20,7 @@ class SeizurePeriodNotation
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'seizurePeriodNotations')]
-    private EducationTeacher $educationTeacher;
+    private ?EducationTeacher $educationTeacher = null;
 
     public function getId(): ?int
     {

+ 3 - 3
src/Entity/Message/AbstractMessage.php

@@ -38,7 +38,7 @@ abstract class AbstractMessage
 
     #[ORM\ManyToOne]
     #[ORM\JoinColumn(nullable: true)]
-    protected Organization $organization;
+    protected ?Organization $organization = null;
 
     #[ORM\Column(length: 50, enumType: MessageStatusEnum::class, options: ['default' => 'DRAFT'])]
     protected MessageStatusEnum $status = MessageStatusEnum::DRAFT;
@@ -48,10 +48,10 @@ abstract class AbstractMessage
     protected ?\DateTimeInterface $dateSent = null;
 
     #[ORM\Column(type: 'string', length: 255, nullable: true)]
-    protected string $about;
+    protected ?string $about = null;
 
     #[ORM\Column(type: 'text', nullable: true)]
-    protected string $text;
+    protected ?string $text = null;
 
     public function getId(): ?int
     {

+ 7 - 3
src/Entity/Message/Email.php

@@ -9,6 +9,7 @@ use App\Entity\Access\Access;
 use App\Entity\Core\File;
 use App\Entity\Core\Tagg;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Education\EducationStudent;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -33,22 +34,25 @@ class Email extends AbstractMessage
 
     #[ORM\ManyToOne(inversedBy: 'emails')]
     #[ORM\JoinColumn(nullable: true)]
-    private Access $author;
+    private ?Access $author = null;
 
-    #[ORM\OneToMany(mappedBy: 'email', targetEntity: ReportEmail::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, ReportEmail> */
+    #[ORM\OneToMany(targetEntity: ReportEmail::class, mappedBy: 'email', cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(onDelete: 'cascade')]
     private Collection $reports;
 
     #[ORM\ManyToOne(cascade: ['persist'])]
     #[ORM\JoinColumn(nullable: true)]
-    private Mail $mailAttached;
+    private ?Mail $mailAttached = null;
 
+    /** @var Collection<int, File> */
     #[ORM\ManyToMany(targetEntity: File::class, cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinTable(name: 'messages_files')]
     #[ORM\JoinColumn(name: 'message_id', referencedColumnName: 'id', onDelete: 'cascade')]
     #[ORM\InverseJoinColumn(name: 'file_id', referencedColumnName: 'id', onDelete: 'cascade')]
     private Collection $files;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'emails', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_message')]
     #[ORM\JoinColumn(name: 'message_id', referencedColumnName: 'id', onDelete: 'cascade')]

+ 4 - 1
src/Entity/Message/Mail.php

@@ -9,6 +9,7 @@ use App\Entity\Access\Access;
 use App\Entity\Core\File;
 use App\Entity\Core\Tagg;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Education\EducationStudent;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -30,14 +31,16 @@ class Mail extends AbstractMessage
 
     #[ORM\ManyToOne(inversedBy: 'mails')]
     #[ORM\JoinColumn(nullable: true)]
-    private Access $author;
+    private ?Access $author = null;
 
+    /** @var Collection<int, File> */
     #[ORM\ManyToMany(targetEntity: File::class, cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinTable(name: 'messages_files')]
     #[ORM\JoinColumn(name: 'message_id', referencedColumnName: 'id', onDelete: 'cascade')]
     #[ORM\InverseJoinColumn(name: 'file_id', referencedColumnName: 'id', onDelete: 'cascade')]
     private Collection $files;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'mails', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_message')]
     #[ORM\JoinColumn(name: 'message_id', referencedColumnName: 'id')]

+ 1 - 1
src/Entity/Message/ReportEmail.php

@@ -22,7 +22,7 @@ class ReportEmail extends AbstractReport
 
     #[ORM\ManyToOne(inversedBy: 'reports')]
     #[ORM\JoinColumn('message_id')]
-    private Email $email;
+    private ?Email $email = null;
 
     #[ORM\Column(length: 255)]
     private string $addressEmail;

+ 1 - 1
src/Entity/Message/ReportSms.php

@@ -22,7 +22,7 @@ class ReportSms extends AbstractReport
 
     #[ORM\ManyToOne(targetEntity: Sms::class, inversedBy: 'reports')]
     #[ORM\JoinColumn('message_id')]
-    private Sms $sms;
+    private ?Sms $sms = null;
 
     //    #[ORM\Column(length: 255)]
     //    private string $mobile;

+ 5 - 2
src/Entity/Message/Sms.php

@@ -8,6 +8,7 @@ use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 use App\Entity\Core\Tagg;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Education\EducationStudent;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -29,11 +30,13 @@ class Sms extends AbstractMessage
 
     #[ORM\ManyToOne(inversedBy: 'sms')]
     #[ORM\JoinColumn(nullable: true)]
-    private Access $author;
+    private ?Access $author = null;
 
-    #[ORM\OneToMany(mappedBy: 'sms', targetEntity: ReportSms::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, ReportSms> */
+    #[ORM\OneToMany(targetEntity: ReportSms::class, mappedBy: 'sms', cascade: ['persist'], orphanRemoval: true)]
     private Collection $reports;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'sms', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_message')]
     #[ORM\JoinColumn(name: 'message_id', referencedColumnName: 'id')]

+ 2 - 1
src/Entity/Message/TemplateSystem.php

@@ -24,8 +24,9 @@ class TemplateSystem
     private ?int $id = null;
 
     #[ORM\ManyToOne]
-    private Organization $organization;
+    private ?Organization $organization = null;
 
+    /** @var Collection<int, File> */
     #[ORM\OneToMany(targetEntity: File::class, mappedBy: 'templateSystem', orphanRemoval: true)]
     private Collection $files;
 

+ 3 - 1
src/Entity/Network/Network.php

@@ -5,6 +5,7 @@ declare(strict_types=1);
 namespace App\Entity\Network;
 
 use ApiPlatform\Metadata\ApiResource;
+use App\Entity\Message\ReportSms;
 use App\Repository\Network\NetworkRepository;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -37,7 +38,8 @@ class Network
     #[ORM\Column(length: 255, nullable: true)]
     private ?string $url = null;
 
-    #[ORM\OneToMany(mappedBy: 'network', targetEntity: NetworkOrganization::class, orphanRemoval: true)]
+    /** @var Collection<int, NetworkOrganization> */
+    #[ORM\OneToMany(targetEntity: NetworkOrganization::class, mappedBy: 'network', orphanRemoval: true)]
     private Collection $organizations;
 
     #[Pure]

+ 2 - 2
src/Entity/Network/NetworkOrganization.php

@@ -37,11 +37,11 @@ class NetworkOrganization
     #[ORM\ManyToOne(inversedBy: 'organizations')]
     #[ORM\JoinColumn(nullable: true)]
     #[Groups('network')]
-    private Network $network;
+    private ?Network $network = null;
 
     #[ORM\ManyToOne(inversedBy: 'networkOrganizations')]
     #[ORM\JoinColumn(nullable: true)]
-    private Organization $organization;
+    private ?Organization $organization = null;
 
     #[ORM\ManyToOne(inversedBy: 'networkOrganizationChildren')]
     private ?Organization $parent;

+ 8 - 4
src/Entity/Organization/Activity.php

@@ -8,6 +8,7 @@ use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Core\Categories;
 use App\Entity\Core\File;
 use App\Entity\Core\Tagg;
+use App\Entity\Message\ReportSms;
 use App\Entity\Person\PersonActivity;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -29,25 +30,28 @@ class Activity
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'activityLogos')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private File $logo;
+    private ?File $logo = null;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'activityImages')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
-    private File $imageActivity;
+    private ?File $imageActivity = null;
 
     #[ORM\ManyToOne]
-    private ActivityType $activityType;
+    private ?ActivityType $activityType = null;
 
     #[ORM\ManyToOne(inversedBy: 'activities')]
     #[ORM\JoinColumn(nullable: false)]
     private Organization $organization;
 
+    /** @var Collection<int, Categories> */
     #[ORM\ManyToMany(targetEntity: Categories::class, cascade: ['persist'])]
     private Collection $categories;
 
-    #[ORM\OneToMany(mappedBy: 'activity', targetEntity: PersonActivity::class)]
+    /** @var Collection<int, PersonActivity> */
+    #[ORM\OneToMany(targetEntity: PersonActivity::class, mappedBy: 'activity')]
     private Collection $personActivities;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'activities', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_activity')]
     #[ORM\JoinColumn(name: 'activity_id', referencedColumnName: 'id')]

+ 5 - 1
src/Entity/Organization/Jury.php

@@ -9,6 +9,7 @@ use App\Entity\Access\Access;
 use App\Entity\Booking\Examen;
 use App\Entity\Core\Tagg;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Message\ReportSms;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -30,13 +31,16 @@ class Jury
     #[ORM\JoinColumn(nullable: false)]
     private Organization $organization;
 
+    /** @var Collection<int, Access> */
     #[ORM\ManyToMany(targetEntity: Access::class, inversedBy: 'juryMembers', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'juries_members')]
     private Collection $members;
 
-    #[ORM\OneToMany(mappedBy: 'jury', targetEntity: Examen::class)]
+    /** @var Collection<int, Examen> */
+    #[ORM\OneToMany(targetEntity: Examen::class, mappedBy: 'jury')]
     private Collection $examens;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'juries', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_jury')]
     #[ORM\JoinColumn(name: 'jury_id', referencedColumnName: 'id')]

+ 2 - 2
src/Entity/Organization/OnlineRegistrationDocument.php

@@ -21,11 +21,11 @@ class OnlineRegistrationDocument
 
     #[ORM\ManyToOne(inversedBy: 'documents')]
     #[ORM\JoinColumn(nullable: true)]
-    private OnlineRegistrationSettings $onlineRegistrationSettings;
+    private ?OnlineRegistrationSettings $onlineRegistrationSettings = null;
 
     #[ORM\ManyToOne(inversedBy: 'guardiansDocuments')]
     #[ORM\JoinColumn(nullable: true)]
-    private OnlineRegistrationSettings $guardiansOnlineRegistrationSettings;
+    private ?OnlineRegistrationSettings $guardiansOnlineRegistrationSettings = null;
 
     public function getId(): ?int
     {

+ 8 - 2
src/Entity/Organization/OnlineRegistrationOpeningPeriod.php

@@ -21,17 +21,23 @@ class OnlineRegistrationOpeningPeriod
 
     #[ORM\ManyToOne(inversedBy: 'openingPeriods')]
     #[ORM\JoinColumn]
-    private OnlineRegistrationSettings $onlineRegistrationSettings;
+    private ?OnlineRegistrationSettings $onlineRegistrationSettings = null;
 
     #[ORM\ManyToOne(inversedBy: 'openingPeriodsNewEnrolments')]
     #[ORM\JoinColumn]
-    private OnlineRegistrationSettings $onlineRegistrationSettingsNewEnrolments;
+    private ?OnlineRegistrationSettings $onlineRegistrationSettingsNewEnrolments = null;
 
     public function getId(): ?int
     {
         return $this->id;
     }
 
+    public function setId(?int $id): self
+    {
+        $this->id = $id;
+        return $this;
+    }
+
     public function getOnlineRegistrationSettings(): ?OnlineRegistrationSettings
     {
         return $this->onlineRegistrationSettings;

+ 21 - 6
src/Entity/Organization/OnlineRegistrationSettings.php

@@ -6,6 +6,7 @@ namespace App\Entity\Organization;
 
 use App\Entity\Core\File;
 // use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use App\Entity\Message\ReportSms;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -22,22 +23,28 @@ class OnlineRegistrationSettings
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToMany(mappedBy: 'onlineRegistrationSettings', targetEntity: OnlineRegistrationOpeningPeriod::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, OnlineRegistrationOpeningPeriod> */
+    #[ORM\OneToMany(targetEntity: OnlineRegistrationOpeningPeriod::class, mappedBy: 'onlineRegistrationSettings', cascade: ['persist'], orphanRemoval: true)]
     private Collection $openingPeriods;
 
-    #[ORM\OneToMany(mappedBy: 'onlineRegistrationSettings', targetEntity: OnlineRegistrationDocument::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, OnlineRegistrationDocument> */
+    #[ORM\OneToMany(targetEntity: OnlineRegistrationDocument::class, mappedBy: 'onlineRegistrationSettings', cascade: ['persist'], orphanRemoval: true)]
     private Collection $documents;
 
-    #[ORM\OneToMany(mappedBy: 'guardiansOnlineRegistrationSettings', targetEntity: OnlineRegistrationDocument::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, OnlineRegistrationDocument> */
+    #[ORM\OneToMany(targetEntity: OnlineRegistrationDocument::class, mappedBy: 'guardiansOnlineRegistrationSettings', cascade: ['persist'], orphanRemoval: true)]
     private Collection $guardiansDocuments;
 
-    #[ORM\OneToMany(mappedBy: 'onlineRegistrationSetting', targetEntity: File::class, orphanRemoval: true)]
+    /** @var Collection<int, File> */
+    #[ORM\OneToMany(targetEntity: File::class, mappedBy: 'onlineRegistrationSetting', orphanRemoval: true)]
     private Collection $introductionFiles;
 
-    #[ORM\OneToMany(mappedBy: 'onlineRegistrationSettingNewEnrolments', targetEntity: File::class, orphanRemoval: true)]
+    /** @var Collection<int, File> */
+    #[ORM\OneToMany(targetEntity: File::class, mappedBy: 'onlineRegistrationSettingNewEnrolments', orphanRemoval: true)]
     private Collection $introductionFilesNewEnrolments;
 
-    #[ORM\OneToMany(mappedBy: 'onlineRegistrationSettingsNewEnrolments', targetEntity: OnlineRegistrationOpeningPeriod::class, cascade: ['persist'], orphanRemoval: true)]
+    /** @var Collection<int, OnlineRegistrationOpeningPeriod> */
+    #[ORM\OneToMany(targetEntity: OnlineRegistrationOpeningPeriod::class, mappedBy: 'onlineRegistrationSettingsNewEnrolments', cascade: ['persist'], orphanRemoval: true)]
     private Collection $openingPeriodsNewEnrolments;
 
     public function __construct()
@@ -55,6 +62,12 @@ class OnlineRegistrationSettings
         return $this->id;
     }
 
+    public function setId(?int $id): self
+    {
+        $this->id = $id;
+        return $this;
+    }
+
     /**
      * @return Collection<int, OnlineRegistrationOpeningPeriod>
      */
@@ -63,6 +76,8 @@ class OnlineRegistrationSettings
         return $this->openingPeriods;
     }
 
+
+
     public function addOpeningPeriod(OnlineRegistrationOpeningPeriod $openingPeriod): self
     {
         if (!$this->openingPeriods->contains($openingPeriod)) {

+ 67 - 30
src/Entity/Organization/Organization.php

@@ -24,6 +24,7 @@ use App\Entity\Education\CriteriaNotation;
 use App\Entity\Education\Cycle;
 use App\Entity\Education\EducationCategory;
 use App\Entity\Education\EducationNotationConfig;
+use App\Entity\Education\EducationStudent;
 use App\Entity\Education\EducationTiming;
 use App\Entity\Education\PeriodNotation;
 use App\Entity\Message\Email;
@@ -84,17 +85,21 @@ class Organization
     private PrincipalTypeEnum $principalType;
 
     #[ORM\OneToOne(mappedBy: 'organization', cascade: ['persist', 'remove'])]
-    private Settings $settings;
+    private ?Settings $settings = null;
 
+    /** @var Collection<int, Access> */
     #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Access::class, cascade: ['persist'])]
     private Collection $accesses;
 
+    /** @var Collection<int, NetworkOrganization> */
     #[ORM\OneToMany(mappedBy: 'organization', targetEntity: NetworkOrganization::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $networkOrganizations;
 
+    /** @var Collection<int, NetworkOrganization> */
     #[ORM\OneToMany(mappedBy: 'parent', targetEntity: NetworkOrganization::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $networkOrganizationChildren;
 
+    /** @var Collection<int, EducationNotationConfig> */
     #[ORM\OneToMany(mappedBy: 'organization', targetEntity: EducationNotationConfig::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $educationNotationConfigs;
 
@@ -103,7 +108,7 @@ class Organization
     private Parameters $parameters;
 
     #[ORM\OneToOne(mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
-    private BillingSetting $billingSetting;
+    private ?BillingSetting $billingSetting = null;
 
     #[ORM\Column(type: 'text', nullable: true)]
     private ?string $description = null;
@@ -216,111 +221,143 @@ class Organization
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     private ?File $image = null;
 
+    /** @var Collection<int, TypeOfPractice> */
     #[ORM\ManyToMany(targetEntity: TypeOfPractice::class, mappedBy: 'organizations')]
     private Collection $typeOfPractices;
 
     #[ORM\Column(nullable: true)]
     private ?string $otherPractice = null;
 
+    /** @var Collection<int, ContactPoint> */
     #[ORM\ManyToMany(targetEntity: ContactPoint::class, mappedBy: 'organization', cascade: ['persist'], orphanRemoval: true)]
     private Collection $contactPoints;
 
+    /** @var Collection<int, BankAccount> */
     #[ORM\ManyToMany(targetEntity: BankAccount::class, inversedBy: 'organization')]
     #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id', unique: true)]
     #[ORM\InverseJoinColumn(name: 'bankAccount_id', referencedColumnName: 'id')]
     private Collection $bankAccounts;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: OrganizationAddressPostal::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, OrganizationAddressPostal> */
+    #[ORM\OneToMany(targetEntity: OrganizationAddressPostal::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $organizationAddressPostals;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: OrganizationLicence::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, OrganizationLicence> */
+    #[ORM\OneToMany(targetEntity: OrganizationLicence::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $organizationLicences;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: OrganizationArticle::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, OrganizationArticle> */
+    #[ORM\OneToMany(targetEntity: OrganizationArticle::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $organizationArticles;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Cycle::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Cycle> */
+    #[ORM\OneToMany(targetEntity: Cycle::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $cycles;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: EducationTiming::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EducationTiming> */
+    #[ORM\OneToMany(targetEntity: EducationTiming::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $educationTimings;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Subdomain::class, cascade: ['persist', 'remove'])]
+    /** @var Collection<int, Subdomain> */
+    #[ORM\OneToMany(targetEntity: Subdomain::class, mappedBy: 'organization', cascade: ['persist', 'remove'])]
     private Collection $subdomains;
 
     #[ORM\ManyToOne(inversedBy: 'organizationContacts')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     private ?Access $contactPerson;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: OrganizationHoliday::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, OrganizationHoliday> */
+    #[ORM\OneToMany(targetEntity: OrganizationHoliday::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $holidays;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Course::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Course> */
+    #[ORM\OneToMany(targetEntity: Course::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $courses;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: EducationalProject::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EducationalProject> */
+    #[ORM\OneToMany(targetEntity: EducationalProject::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $educationalProjects;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Event::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Event> */
+    #[ORM\OneToMany(targetEntity: Event::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $events;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Examen::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Examen> */
+    #[ORM\OneToMany(targetEntity: Examen::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $examens;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: CriteriaNotation::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, CriteriaNotation> */
+    #[ORM\OneToMany(targetEntity: CriteriaNotation::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $critereNotations;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: EducationCategory::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, EducationCategory> */
+    #[ORM\OneToMany(targetEntity: EducationCategory::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $educationCategories;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: PeriodNotation::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, PeriodNotation> */
+    #[ORM\OneToMany(targetEntity: PeriodNotation::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $periodNotations;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: File::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, File> */
+    #[ORM\OneToMany(targetEntity: File::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $files;
 
-    #[ORM\OneToMany(mappedBy: 'recipientOrganization', targetEntity: Notification::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Notification> */
+    #[ORM\OneToMany(targetEntity: Notification::class, mappedBy: 'recipientOrganization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $notifications;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Email::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Email> */
+    #[ORM\OneToMany(targetEntity: Email::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $emails;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Mail::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Mail> */
+    #[ORM\OneToMany(targetEntity: Mail::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $mails;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Sms::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Sms> */
+    #[ORM\OneToMany(targetEntity: Sms::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $sms;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Activity::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Activity> */
+    #[ORM\OneToMany(targetEntity: Activity::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $activities;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Jury::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Jury> */
+    #[ORM\OneToMany(targetEntity: Jury::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $juries;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Commission::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Commission> */
+    #[ORM\OneToMany(targetEntity: Commission::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $commissions;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Place::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Place> */
+    #[ORM\OneToMany(targetEntity: Place::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $places;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Attendance::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Attendance> */
+    #[ORM\OneToMany(targetEntity: Attendance::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $attendances;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Equipment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Equipment> */
+    #[ORM\OneToMany(targetEntity: Equipment::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $equipments;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Intangible::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Intangible> */
+    #[ORM\OneToMany(targetEntity: Intangible::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $intangibles;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Donor::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Donor> */
+    #[ORM\OneToMany(targetEntity: Donor::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $donors;
 
-    #[ORM\OneToMany(mappedBy: 'organization', targetEntity: Reward::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
+    /** @var Collection<int, Reward> */
+    #[ORM\OneToMany(targetEntity: Reward::class, mappedBy: 'organization', cascade: ['persist', 'remove'], orphanRemoval: true)]
     private Collection $rewards;
 
     //    #[ORM\OneToOne()]
     //    private OnlineRegistrationSettings $onlineRegistrationSettings;
 
+    /** @var Collection<int, Tagg> */
     #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'organizations', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_organization')]
     #[ORM\JoinColumn(name: 'organization_id', referencedColumnName: 'id')]

+ 1 - 1
src/Entity/Organization/OrganizationArticle.php

@@ -28,7 +28,7 @@ class OrganizationArticle
 
     #[ORM\ManyToOne(inversedBy: 'organizationArticles')]
     #[ORM\JoinColumn(nullable: true)]
-    private Organization $organization;
+    private ?Organization $organization = null;
 
     #[ORM\Column(length: 255)]
     private string $title;

+ 22 - 22
src/Entity/Organization/OrganizationIdentification.php

@@ -37,38 +37,38 @@ class OrganizationIdentification
     #[ORM\Column]
     private string $normalizedName;
 
-    #[ORM\Column]
-    private ?string $identifier;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?string $identifier = null;
 
-    #[ORM\Column]
-    private ?string $siretNumber;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?string $siretNumber = null;
 
-    #[ORM\Column]
-    private ?string $waldecNumber;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?string $waldecNumber = null;
 
-    #[ORM\Column]
-    private ?string $normalizedAddress;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?string $normalizedAddress = null;
 
-    #[ORM\Column]
-    private ?string $streetAddress;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?string $streetAddress = null;
 
-    #[ORM\Column]
-    private ?string $streetAddressSecond;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?string $streetAddressSecond = null;
 
-    #[ORM\Column]
-    private ?string $streetAddressThird;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?string $streetAddressThird = null;
 
-    #[ORM\Column]
-    private ?string $addressCity;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?string $addressCity = null;
 
-    #[ORM\Column]
-    private ?string $postalCode;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?string $postalCode = null;
 
-    #[ORM\Column]
-    private ?string $email;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?string $email = null;
 
-    #[ORM\Column]
-    private ?string $telphone;
+    #[ORM\Column(nullable: true, options: ['default' => null])]
+    private ?string $telphone = null;
 
     public function getId(): int
     {

+ 6 - 1
src/Entity/Organization/OrganizationLicence.php

@@ -19,16 +19,21 @@ class OrganizationLicence
     #[ORM\Column]
     #[ORM\GeneratedValue]
     private ?int $id = null;
+
     #[ORM\ManyToOne(inversedBy: 'organizationLicences')]
     #[ORM\JoinColumn(nullable: false)]
     private Organization $organization;
+
     #[ORM\ManyToOne(inversedBy: 'organizationLicences')]
     #[ORM\JoinColumn(nullable: false)]
-    private ?Access $licensee = null;
+    private Access $licensee;
+
     #[ORM\Column(length: 255, nullable: true)]
     private ?string $licenceNumber = null;
+
     #[ORM\Column(length: 255, nullable: true)]
     private ?string $categorie = null;
+
     #[ORM\Column(type: 'date', nullable: true)]
     private ?\DateTimeInterface $validityDate = null;
 

+ 8 - 6
src/Entity/Organization/Parameters.php

@@ -9,6 +9,7 @@ use ApiPlatform\Metadata\Get;
 use ApiPlatform\Metadata\Put;
 use App\Entity\Access\Access;
 use App\Entity\Core\File;
+use App\Entity\Education\EducationStudent;
 use App\Enum\Core\TimeZoneEnum;
 use App\Enum\Education\AdvancedEducationNotationTypeEnum;
 use App\Enum\Education\PeriodicityEnum;
@@ -47,8 +48,8 @@ class Parameters
     #[ORM\GeneratedValue]
     private ?int $id = null;
 
-    #[ORM\OneToOne(mappedBy: 'parameters', targetEntity: Organization::class)]
-    private Organization $organization;
+    #[ORM\OneToOne(targetEntity: Organization::class, mappedBy: 'parameters')]
+    private ?Organization $organization = null;
 
     #[ORM\Column(type: 'date', nullable: true)]
     private ?\DateTimeInterface $financialDate = null;
@@ -91,7 +92,8 @@ class Parameters
     #[ORM\Column(options: ['default' => false])]
     private bool $desactivateOpentalentSiteWeb = false;
 
-    #[ORM\OneToMany(mappedBy: 'publicationDirector', targetEntity: Access::class)]
+    /** @var Collection<int, Access> */
+    #[ORM\OneToMany(targetEntity: Access::class, mappedBy: 'publicationDirector')]
     private Collection $publicationDirectors;
 
     #[ORM\Column(length: 255, nullable: true, enumType: BulletinOutputEnum::class)]
@@ -131,7 +133,7 @@ class Parameters
     private ?SendToBulletinEnum $bulletinReceiver = SendToBulletinEnum::STUDENTS_AND_THEIR_GUARDIANS;
 
     #[ORM\Column(length: 255, nullable: false, enumType: BulletinCriteriaSortEnum::class, options: ['default' => BulletinCriteriaSortEnum::BY_CRITERIA_INSERT])]
-    private ?BulletinCriteriaSortEnum $bulletinCriteriaSort = null;
+    private BulletinCriteriaSortEnum $bulletinCriteriaSort;
 
     #[ORM\Column(length: 255, nullable: true)]
     private ?string $usernameSMS = null;
@@ -150,13 +152,13 @@ class Parameters
     private ?File $qrCode = null;
 
     #[ORM\Column(length: 255, enumType: TimeZoneEnum::class, options: ['default' => TimeZoneEnum::EUROPE_PARIS])]
-    private ?TimeZoneEnum $timezone = TimeZoneEnum::EUROPE_PARIS;
+    private TimeZoneEnum $timezone = TimeZoneEnum::EUROPE_PARIS;
 
     #[ORM\Column(length: 255, nullable: false, enumType: PeriodicityEnum::class, options: ['default' => PeriodicityEnum::ANNUAL])]
     private PeriodicityEnum $educationPeriodicity = PeriodicityEnum::ANNUAL;
 
     #[ORM\Column(length: 255, nullable: true, enumType: AdvancedEducationNotationTypeEnum::class, options: ['default' => AdvancedEducationNotationTypeEnum::BY_EDUCATION])]
-    private AdvancedEducationNotationTypeEnum $advancedEducationNotationType = AdvancedEducationNotationTypeEnum::BY_EDUCATION;
+    private ?AdvancedEducationNotationTypeEnum $advancedEducationNotationType = AdvancedEducationNotationTypeEnum::BY_EDUCATION;
 
     #[ORM\Column(options: ['default' => false])]
     private bool $sendAttendanceEmail = false;

+ 1 - 1
src/Entity/Organization/Settings.php

@@ -28,7 +28,7 @@ class Settings
 
     #[ORM\OneToOne(inversedBy: 'settings', cascade: ['persist', 'remove'])]
     #[ORM\JoinColumn(nullable: false)]
-    private ?Organization $organization = null;
+    private Organization $organization;
 
     #[ORM\Column(length: 50, enumType: SettingsProductEnum::class)]
     private SettingsProductEnum $product;

+ 1 - 0
src/Entity/Organization/Subdomain.php

@@ -57,6 +57,7 @@ class Subdomain
     private ?int $id = null;
 
     #[ORM\ManyToOne(inversedBy: 'subdomains')]
+    #[ORM\JoinColumn(nullable: false)]
     private Organization $organization;
 
     #[ORM\Column(type: 'string', length: 60, unique: true, nullable: false)]

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.