Browse Source

upgrade 3.1.2

Vincent 2 years ago
parent
commit
92462a4671
100 changed files with 739 additions and 1236 deletions
  1. 3 2
      composer.json
  2. 29 26
      config/api_platform/Access/access.yaml
  3. 4 1
      config/bundles.php
  4. 4 0
      config/packages/api_platform.yaml
  5. 23 0
      config/packages/framework.yaml
  6. 5 0
      config/packages/hautelook_alice.yaml
  7. 3 3
      config/packages/messenger.yaml
  8. 12 0
      config/packages/nelmio_alice.yaml
  9. 8 0
      config/packages/test/security.yaml
  10. 1 1
      config/routes.yaml
  11. 2 1
      config/services.yaml
  12. 0 0
      fixtures/.gitignore
  13. 1 0
      phpunit.xml.dist
  14. 4 4
      public/index.php
  15. 26 28
      src/ApiResources/Access/AdminAccess.php
  16. 12 13
      src/ApiResources/Cotisation/Cotisation.php
  17. 15 16
      src/ApiResources/Dolibarr/DolibarrAccount.php
  18. 6 7
      src/ApiResources/Dolibarr/DolibarrBill.php
  19. 6 6
      src/ApiResources/Dolibarr/DolibarrContract.php
  20. 6 6
      src/ApiResources/Dolibarr/DolibarrContractLine.php
  21. 16 16
      src/ApiResources/DownloadRequest.php
  22. 12 11
      src/ApiResources/Enum/Enum.php
  23. 19 9
      src/ApiResources/Export/LicenceCmf/LicenceCmfOrganizationER.php
  24. 12 11
      src/ApiResources/Mobyt/MobytUserStatus.php
  25. 18 25
      src/ApiResources/Profile/AccessProfile.php
  26. 6 19
      src/ApiResources/Profile/OrganizationProfile.php
  27. 17 17
      src/ApiResources/Utils/GpsCoordinate.php
  28. 10 13
      src/ApiResources/Utils/Siret.php
  29. 94 0
      src/Commands/DolibarrSyncCommand.php
  30. 0 69
      src/DataPersister/EntityDataPersister.php
  31. 0 28
      src/DataPersister/Organization/OrganizationDataPersister.php
  32. 0 28
      src/DataPersister/Organization/ParametersDataPersister.php
  33. 0 27
      src/DataPersister/Organization/SubdomainDataPersister.php
  34. 0 37
      src/DataProvider/Access/AdminAccessDataProvider.php
  35. 0 30
      src/DataProvider/Cotisation/CotisationDataProvider.php
  36. 0 32
      src/DataProvider/Dolibarr/DolibarrAccountDataProvider.php
  37. 0 31
      src/DataProvider/Mobyt/MobytUserStatusDataProvider.php
  38. 0 62
      src/DataProvider/Utils/GpsCoordinateSearchingDataProvider.php
  39. 0 34
      src/DataProvider/Utils/SiretDataProvider.php
  40. 18 131
      src/Entity/Access/Access.php
  41. 2 2
      src/Entity/Access/AccessCommunication.php
  42. 10 12
      src/Entity/Access/AccessFamily.php
  43. 2 2
      src/Entity/Access/AccessFictionalIntangible.php
  44. 2 2
      src/Entity/Access/AccessNetworkSetting.php
  45. 2 2
      src/Entity/Access/AccessSocial.php
  46. 2 2
      src/Entity/Access/FunctionType.php
  47. 6 12
      src/Entity/Access/OrganizationFunction.php
  48. 2 2
      src/Entity/Access/OrganizationResponsability.php
  49. 20 34
      src/Entity/Access/PersonalizedList.php
  50. 2 2
      src/Entity/AccessWish/AccessFamilyWish.php
  51. 2 2
      src/Entity/AccessWish/AccessTmp.php
  52. 2 2
      src/Entity/AccessWish/AccessWish.php
  53. 2 2
      src/Entity/AccessWish/DocumentWish.php
  54. 2 2
      src/Entity/AccessWish/EducationStudentWish.php
  55. 11 18
      src/Entity/Billing/AccessBilling.php
  56. 2 2
      src/Entity/Billing/AccessFictionalIntangible.php
  57. 4 8
      src/Entity/Billing/AccessIntangible.php
  58. 11 11
      src/Entity/Billing/AccessPayer.php
  59. 2 2
      src/Entity/Billing/BergerLevrault.php
  60. 11 10
      src/Entity/Billing/Bill.php
  61. 2 2
      src/Entity/Billing/BillAccessDetail.php
  62. 15 29
      src/Entity/Billing/BillAccounting.php
  63. 11 10
      src/Entity/Billing/BillCredit.php
  64. 2 2
      src/Entity/Billing/BillDebitBalance.php
  65. 11 12
      src/Entity/Billing/BillLine.php
  66. 2 2
      src/Entity/Billing/BillPayment.php
  67. 2 2
      src/Entity/Billing/BillPeriod.php
  68. 2 2
      src/Entity/Billing/BillTotalDetail.php
  69. 2 2
      src/Entity/Billing/BillingExportSetting.php
  70. 10 13
      src/Entity/Billing/BillingIntangibleExcludeDate.php
  71. 11 15
      src/Entity/Billing/BillingSetting.php
  72. 2 2
      src/Entity/Billing/BillingSettingRent.php
  73. 2 2
      src/Entity/Billing/Ciril.php
  74. 2 2
      src/Entity/Billing/EducationalProjectIntangible.php
  75. 11 11
      src/Entity/Billing/EducationalProjectPayer.php
  76. 10 13
      src/Entity/Billing/FamilyQuotient.php
  77. 2 2
      src/Entity/Billing/Jvs.php
  78. 2 2
      src/Entity/Billing/PayfipPaymentReturn.php
  79. 2 2
      src/Entity/Billing/Pes.php
  80. 2 2
      src/Entity/Billing/PesSetting.php
  81. 26 19
      src/Entity/Billing/ResidenceArea.php
  82. 2 2
      src/Entity/Billing/SddBank.php
  83. 2 2
      src/Entity/Billing/SddRegie.php
  84. 2 2
      src/Entity/Billing/SddTeneur.php
  85. 11 14
      src/Entity/Booking/Attendance.php
  86. 10 14
      src/Entity/Booking/AttendanceBooking.php
  87. 2 2
      src/Entity/Booking/CalendarSynchro.php
  88. 16 38
      src/Entity/Booking/Course.php
  89. 2 2
      src/Entity/Booking/CourseRecur.php
  90. 14 40
      src/Entity/Booking/EducationalProject.php
  91. 2 2
      src/Entity/Booking/EducationalProjectAge.php
  92. 2 2
      src/Entity/Booking/EducationalProjectPublic.php
  93. 2 2
      src/Entity/Booking/EducationalProjectRecur.php
  94. 16 40
      src/Entity/Booking/Event.php
  95. 2 2
      src/Entity/Booking/EventGender.php
  96. 2 2
      src/Entity/Booking/EventRecur.php
  97. 2 2
      src/Entity/Booking/EventReport.php
  98. 10 10
      src/Entity/Booking/EventUser.php
  99. 16 33
      src/Entity/Booking/Examen.php
  100. 2 2
      src/Entity/Booking/ExamenConvocation.php

+ 3 - 2
composer.json

@@ -8,10 +8,10 @@
         }
     ],
     "require": {
-        "php": ">=8.0",
+        "php": ">=8.1",
         "ext-ctype": "*",
         "ext-iconv": "*",
-        "api-platform/core": "^2.6",
+        "api-platform/core": "^3.1",
         "beberlei/doctrineextensions": "^1.3",
         "blackfire/php-sdk": "^1.23",
         "composer/package-versions-deprecated": "^1.11",
@@ -66,6 +66,7 @@
     },
     "require-dev": {
         "cyclonedx/cyclonedx-php-composer": "^3.4",
+        "hautelook/alice-bundle": "^2.11",
         "phpstan/phpstan": "^1.9",
         "phpunit/phpunit": "^9.6",
         "rector/rector": "^0.15.13",

+ 29 - 26
config/api_platform/Access/access.yaml

@@ -1,32 +1,35 @@
-App\Entity\Access\Access:
-  collectionOperations:
-    get: ~
+resources:
+  App\Entity\Access\Access:
+    - operations:
+        ApiPlatform\Metadata\GetCollection: ~
 
-    cget_students:
-      method: GET
-      path: '/students'
-      security: 'is_granted("ROLE_USERS_VIEW")'
+        ApiPlatform\Metadata\Get:
+          security: '(is_granted("ROLE_USERS_VIEW") and object.getOrganization().getId() == user.getOrganization().getId()) or (object.getId() == user.getId())'
 
-    cget_access_person_ref:
-      method: GET
-      path: '/access_people'
-      normalization_context:
-        groups: ['access_people_ref']
+        ApiPlatform\Metadata\Put:
+          security: 'is_granted("ROLE_USERS") or (object.getId() == user.getId())'
 
-  itemOperations:
-    get:
-      security: '(is_granted("ROLE_USERS_VIEW") and object.getOrganization().getId() == user.getOrganization().getId()) or (object.getId() == user.getId())'
+        ApiPlatform\Metadata\Delete: ~
 
-    get_access_address:
-      method: GET
-      path: '/access_addresses/{id}'
-      requirements:
-        id : '\d+'
-      normalization_context:
-        groups: ['access_address', 'address']]
-      security: 'object.getOrganization().getId() == user.getOrganization().getId()'
+    - operations:
+        ApiPlatform\Metadata\GetCollection:
+          name: 'cget_students'
+          uriTemplate: '/students'
+          security: 'is_granted("ROLE_USERS_VIEW")'
 
-    put:
-      security: 'is_granted("ROLE_USERS") or (object.getId() == user.getId())'
+    - operations:
+        ApiPlatform\Metadata\GetCollection:
+          name: 'cget_access_person_ref'
+          uriTemplate: '/access_people'
+          normalization_context:
+            groups: [ 'access_people_ref' ]
 
-    delete: ~
+    - operations:
+        ApiPlatform\Metadata\Get:
+          name: 'get_access_address'
+          uriTemplate: '/access_addresses/{id}'
+          requirements:
+            id: '\d+'
+          normalization_context:
+            groups: [ 'access_address', 'address' ] ]
+          security: 'object.getOrganization().getId() == user.getOrganization().getId()'

+ 4 - 1
config/bundles.php

@@ -8,7 +8,7 @@ return [
     Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
     Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
     Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
-    ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
+    ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
     Jb\Bundle\PhumborBundle\JbPhumborBundle::class => ['all' => true],
     Misd\PhoneNumberBundle\MisdPhoneNumberBundle::class => ['all' => true],
     Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
@@ -20,4 +20,7 @@ return [
     Symfony\Bundle\DebugBundle\DebugBundle::class => ['docker' => true],
     Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
     Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
+    Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['dev' => true, 'test' => true],
+    Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['dev' => true, 'test' => true],
+    Hautelook\AliceBundle\HautelookAliceBundle::class => ['dev' => true, 'test' => true],
 ];

+ 4 - 0
config/packages/api_platform.yaml

@@ -1,4 +1,6 @@
 api_platform:
+    title: 'Opentalent API'
+    version: '3.1'
     enable_swagger_ui: false
     enable_re_doc: false
     mapping:
@@ -14,3 +16,5 @@ api_platform:
         - '%kernel.project_dir%/src/Entity'
     defaults:
         pagination_items_per_page: 20
+        normalization_context:
+            skip_null_values: false

+ 23 - 0
config/packages/framework.yaml

@@ -18,6 +18,29 @@ framework:
     php_errors:
         log: true
 
+    http_client:
+        scoped_clients:
+            siret_checking:
+                base_uri: 'https://entreprise.data.gouv.fr/api/sirene/v3/etablissements/'
+            openstreetmap:
+                base_uri: 'https://nominatim.openstreetmap.org/'
+            dolibarr_client:
+                base_uri: '%env(DOLIBARR_API_BASE_URI)%'
+                headers:
+                    DOLAPIKEY: '%env(DOLIBARR_API_TOKEN)%'
+                    Accept: 'application/json'
+            typo3_client:
+                base_uri: '%env(TYPO3_BASE_URI)%'
+                headers:
+                    Content-Type: 'application/json'
+                    Accept: 'application/json'
+            mobyt_client:
+                base_uri: '%env(MOBYT_API_BASE_URI)%'
+                headers:
+                    Content-Type: 'application/json'
+            apiLegacyClient:
+                base_uri: '%env(API_LEG_BASE_URL)%'
+
 when@test:
     framework:
         test: true

+ 5 - 0
config/packages/hautelook_alice.yaml

@@ -0,0 +1,5 @@
+when@dev: &dev
+    hautelook_alice:
+        fixtures_path: fixtures
+
+when@test: *dev

+ 3 - 3
config/packages/messenger.yaml

@@ -5,9 +5,9 @@ framework:
 
         transports:
             # https://symfony.com/doc/current/messenger.html#transport-configuration
-            # async: '%env(MESSENGER_TRANSPORT_DSN)%'
-            # failed: 'doctrine://default?queue_name=failed'
-            # sync: 'sync://'
+            async: '%env(MESSENGER_TRANSPORT_DSN)%'
+            failed: '%env(MESSENGER_TRANSPORT_DSN)%?queue_name=failed'
+            sync: 'sync://'
 
         routing:
             # Route your messages to the transports

+ 12 - 0
config/packages/nelmio_alice.yaml

@@ -0,0 +1,12 @@
+when@dev: &dev
+    nelmio_alice:
+        functions_blacklist:
+            - 'current'
+            - 'shuffle'
+            - 'date'
+            - 'time'
+            - 'file'
+            - 'md5'
+            - 'sha1'
+
+when@test: *dev

+ 8 - 0
config/packages/test/security.yaml

@@ -0,0 +1,8 @@
+# override in api/config/packages/test/security.yaml for test env
+# improve the test suite speed
+security:
+  password_hashers:
+    App\Entity\Person\Person:
+      algorithm: md5
+      encode_as_base64: false
+      iterations: 0

+ 1 - 1
config/routes.yaml

@@ -10,7 +10,7 @@ login_check:
 
 swagger_ui:
   path: /docs
-  controller: api_platform.swagger.action.ui
+  controller: api_platform.swagger_ui.action
 
 # todo: comment ça s'articule avec le LocalStorage ça?
 ot_internal_secure_file_download:

+ 2 - 1
config/services.yaml

@@ -11,7 +11,8 @@ services:
             $opentalentConfig: '%kernel.project_dir%%env(OPENTALENT_CONFIG)%'
             $internalFilesUploadUri: '%env(INTERNAL_FILES_DOWNLOAD_URI)%'
             $bindfileBufferFile: '%env(BIND_FILE_BUFFER_FILE)%'
-            $contextAwareDataPersister: '@api_platform.doctrine.orm.data_persister'
+            $persistProcessor: '@api_platform.doctrine.orm.state.persist_processor'
+            $removeProcessor: '@api_platform.doctrine.orm.state.remove_processor'
             $opentalentNoReplyEmailAddress: 'noreply@opentalent.fr'
 
     # Logging: a shorter version of the default monolog line formatter

+ 0 - 0
fixtures/.gitignore


+ 1 - 0
phpunit.xml.dist

@@ -16,6 +16,7 @@
     <server name="SHELL_VERBOSITY" value="-1"/>
     <server name="SYMFONY_PHPUNIT_REMOVE" value=""/>
     <server name="SYMFONY_PHPUNIT_VERSION" value="9.4"/>
+    <server name="KERNEL_CLASS" value="App\Kernel" />
   </php>
   <testsuites>
     <testsuite name="Project Test Suite">

+ 4 - 4
public/index.php

@@ -24,7 +24,7 @@ if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) {
 }
 
 // If the header is set
-if (isset($_SERVER['HTTP_BLACKFIRETRIGGER'])) {
+//if (isset($_SERVER['HTTP_BLACKFIRETRIGGER'])) {
     $config = new \Blackfire\ClientConfiguration();
     $config->setClientId($_ENV['BLACKFIRE_CLIENT_ID']);
     $config->setClientToken($_ENV['BLACKFIRE_CLIENT_TOKEN']);
@@ -33,7 +33,7 @@ if (isset($_SERVER['HTTP_BLACKFIRETRIGGER'])) {
     $blackfire = new \Blackfire\Client($config);
     // then start the probe
     $probe = $blackfire->createProbe();
-}
+//}
 
 $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
 $request = Request::createFromGlobals();
@@ -42,10 +42,10 @@ $response->send();
 $kernel->terminate($request, $response);
 
 // If the header is set
-if (isset($_SERVER['HTTP_BLACKFIRETRIGGER'])) {
+//if (isset($_SERVER['HTTP_BLACKFIRETRIGGER'])) {
     // When runtime shuts down, let's finish the profiling session
     register_shutdown_function(function () use ($blackfire, $probe) {
         // See the PHP SDK documentation for using the $profile object
         $profile = $blackfire->endProbe($probe);
     });
-}
+//}

+ 26 - 28
src/ApiResources/Access/AdminAccess.php

@@ -1,30 +1,32 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Access;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Put;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
 use App\ApiResources\ApiResourcesInterface;
+use App\State\Processor\Access\AdminAccessProcessor;
+use App\State\Provider\Access\AdminAccessProvider;
 use JetBrains\PhpStorm\Pure;
 use Symfony\Component\Validator\Constraints as Assert;
-
 /**
  * Classe resource qui contient les champs d'un compte admin
  */
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        'get' => [
-            'method' => 'GET',
-            'path' => '/admin/{id}',
-            'defaults' => ['id' => 0]
-        ],
-        'put' => [
-            'method' => 'PUT',
-            'path' => '/admin/{id}',
-            'defaults' => ['id' => 0]
-        ]
+    operations: [
+        new Get(
+            uriTemplate: '/admin/{id}',
+            defaults: ['id' => 0],
+            provider: AdminAccessProvider::class
+        ),
+        new Put(
+            uriTemplate: '/admin/{id}',
+            defaults: ['id' => 0],
+            processor: AdminAccessProcessor::class
+        )
     ]
 )]
 class AdminAccess implements ApiResourcesInterface
@@ -37,45 +39,41 @@ class AdminAccess implements ApiResourcesInterface
     #[Assert\Email(message: 'invalid-email-format', mode: 'strict')]
     private ?string $email = null;
 
-
-    #[Pure] public function __construct()
+    #[Pure]
+    public function __construct()
     {
     }
 
-    public function getId(): ?int
+    public function getId() : ?int
     {
         return $this->id;
     }
 
-    public function setId(?int $id): self
+    public function setId(?int $id) : self
     {
         $this->id = $id;
-
         return $this;
     }
 
-    public function getUsername(): ?string
+    public function getUsername() : ?string
     {
         return $this->username;
     }
 
-    public function setUsername(?string $username): self
+    public function setUsername(?string $username) : self
     {
         $this->username = $username;
-
         return $this;
     }
 
-
-    public function getEmail(): ?string
+    public function getEmail() : ?string
     {
         return $this->email;
     }
 
-    public function setEmail(?string $email): self
+    public function setEmail(?string $email) : self
     {
         $this->email = $email;
-
         return $this;
     }
 }

+ 12 - 13
src/ApiResources/Cotisation/Cotisation.php

@@ -1,25 +1,25 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Cotisation;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
 use App\ApiResources\ApiResourcesInterface;
-use Symfony\Component\Serializer\Annotation\Groups;
+use App\State\Provider\Cotisation\CotisationProvider;
 use Symfony\Component\Validator\Constraints as Assert;
 
 /**
  * Classe resource qui contient les informations des cotisations de la 5.9
  */
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        'get' => [
-            'method' => 'GET',
-            'path' => '/cotisations/{organizationId}',
-            'security' => 'is_granted("ROLE_COTISATION", object) and object.getOrganizationId() == user.getOrganization().getId()',
-        ]
+    operations: [
+        new Get(
+            uriTemplate: '/cotisations/{organizationId}',
+            security: 'is_granted("ROLE_COTISATION", object) and object.getOrganizationId() == user.getOrganization().getId()',
+            provider: CotisationProvider::class
+        )
     ]
 )]
 class Cotisation implements ApiResourcesInterface
@@ -27,7 +27,7 @@ class Cotisation implements ApiResourcesInterface
     #[ApiProperty(identifier: true)]
     private int $organizationId;
 
-    #[Assert\Choice(callback: ['\App\Enum\Cotisation\AlertStateEnum', 'toArray'], message: 'invalid-alert-state-enum')]
+    #[Assert\Choice(callback: ['\\App\\Enum\\Cotisation\\AlertStateEnum', 'toArray'], message: 'invalid-alert-state-enum')]
     private ?string $alertState = null;
 
     private ?int $cotisationYear = null;
@@ -62,7 +62,6 @@ class Cotisation implements ApiResourcesInterface
     public function setCotisationYear(?int $cotisationYear): self
     {
         $this->cotisationYear = $cotisationYear;
-
         return $this;
     }
 }

+ 15 - 16
src/ApiResources/Dolibarr/DolibarrAccount.php

@@ -1,11 +1,14 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Dolibarr;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Link;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
 use App\ApiResources\ApiResourcesInterface;
+use App\State\Provider\Dolibarr\DolibarrAccountProvider;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use JetBrains\PhpStorm\Pure;
@@ -16,23 +19,19 @@ use Symfony\Component\Serializer\Annotation\Groups;
  * (aussi nommé 'ThirdParty' ou 'Society' dans dolibarr)
  */
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        'get' => [
-            'security' => '(is_granted("ROLE_ADMIN_CORE") or 
+    operations: [
+        new Get(
+            security: '(is_granted("ROLE_ADMIN_CORE") or 
                             is_granted("ROLE_ADMINISTRATIF_MANAGER_CORE") or 
                             is_granted("ROLE_PEDAGOGICS_MANAGER_CORE") or 
                             is_granted("ROLE_FINANCIAL_MANAGER_CORE")
                            ) and object.getOrganizationId() == user.getOrganization().getId()',
-            'method' => 'GET',
-            'path' => '/dolibarr/account/{organizationId}',
-            'requirements' => ['organizationId' => '\d+'],
-            'normalization_context' => [
-                'groups' => ['dolibarr_get']
-            ],
-        ],
-    ],
-    compositeIdentifier: false,
+            uriTemplate: '/dolibarr/account/{organizationId}',
+            requirements: ['organizationId' => '\\d+'],
+            normalizationContext: ['groups' => ['dolibarr_get']],
+            provider: DolibarrAccountProvider::class
+        )
+    ]
 )]
 class DolibarrAccount implements ApiResourcesInterface
 {

+ 6 - 7
src/ApiResources/Dolibarr/DolibarrBill.php

@@ -1,10 +1,11 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Dolibarr;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
 use App\ApiResources\ApiResourcesInterface;
 use Symfony\Component\Serializer\Annotation\Groups;
 
@@ -12,9 +13,8 @@ use Symfony\Component\Serializer\Annotation\Groups;
  * Bill of a society, retrieved from dolibarr
  */
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        'get'
+    operations: [
+        new Get()
     ]
 )]
 class DolibarrBill implements ApiResourcesInterface
@@ -133,5 +133,4 @@ class DolibarrBill implements ApiResourcesInterface
         $this->paid = $paid;
         return $this;
     }
-
 }

+ 6 - 6
src/ApiResources/Dolibarr/DolibarrContract.php

@@ -1,10 +1,11 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Dolibarr;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
 use App\ApiResources\ApiResourcesInterface;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
@@ -15,9 +16,8 @@ use Symfony\Component\Serializer\Annotation\Groups;
  * Contract of a society, retrieved from dolibarr
  */
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        'get'
+    operations: [
+        new Get()
     ]
 )]
 class DolibarrContract implements ApiResourcesInterface

+ 6 - 6
src/ApiResources/Dolibarr/DolibarrContractLine.php

@@ -1,10 +1,11 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Dolibarr;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
 use App\ApiResources\ApiResourcesInterface;
 use Symfony\Component\Serializer\Annotation\Groups;
 
@@ -12,9 +13,8 @@ use Symfony\Component\Serializer\Annotation\Groups;
  *  Lines (services) included in a society contract, as retrieved from dolibarr
  */
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        'get'
+    operations: [
+        new Get()
     ]
 )]
 class DolibarrContractLine implements ApiResourcesInterface

+ 16 - 16
src/ApiResources/DownloadRequest.php

@@ -1,25 +1,26 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Link;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
+use App\State\Provider\Core\DownloadRequestProvider;
 
 /**
  * A request for a file from the LocalStorage
  */
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        'get' => [
-            'security' => 'is_granted("ROLE_FILE")',
-            'method' => 'GET',
-            'path' => '/download/{fileId}',
-            'requirements' => ['fileId' => '\d+']
-        ],
-    ],
-    compositeIdentifier: false,
+    operations: [
+        new Get(
+            security: 'is_granted("ROLE_FILE")',
+            uriTemplate: '/download/{fileId}',
+            requirements: ['fileId' => '\\d+'],
+            provider: DownloadRequestProvider::class
+        )
+    ]
 )]
 class DownloadRequest
 {
@@ -29,15 +30,14 @@ class DownloadRequest
     /**
      * @return int
      */
-    public function getFileId(): int
+    public function getFileId() : int
     {
         return $this->fileId;
     }
-
     /**
      * @param int $fileId
      */
-    public function setFileId(int $fileId): void
+    public function setFileId(int $fileId) : void
     {
         $this->fileId = $fileId;
     }

+ 12 - 11
src/ApiResources/Enum/Enum.php

@@ -1,33 +1,36 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Enum;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
 use App\ApiResources\ApiResourcesInterface;
+use App\State\Provider\Enum\EnumProvider;
 
 /**
  * Classe resource qui contient les champs disponibles lors d'un appel à enum.
  */
 #[ApiResource(
-    collectionOperations: [],
-    itemOperations: [
-        'get' => [
-            'method' => 'GET',
-            'path' => '/enum/{name}'
-        ]
+    operations: [
+        new Get(
+            uriTemplate: '/enum/{name}',
+            provider: EnumProvider::class
+        )
     ]
 )]
 class Enum implements ApiResourcesInterface
 {
     #[ApiProperty(identifier: true)]
     private string $name;
+
     private array $items = [];
 
     public function __construct()
     {
     }
+
     public function getName(): string
     {
         return $this->name;
@@ -36,11 +39,9 @@ class Enum implements ApiResourcesInterface
     public function setName(string $name): self
     {
         $this->name = $name;
-
         return $this;
     }
 
-
     public function setItems(array $items): self
     {
         $this->items = $items;

+ 19 - 9
src/ApiResources/Export/LicenceCmf/LicenceCmfOrganizationER.php

@@ -1,10 +1,16 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Export\LicenceCmf;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Post;
+use ApiPlatform\Metadata\Delete;
+use ApiPlatform\Metadata\Patch;
+use ApiPlatform\Metadata\Put;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\ApiResources\Export\ExportRequest;
+use App\State\Processor\Export\LicenceCmf\ExportRequestProcessor;
 use Symfony\Component\Validator\Constraints as Assert;
 
 /**
@@ -16,14 +22,18 @@ use Symfony\Component\Validator\Constraints as Assert;
  *   {"organizationId" : 1}
  */
 #[ApiResource(
-    collectionOperations: [
-        'post' => [
-            'security' => '(is_granted("ROLE_ADMIN_CORE") or is_granted("ROLE_ADMINISTRATIF_MANAGER_CORE"))',
-            'method' => 'POST',
-            'path' => '/cmf-licence/organization',
-        ],
+    operations: [
+        new Get(),
+        new Put(),
+        new Patch(),
+        new Delete(),
+        new Post(
+            security: '(is_granted("ROLE_ADMIN_CORE") or is_granted("ROLE_ADMINISTRATIF_MANAGER_CORE"))',
+            uriTemplate: '/cmf-licence/organization'
+        ),
     ],
-    routePrefix: '/export'
+    routePrefix: '/export',
+    processor: ExportRequestProcessor::class
 )]
 class LicenceCmfOrganizationER extends ExportRequest
 {

+ 12 - 11
src/ApiResources/Mobyt/MobytUserStatus.php

@@ -1,29 +1,30 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Mobyt;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
 use App\ApiResources\ApiResourcesInterface;
+use App\State\Provider\Mobyt\MobytUserStatusProvider;
 
 /**
  * Statut de l'utilisateur Mobyt correspondant à l'organization donnée en paramètre
  */
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        'get' => [
-            'security' => '(is_granted("ROLE_ADMIN_CORE") or
+    operations: [
+        new Get(
+            security: '(is_granted("ROLE_ADMIN_CORE") or
                             is_granted("ROLE_ADMINISTRATIF_MANAGER_CORE") or
                             is_granted("ROLE_PEDAGOGICS_MANAGER_CORE") or
                             is_granted("ROLE_FINANCIAL_MANAGER_CORE") or
                             is_granted("ROLE_TEXTO")
                            ) and object.getOrganizationId() == user.getOrganization().getId()',
-            'method' => 'GET',
-            'path' => '/mobyt/status/{organizationId}',
-            'requirements' => ['organizationId' => '\d+'],
-        ],
+            uriTemplate: '/mobyt/status/{organizationId}',
+            requirements: ['organizationId' => '\\d+'],
+            provider: MobytUserStatusProvider::class
+        )
     ]
 )]
 class MobytUserStatus implements ApiResourcesInterface

+ 18 - 25
src/ApiResources/Profile/AccessProfile.php

@@ -1,11 +1,16 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Profile;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
+use ApiPlatform\Metadata\Put;
 use App\ApiResources\ApiResourcesInterface;
+use App\State\Processor\Access\AdminAccessProcessor;
+use App\State\Provider\Access\AccessProfileProvider;
+use App\State\Provider\Access\AdminAccessProvider;
 use JetBrains\PhpStorm\Pure;
 use Symfony\Component\Serializer\Annotation\Groups;
 use Doctrine\Common\Collections\ArrayCollection;
@@ -15,16 +20,13 @@ use Doctrine\Common\Collections\Collection;
  * Classe resource qui contient les champs disponibles lors d'un appel à my_profile.
  */
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        'get' => [
-            'normalization_context' => [
-                'groups' => ['access_profile_read']
-            ],
-            'method' => 'GET',
-            'path' => '/my_profile/{id}',
-            'defaults' => ['id' => 0]
-        ]
+    operations: [
+        new Get(
+            normalizationContext: ['groups' => ['access_profile_read:output']],
+            uriTemplate: '/my_profile/{id}',
+            defaults: ['id' => 0],
+            provider: AccessProfileProvider::class
+        )
     ]
 )]
 class AccessProfile implements ApiResourcesInterface
@@ -58,7 +60,7 @@ class AccessProfile implements ApiResourcesInterface
     private ?int $activityYear = null;
 
     #[Groups('access_profile_read')]
-    private ?array $historical=[];
+    private ?array $historical = [];
 
     #[Groups('access_profile_read')]
     private bool $isGuardian = false;
@@ -78,7 +80,8 @@ class AccessProfile implements ApiResourcesInterface
     #[Groups('access_profile_read')]
     private ?AccessProfile $originalAccess = null;
 
-    #[Pure] public function __construct()
+    #[Pure]
+    public function __construct()
     {
         $this->multiAccesses = new ArrayCollection();
         $this->familyAccesses = new ArrayCollection();
@@ -92,7 +95,6 @@ class AccessProfile implements ApiResourcesInterface
     public function setId(?int $id): self
     {
         $this->id = $id;
-
         return $this;
     }
 
@@ -104,7 +106,6 @@ class AccessProfile implements ApiResourcesInterface
     public function setIsAdminAccess(bool $isAdminAccess): self
     {
         $this->isAdminAccess = $isAdminAccess;
-
         return $this;
     }
 
@@ -116,7 +117,6 @@ class AccessProfile implements ApiResourcesInterface
     public function setIsSuperAdminAccess(bool $isSuperAdminAccess): self
     {
         $this->isSuperAdminAccess = $isSuperAdminAccess;
-
         return $this;
     }
 
@@ -128,7 +128,6 @@ class AccessProfile implements ApiResourcesInterface
     public function setOrganization(?OrganizationProfile $organization): self
     {
         $this->organization = $organization;
-
         return $this;
     }
 
@@ -140,7 +139,6 @@ class AccessProfile implements ApiResourcesInterface
     public function setName(?string $name): self
     {
         $this->name = $name;
-
         return $this;
     }
 
@@ -152,7 +150,6 @@ class AccessProfile implements ApiResourcesInterface
     public function setGivenName(?string $givenName): self
     {
         $this->givenName = $givenName;
-
         return $this;
     }
 
@@ -181,7 +178,6 @@ class AccessProfile implements ApiResourcesInterface
     public function getRoles(): array
     {
         $roles = $this->roles;
-
         return array_unique($roles);
     }
 
@@ -199,7 +195,6 @@ class AccessProfile implements ApiResourcesInterface
     public function setIsGuardian(bool $isGuardian): self
     {
         $this->isGuardian = $isGuardian;
-
         return $this;
     }
 
@@ -211,7 +206,6 @@ class AccessProfile implements ApiResourcesInterface
     public function setIsPayor(bool $isPayor): self
     {
         $this->isPayor = $isPayor;
-
         return $this;
     }
 
@@ -272,7 +266,6 @@ class AccessProfile implements ApiResourcesInterface
     public function setActivityYear(?int $activityYear): self
     {
         $this->activityYear = $activityYear;
-
         return $this;
     }
 

+ 6 - 19
src/ApiResources/Profile/OrganizationProfile.php

@@ -1,21 +1,20 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Profile;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
+use ApiPlatform\Metadata\Get;
 use App\ApiResources\ApiResourcesInterface;
 use Symfony\Component\Serializer\Annotation\Groups;
-use ApiPlatform\Core\Annotation\ApiResource;
 
 /**
  * Classe resource qui contient les champs relatifs aux organizations présentent dans la requete my_profile.
  */
-
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        'get'
+    operations: [
+        new Get()
     ]
 )]
 class OrganizationProfile implements ApiResourcesInterface
@@ -65,7 +64,6 @@ class OrganizationProfile implements ApiResourcesInterface
     public function setId(?int $id): self
     {
         $this->id = $id;
-
         return $this;
     }
 
@@ -77,7 +75,6 @@ class OrganizationProfile implements ApiResourcesInterface
     public function setName(?string $name): self
     {
         $this->name = $name;
-
         return $this;
     }
 
@@ -89,7 +86,6 @@ class OrganizationProfile implements ApiResourcesInterface
     public function setProduct(?string $product): self
     {
         $this->product = $product;
-
         return $this;
     }
 
@@ -101,7 +97,6 @@ class OrganizationProfile implements ApiResourcesInterface
     public function setLegalStatus(?string $legalStatus): self
     {
         $this->legalStatus = $legalStatus;
-
         return $this;
     }
 
@@ -113,7 +108,6 @@ class OrganizationProfile implements ApiResourcesInterface
     public function addNetwork(?string $network): self
     {
         $this->networks[] = $network;
-
         return $this;
     }
 
@@ -125,7 +119,6 @@ class OrganizationProfile implements ApiResourcesInterface
     public function setWebsite(?string $website): self
     {
         $this->website = $website;
-
         return $this;
     }
 
@@ -138,7 +131,6 @@ class OrganizationProfile implements ApiResourcesInterface
     public function setModules(array $modules): self
     {
         $this->modules = $modules;
-
         return $this;
     }
 
@@ -150,7 +142,6 @@ class OrganizationProfile implements ApiResourcesInterface
     public function setHasChildren(bool $hasChildren): self
     {
         $this->hasChildren = $hasChildren;
-
         return $this;
     }
 
@@ -173,7 +164,6 @@ class OrganizationProfile implements ApiResourcesInterface
     public function setShowAdherentList(bool $showAdherentList): self
     {
         $this->showAdherentList = $showAdherentList;
-
         return $this;
     }
 
@@ -185,11 +175,9 @@ class OrganizationProfile implements ApiResourcesInterface
     public function setCurrentYear(?int $currentYear): self
     {
         $this->currentYear = $currentYear;
-
         return $this;
     }
 
-
     public function getParametersId(): ?int
     {
         return $this->parametersId;
@@ -198,7 +186,6 @@ class OrganizationProfile implements ApiResourcesInterface
     public function setParametersId(?int $parametersId): self
     {
         $this->parametersId = $parametersId;
-
         return $this;
     }
 }

+ 17 - 17
src/ApiResources/Utils/GpsCoordinate.php

@@ -1,29 +1,25 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Utils;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\Link;
+use ApiPlatform\Metadata\GetCollection;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiProperty;
 use App\ApiResources\ApiResourcesInterface;
+use App\State\Provider\Utils\GpsCoordinateSearchingProvider;
 
 /**
  * Classe resource qui contient les champs de recherche des coordonnées GPS d'une adresse
  */
 #[ApiResource(
-    collectionOperations: [
-        'get' => [
-            'method' => 'GET',
-            'path' => '/gps-coordinate-searching'
-        ]
-    ],
-    itemOperations: [
-        'get' => [
-            'method' => 'GET',
-            'path' => '/gps-coordinate-reverse/{latitude}/{longitude}'
-        ]
-    ],
-    compositeIdentifier: false
+    provider: GpsCoordinateSearchingProvider::class,
+    operations: [
+        new Get(uriTemplate: '/gps-coordinate-reverse/{latitude}/{longitude}'),
+        new GetCollection(uriTemplate: '/gps-coordinate-searching')
+    ]
 )]
 class GpsCoordinate implements ApiResourcesInterface
 {
@@ -34,10 +30,15 @@ class GpsCoordinate implements ApiResourcesInterface
     private float $longitude;
 
     private ?string $streetAddress = null;
+
     private ?string $streetAddressSecond = null;
+
     private ?string $streetAddressThird = null;
+
     private ?string $cp = null;
+
     private ?string $city = null;
+
     private ?string $country = null;
 
     public function __construct()
@@ -57,7 +58,6 @@ class GpsCoordinate implements ApiResourcesInterface
         return $this->latitude;
     }
 
-
     public function getLongitude(): ?float
     {
         return $this->longitude;

+ 10 - 13
src/ApiResources/Utils/Siret.php

@@ -1,23 +1,23 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\ApiResources\Utils;
 
-use ApiPlatform\Core\Annotation\ApiProperty;
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\ApiProperty;
 use App\ApiResources\ApiResourcesInterface;
+use App\State\Provider\Utils\SiretProvider;
 
 /**
  * Classe resource qui contient les champs de vérification d'un siret
  */
-
 #[ApiResource(
-    collectionOperations: [],
-    itemOperations: [
-        'get' => [
-            'method' => 'GET',
-            'path' => '/siret-checking/{number}'
-        ]
+    operations: [
+        new Get(
+            uriTemplate: '/siret-checking/{number}',
+            provider: SiretProvider::class
+        )
     ]
 )]
 class Siret implements ApiResourcesInterface
@@ -27,9 +27,6 @@ class Siret implements ApiResourcesInterface
 
     private bool $isCorrect = false;
 
-    public function __construct()
-    {
-    }
     public function getNumber(): ?string
     {
         return $this->number;

+ 94 - 0
src/Commands/DolibarrSyncCommand.php

@@ -0,0 +1,94 @@
+<?php
+
+namespace App\Commands;
+
+use App\Service\Dolibarr\DolibarrSyncService;
+use Symfony\Component\Console\Attribute\AsCommand;
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Command\LockableTrait;
+use Symfony\Component\Console\Helper\ProgressBar;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Input\InputOption;
+use Symfony\Component\Console\Output\OutputInterface;
+
+#[AsCommand(
+    name: 'ot:dolibarr-sync',
+    description: 'Push the latest data from the Opentalent DB to dolibarr'
+)]
+class DolibarrSyncCommand extends Command
+{
+    use LockableTrait;
+
+    /**
+     * How many operations are shown each time the preview choice is made
+     */
+    const PREVIEW_CHUNK = 20;
+
+    public function __construct(
+        private DolibarrSyncService $dolibarrSyncService
+    ) {
+        parent::__construct();
+    }
+
+    protected function configure()
+    {
+        $this->addOption(
+            'preview',
+            'p',
+            InputOption::VALUE_NONE,
+            'Only preview the sync operations instead of executing it'
+        );
+    }
+
+    protected function execute(InputInterface $input, OutputInterface $output): int
+    {
+        if (!$this->lock()) {
+            $output->writeln('The command is already running in another process.');
+            return Command::SUCCESS;
+        }
+
+        $output->writeln("Start the synchronization");
+        $t0 = microtime(true);
+        $output->writeln("Scanning...");
+
+        $progressBar = new ProgressBar($output, 0);
+        $progressCallback = function($i, $total) use ($progressBar) {
+            if (!$progressBar->getMaxSteps() !== $total) {
+                $progressBar->setMaxSteps($total);
+            }
+            $progressBar->setProgress($i);
+        };
+
+        $operations = $this->dolibarrSyncService->scan($progressCallback);
+
+        $t1 = microtime(true);
+        $output->writeln("Scan lasted " . ($t1 - $t0) . " sec.");
+
+        $output->writeln(count($operations) . " operations to be executed");
+
+        if ($input->getOption('preview')) {
+            $output->writeln("-- Preview --");
+            foreach ($operations as $i => $iValue) {
+                $output->writeln($i . '. ' . $iValue->getLabel());
+                foreach ($iValue->getChangeLog() as $message) {
+                    $output->writeln('   ' . $message);
+                }
+            }
+        } else {
+            $t0 = microtime(true);
+            $output->writeln("Executing...");
+
+            $operations = $this->dolibarrSyncService->execute($operations, $progressCallback);
+
+            $successes = count(array_filter($operations, function ($o) { return $o->getStatus() === $o::STATUS_DONE; } ));
+            $errors = count(array_filter($operations, function ($o) { return $o->getStatus() === $o::STATUS_ERROR; } ));
+            $output->writeln($successes . " operations successfully executed");
+            $output->writeln($errors . " errors");
+
+            $t1 = microtime(true);
+            $output->writeln("Execution lasted " . ($t1 - $t0) . " sec.");
+        }
+
+        return Command::SUCCESS;
+    }
+}

+ 0 - 69
src/DataPersister/EntityDataPersister.php

@@ -1,69 +0,0 @@
-<?php
-
-namespace App\DataPersister;
-
-use ApiPlatform\Core\DataPersister\ContextAwareDataPersisterInterface;
-use App\Service\OnChange\OnChangeContext;
-use App\Service\OnChange\OnChangeDefault;
-use App\Service\OnChange\OnChangeInterface;
-use Symfony\Contracts\Service\Attribute\Required;
-
-/**
- * Classe de base pour les DataPersister classiques, proposant des hook pre et post persist,
- * ainsi que certaines méthodes liées au contexte de la mise à jour.
- */
-class EntityDataPersister implements ContextAwareDataPersisterInterface
-{
-    // <-- dependencies injections
-    protected ContextAwareDataPersisterInterface $contextAwareDataPersister;
-    protected OnChangeInterface $onChange;
-
-    #[Required]
-    public function setContextAwareDataPersister(ContextAwareDataPersisterInterface $contextAwareDataPersister): void {$this->contextAwareDataPersister = $contextAwareDataPersister;}
-
-    public function __construct(
-        OnChangeDefault $onChange
-    ) {
-        $this->onChange = $onChange;
-    }
-    // dependencies injections -->
-
-    public function supports($data, array $context = []): bool
-    {
-        return false;
-    }
-
-    /**
-     * Persist l'entité et déclenche les différents hooks de la classe OnChangeInterface définie par le data persister
-     *
-     * @param mixed $data
-     * @param array $context
-     * @return object
-     */
-    public function persist($data, array $context = []): object
-    {
-        $onChangeContext = new OnChangeContext($context);
-
-        $this->onChange->validate($data, $onChangeContext);
-
-        $data = $this->onChange->preProcess($data, $onChangeContext);
-
-        $this->onChange->beforeChange($data, $onChangeContext);
-
-        $result = $this->contextAwareDataPersister->persist($data, $context);
-
-        $this->onChange->onChange($data, $onChangeContext);
-
-        return $result;
-    }
-
-    /**
-     * La fonction native 'remove' n'est pas supportée par défaut, la réimplémenter au besoin
-     *
-     * @param mixed $data
-     * @param array $context
-     */
-    public function remove($data, array $context = []): void {
-        throw new \RuntimeException('not supported', 500);
-    }
-}

+ 0 - 28
src/DataPersister/Organization/OrganizationDataPersister.php

@@ -1,28 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace App\DataPersister\Organization;
-
-use App\DataPersister\EntityDataPersister;
-use App\Entity\Organization\Organization;
-use App\Service\OnChange\Organization\OnOrganizationChange;
-use JetBrains\PhpStorm\Pure;
-
-/**
- * Classe OrganizationDataPersister qui est un custom dataPersister gérant la resource Organization
- */
-class OrganizationDataPersister extends EntityDataPersister
-{
-    #[Pure]
-    public function __construct(
-        OnOrganizationChange $onChange
-    )
-    {
-        parent::__construct($onChange);
-    }
-
-    public function supports($data, array $context = []): bool
-    {
-        return $data instanceof Organization;
-    }
-}

+ 0 - 28
src/DataPersister/Organization/ParametersDataPersister.php

@@ -1,28 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace App\DataPersister\Organization;
-
-use App\DataPersister\EntityDataPersister;
-use App\Entity\Organization\Parameters;
-use App\Service\OnChange\Organization\OnParametersChange;
-use JetBrains\PhpStorm\Pure;
-
-/**
- * Classe ParametersDataPersister qui est un custom dataPersister gérant la resource Parameters
- */
-class ParametersDataPersister extends EntityDataPersister
-{
-    #[Pure]
-    public function __construct(
-        OnParametersChange $onChange
-    )
-    {
-        parent::__construct($onChange);
-    }
-
-    public function supports($data, array $context = []): bool
-    {
-        return $data instanceof Parameters;
-    }
-}

+ 0 - 27
src/DataPersister/Organization/SubdomainDataPersister.php

@@ -1,27 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace App\DataPersister\Organization;
-
-use App\DataPersister\EntityDataPersister;
-use App\Entity\Organization\Subdomain;
-use App\Service\OnChange\Organization\OnSubdomainChange;
-use JetBrains\PhpStorm\Pure;
-
-/**
- * Ccustom dataPersister gérant la resource Subdomain
- */
-class SubdomainDataPersister extends EntityDataPersister
-{
-    #[Pure]
-    public function __construct(
-        OnSubdomainChange $onChange
-    ) {
-        parent::__construct($onChange);
-    }
-
-    public function supports($data, array $context = []): bool
-    {
-        return $data instanceof Subdomain;
-    }
-}

+ 0 - 37
src/DataProvider/Access/AdminAccessDataProvider.php

@@ -1,37 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace App\DataProvider\Access;
-
-use ApiPlatform\Core\DataProvider\ItemDataProviderInterface;
-use ApiPlatform\Core\DataProvider\RestrictedDataProviderInterface;
-use App\ApiResources\Access\AdminAccess;
-use App\Entity\Access\Access;
-use App\Service\Access\AdminAccessUtils;
-use Symfony\Bundle\SecurityBundle\Security;
-
-/**
- * Class AccessProfileDataProvider : custom provider pour la resource AdminAccess
- * @package App\DataProvider\Access
- */
-final class AdminAccessDataProvider implements ItemDataProviderInterface, RestrictedDataProviderInterface
-{
-    public function __construct(
-        private Security $security,
-        private AdminAccessUtils $adminAccessUtils
-    )
-    { }
-
-    public function supports(string $resourceClass, string $operationName = null, array $context = []): bool
-    {
-        return AdminAccess::class === $resourceClass;
-    }
-
-    public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?AdminAccess
-    {
-        /** @var Access $access */
-        $access = $this->security->getUser();
-        return $this->adminAccessUtils->getAdminAccess($access->getOrganization());
-    }
-}

+ 0 - 30
src/DataProvider/Cotisation/CotisationDataProvider.php

@@ -1,30 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace App\DataProvider\Cotisation;
-
-use ApiPlatform\Core\DataProvider\ItemDataProviderInterface;
-use ApiPlatform\Core\DataProvider\RestrictedDataProviderInterface;
-use App\ApiResources\Cotisation\Cotisation;
-use App\Service\Cotisation\CotisationCreator;
-
-/**
- * Class CotisationDataProvider : custom provider pour assurer l'alimentation de la réponse du GET cotisation
- * @package App\DataProvider\Cotisation
- */
-final class CotisationDataProvider implements ItemDataProviderInterface, RestrictedDataProviderInterface
-{
-    public function __construct(private CotisationCreator $cotisationCreator)
-    { }
-
-    public function supports(string $resourceClass, string $operationName = null, array $context = []): bool
-    {
-        return Cotisation::class === $resourceClass;
-    }
-
-    public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?Cotisation
-    {
-        return $this->cotisationCreator->getCotisation($id);
-    }
-}

+ 0 - 32
src/DataProvider/Dolibarr/DolibarrAccountDataProvider.php

@@ -1,32 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace App\DataProvider\Dolibarr;
-
-use ApiPlatform\Core\DataProvider\ItemDataProviderInterface;
-use ApiPlatform\Core\DataProvider\RestrictedDataProviderInterface;
-use App\ApiResources\Dolibarr\DolibarrAccount;
-use App\Service\ApiResourceBuilder\Dolibarr\DolibarrAccountBuilder;
-
-/**
- * Custom provider pour les DolibarrAccounts récupérés via l'api dolibarr
- * @package App\DataProvider\Utils
- */
-final class DolibarrAccountDataProvider implements ItemDataProviderInterface, RestrictedDataProviderInterface
-{
-
-    public function __construct(
-        private DolibarrAccountBuilder $dolibarrAccountCreator,
-    )
-    {}
-
-    public function supports(string $resourceClass, string $operationName = null, array $context = []): bool
-    {
-        return DolibarrAccount::class === $resourceClass;
-    }
-
-    public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?DolibarrAccount
-    {
-        return $this->dolibarrAccountCreator->getDolibarrAccount($id);
-    }
-}

+ 0 - 31
src/DataProvider/Mobyt/MobytUserStatusDataProvider.php

@@ -1,31 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace App\DataProvider\Mobyt;
-
-use ApiPlatform\Core\DataProvider\ItemDataProviderInterface;
-use ApiPlatform\Core\DataProvider\RestrictedDataProviderInterface;
-use App\ApiResources\Mobyt\MobytUserStatus;
-use App\Service\ApiResourceBuilder\Mobyt\MobytUserStatusBuilder;
-
-/**
- * Custom provider pour les MobytUserStatus récupérés via l'api Mobyt
- * @package App\DataProvider\Utils
- */
-final class MobytUserStatusDataProvider implements ItemDataProviderInterface, RestrictedDataProviderInterface
-{
-    public function __construct(
-        private MobytUserStatusBuilder $mobytUserStatusCreator,
-    )
-    {}
-
-    public function supports(string $resourceClass, string $operationName = null, array $context = []): bool
-    {
-        return MobytUserStatus::class === $resourceClass;
-    }
-
-    public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?MobytUserStatus
-    {
-        return $this->mobytUserStatusCreator->getUserStatus($id);
-    }
-}

+ 0 - 62
src/DataProvider/Utils/GpsCoordinateSearchingDataProvider.php

@@ -1,62 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace App\DataProvider\Utils;
-
-use ApiPlatform\Core\DataProvider\CollectionDataProviderInterface;
-use ApiPlatform\Core\DataProvider\ItemDataProviderInterface;
-use ApiPlatform\Core\DataProvider\RestrictedDataProviderInterface;
-use ApiPlatform\Core\Identifier\CompositeIdentifierParser;
-use App\ApiResources\Utils\GpsCoordinate;
-use App\Service\Utils\GpsCoordinateUtils;
-use Symfony\Component\HttpFoundation\RequestStack;
-
-/**
- * Class GpsCoordinateSearchingDataProvider : custom provider pour assurer l'alimentation de la ressource GpsCoordinate
- * @package App\DataProvider\Utils
- */
-final class GpsCoordinateSearchingDataProvider implements ItemDataProviderInterface, CollectionDataProviderInterface, RestrictedDataProviderInterface
-{
-    public function __construct(
-        private GpsCoordinateUtils $gpsCoordinateUtils,
-        private RequestStack $requestStack
-    )
-    { }
-
-    public function supports(string $resourceClass, string $operationName = null, array $context = []): bool
-    {
-        return GpsCoordinate::class === $resourceClass;
-    }
-
-    public function getCollection(string $resourceClass, string $operationName = null): iterable
-    {
-        $request = $this->requestStack->getCurrentRequest();
-        $responses = [];
-        try{
-            $addresses = $this->gpsCoordinateUtils->searchGpsCoordinates(
-                $request->get('street'),
-                $request->get('cp'),
-                $request->get('city')
-            );
-            foreach ($addresses as $address){
-                $responses[] = $this->gpsCoordinateUtils->createGpsCoordinate($address);
-            }
-        }catch (\Exception $exception){
-            $responses[] = new GpsCoordinate();
-        }
-        return $responses;
-    }
-
-    public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): GpsCoordinate
-    {
-        $ids = CompositeIdentifierParser::parse($id);
-        try{
-            $address = $this->gpsCoordinateUtils->reverseGpsCoordinates(floatval($ids['latitude']), floatval($ids['longitude']));
-            $gpsCoordinateResponse = $this->gpsCoordinateUtils->createGpsCoordinate($address);
-        }catch (\Exception $exception){
-            $gpsCoordinateResponse = new GpsCoordinate();
-        }
-        return $gpsCoordinateResponse;
-    }
-}

+ 0 - 34
src/DataProvider/Utils/SiretDataProvider.php

@@ -1,34 +0,0 @@
-<?php
-declare(strict_types=1);
-
-namespace App\DataProvider\Utils;
-
-use ApiPlatform\Core\DataProvider\ItemDataProviderInterface;
-use ApiPlatform\Core\DataProvider\RestrictedDataProviderInterface;
-use App\ApiResources\Utils\Siret;
-use App\Service\Utils\Siret as SiretUtils;
-
-/**
- * Class SiretDataProvider : custom provider pour assurer l'alimentation des utils Siret
- * @package App\DataProvider\Utils
- */
-final class SiretDataProvider implements ItemDataProviderInterface, RestrictedDataProviderInterface
-{
-    public function __construct(
-        private SiretUtils $siretUtils
-    )
-    { }
-
-    public function supports(string $resourceClass, string $operationName = null, array $context = []): bool
-    {
-        return Siret::class === $resourceClass;
-    }
-
-    public function getItem(string $resourceClass, $id, string $operationName = null, array $context = []): ?Siret
-    {
-        $siretResponse = new Siret();
-        $siretResponse->setNumber($id);
-        $siretResponse->setIsCorrect($this->siretUtils->isSiretCorrect($id));
-        return $siretResponse;
-    }
-}

+ 18 - 131
src/Entity/Access/Access.php

@@ -1,9 +1,11 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Access;
 
-use ApiPlatform\Core\Annotation\ApiFilter;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Doctrine\Orm\Filter\BooleanFilter;
+use ApiPlatform\Metadata\ApiFilter;
 use App\Entity\AccessWish\AccessWish;
 use App\Entity\Billing\AccessBilling;
 use App\Entity\Billing\Bill;
@@ -35,8 +37,6 @@ use App\Entity\Person\Medal;
 use App\Entity\Product\Equipment;
 use App\Entity\Product\EquipmentLoan;
 use App\Filter\Person\FullNameFilter;
-use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\BooleanFilter;
-use ApiPlatform\Core\Annotation\ApiResource;
 use App\Entity\Billing\AccessIntangible;
 use App\Entity\Billing\AccessPayer;
 use App\Entity\Core\Notification;
@@ -50,7 +50,7 @@ use App\Entity\Person\PersonActivity;
 use App\Entity\Place\PlaceRepair;
 use App\Entity\Place\RoomRepair;
 use App\Entity\Product\EquipmentRepair;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -64,11 +64,11 @@ use Symfony\Component\Serializer\Annotation\Groups;
  * @see : config/api_platform/Access/access.yaml
  */
 #[ApiResource]
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity(repositoryClass: AccessRepository::class)]
-#[ApiFilter(BooleanFilter::class, properties: ['person.isPhysical'])]
-#[ApiFilter(FullNameFilter::class)]
-#[ApiFilter(InFilter::class, properties: ['id'])]
+#[ApiFilter(filterClass: BooleanFilter::class, properties: ['person.isPhysical'])]
+#[ApiFilter(filterClass: FullNameFilter::class)]
+#[ApiFilter(filterClass: InFilter::class, properties: ['id'])]
 class Access implements UserInterface, PasswordAuthenticatedUserInterface
 {
     #[ORM\Id]
@@ -105,7 +105,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     private ?array $setting = [];
 
     #[Groups(['my_access:input'])]
-    private array $historical  = [];
+    private array $historical = [];
 
     #[ORM\OneToOne(mappedBy: 'access', cascade: ['persist'], orphanRemoval: true)]
     private AccessBilling $accessBilling;
@@ -289,7 +289,8 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
     private Collection $tags;
 
-    #[Pure] public function __construct()
+    #[Pure]
+    public function __construct()
     {
         $this->personActivity = new ArrayCollection();
         $this->organizationFunction = new ArrayCollection();
@@ -359,7 +360,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     public function setAdminAccess(bool $adminAccess): self
     {
         $this->adminAccess = $adminAccess;
-
         return $this;
     }
 
@@ -371,7 +371,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     public function setSuperAdminAccess(bool $superAdminAccess): self
     {
         $this->superAdminAccess = $superAdminAccess;
-
         return $this;
     }
 
@@ -383,7 +382,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     public function setPerson(?Person $person): self
     {
         $this->person = $person;
-
         return $this;
     }
 
@@ -395,7 +393,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
-
         return $this;
     }
 
@@ -407,7 +404,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     public function setActivityYear(?int $activityYear): self
     {
         $this->activityYear = $activityYear;
-
         return $this;
     }
 
@@ -418,9 +414,9 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
 
     public function setHistorical(array $historical): self
     {
-        if(!$historical['past'] && !$historical['present'] && !$historical['future'])
+        if (!$historical['past'] && !$historical['present'] && !$historical['future']) {
             $historical['present'] = true;
-
+        }
         $this->setting['historical'] = $historical;
         return $this;
     }
@@ -448,7 +444,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->personActivity[] = $personActivity;
             $personActivity->setAccess($this);
         }
-
         return $this;
     }
 
@@ -460,7 +455,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $personActivity->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -469,13 +463,12 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         return $this->organizationFunction;
     }
 
-    public function addOrganizationFunction (OrganizationFunction $organizationFunction): self
+    public function addOrganizationFunction(OrganizationFunction $organizationFunction): self
     {
         if (!$this->organizationFunction->contains($organizationFunction)) {
             $this->organizationFunction[] = $organizationFunction;
             $organizationFunction->setAccess($this);
         }
-
         return $this;
     }
 
@@ -487,7 +480,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $organizationFunction->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -502,7 +494,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->organizationLicences[] = $organizationLicence;
             $organizationLicence->setLicensee($this);
         }
-
         return $this;
     }
 
@@ -514,7 +505,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $organizationLicence->setLicensee(null);
             }
         }
-
         return $this;
     }
 
@@ -529,7 +519,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->personalizedLists[] = $personalizedList;
             $personalizedList->setAccess($this);
         }
-
         return $this;
     }
 
@@ -541,7 +530,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $personalizedList->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -550,7 +538,7 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         return $this->children;
     }
 
-    public function addChild (Access $access): self
+    public function addChild(Access $access): self
     {
         if (!$this->children->contains($access)) {
             $this->children[] = $access;
@@ -600,7 +588,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->billingPayers[] = $billingPayer;
             $billingPayer->setAccessPayer($this);
         }
-
         return $this;
     }
 
@@ -612,7 +599,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $billingPayer->setAccessPayer(null);
             }
         }
-
         return $this;
     }
 
@@ -627,7 +613,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->billingReceivers[] = $billingReceiver;
             $billingReceiver->setAccessReceiver($this);
         }
-
         return $this;
     }
 
@@ -639,7 +624,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $billingPayer->setAccessReceiver(null);
             }
         }
-
         return $this;
     }
 
@@ -654,7 +638,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->accessIntangibles[] = $accessIntangibles;
             $accessIntangibles->setAccess($this);
         }
-
         return $this;
     }
 
@@ -666,7 +649,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $accessIntangibles->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -681,7 +663,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->notifications[] = $notification;
             $notification->setRecipientAccess($this);
         }
-
         return $this;
     }
 
@@ -693,7 +674,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $notification->setRecipientAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -708,7 +688,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->notificationUsers[] = $notificationUser;
             $notificationUser->setAccess($this);
         }
-
         return $this;
     }
 
@@ -720,7 +699,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $notificationUser->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -732,7 +710,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     public function setPublicationDirector(?Parameters $parameters): self
     {
         $this->publicationDirector = $parameters;
-
         return $this;
     }
 
@@ -744,11 +721,11 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     public function setEducationNotationConfig(?EducationNotationConfig $educationNotationConfig): self
     {
         $this->educationNotationConfig = $educationNotationConfig;
-
         return $this;
     }
 
-    #[Pure] public function getUserIdentifier(): string
+    #[Pure]
+    public function getUserIdentifier(): string
     {
         return $this->person->getUserIdentifier();
     }
@@ -781,7 +758,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     public function setSetting(?array $setting): self
     {
         $this->setting = $setting;
-
         return $this;
     }
 
@@ -799,7 +775,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->companyPersonAccesses[] = $companyPersonAccess;
             $companyPersonAccess->setCompany($this);
         }
-
         return $this;
     }
 
@@ -811,7 +786,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $companyPersonAccess->setCompany(null);
             }
         }
-
         return $this;
     }
 
@@ -829,7 +803,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->companyPersonCompany[] = $companyPersonCompany;
             $companyPersonCompany->setAccess($this);
         }
-
         return $this;
     }
 
@@ -841,7 +814,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $companyPersonCompany->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -859,7 +831,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->educationStudent[] = $educationStudent;
             $educationStudent->setAccess($this);
         }
-
         return $this;
     }
 
@@ -871,7 +842,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $educationStudent->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -889,7 +859,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->educationStudentByTeacher[] = $educationStudentByTeacher;
             $educationStudentByTeacher->addTeacher($this);
         }
-
         return $this;
     }
 
@@ -898,7 +867,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         if ($this->educationStudentByTeacher->removeElement($educationStudentByTeacher)) {
             $educationStudentByTeacher->removeTeacher($this);
         }
-
         return $this;
     }
 
@@ -916,7 +884,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->educationTeachers[] = $educationTeacher;
             $educationTeacher->setTeacher($this);
         }
-
         return $this;
     }
 
@@ -928,7 +895,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $educationTeacher->setTeacher(null);
             }
         }
-
         return $this;
     }
 
@@ -946,7 +912,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->holidays[] = $holiday;
             $holiday->setAccess($this);
         }
-
         return $this;
     }
 
@@ -958,7 +923,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $holiday->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -976,7 +940,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->courses[] = $course;
             $course->addStudent($this);
         }
-
         return $this;
     }
 
@@ -985,7 +948,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         if ($this->courses->removeElement($course)) {
             $course->removeStudent($this);
         }
-
         return $this;
     }
 
@@ -1003,7 +965,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->practicalCourses[] = $practicalCourse;
             $practicalCourse->addOrganizer($this);
         }
-
         return $this;
     }
 
@@ -1012,7 +973,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         if ($this->practicalCourses->removeElement($practicalCourse)) {
             $practicalCourse->removeOrganizer($this);
         }
-
         return $this;
     }
 
@@ -1024,7 +984,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
     public function setAccessFamily(?AccessFamily $accessFamily): self
     {
         $this->accessFamily = $accessFamily;
-
         return $this;
     }
 
@@ -1042,7 +1001,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->billingEducationalProjectPayers[] = $billingEducationalProjectPayer;
             $billingEducationalProjectPayer->setEducationalProjectPayer($this);
         }
-
         return $this;
     }
 
@@ -1054,7 +1012,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $billingEducationalProjectPayer->setEducationalProjectPayer(null);
             }
         }
-
         return $this;
     }
 
@@ -1072,7 +1029,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->bills[] = $bill;
             $bill->setAccess($this);
         }
-
         return $this;
     }
 
@@ -1084,7 +1040,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $bill->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -1102,7 +1057,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->billLines[] = $billLine;
             $billLine->setAccess($this);
         }
-
         return $this;
     }
 
@@ -1114,7 +1068,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $billLine->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -1132,7 +1085,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->billCredits[] = $billCredit;
             $billCredit->setAccess($this);
         }
-
         return $this;
     }
 
@@ -1144,7 +1096,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $billCredit->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -1162,7 +1113,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->silentPartners[] = $silentPartner;
             $silentPartner->setSilentPartner($this);
         }
-
         return $this;
     }
 
@@ -1174,7 +1124,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $silentPartner->setSilentPartner(null);
             }
         }
-
         return $this;
     }
 
@@ -1192,7 +1141,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->operationalPartners[] = $operationalPartner;
             $operationalPartner->setOperationalPartner($this);
         }
-
         return $this;
     }
 
@@ -1204,7 +1152,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $operationalPartner->setOperationalPartner(null);
             }
         }
-
         return $this;
     }
 
@@ -1222,7 +1169,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->eventUsers[] = $eventUser;
             $eventUser->setGuest($this);
         }
-
         return $this;
     }
 
@@ -1234,7 +1180,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $eventUser->setGuest(null);
             }
         }
-
         return $this;
     }
 
@@ -1252,7 +1197,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->examenConvocations[] = $examenConvocation;
             $examenConvocation->setStudent($this);
         }
-
         return $this;
     }
 
@@ -1264,7 +1208,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $examenConvocation->setStudent(null);
             }
         }
-
         return $this;
     }
 
@@ -1282,7 +1225,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->equipmentRepairProviders[] = $equipmentRepairProvider;
             $equipmentRepairProvider->setProvider($this);
         }
-
         return $this;
     }
 
@@ -1294,7 +1236,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $equipmentRepairProvider->setProvider(null);
             }
         }
-
         return $this;
     }
 
@@ -1312,7 +1253,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->attendances[] = $attendance;
             $attendance->setAccess($this);
         }
-
         return $this;
     }
 
@@ -1324,7 +1264,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $attendance->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -1342,7 +1281,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->attendanceBookings[] = $attendanceBooking;
             $attendanceBooking->setAccess($this);
         }
-
         return $this;
     }
 
@@ -1354,7 +1292,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $attendanceBooking->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -1372,7 +1309,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->attendanceReplacements[] = $attendanceReplacement;
             $attendanceReplacement->setReplacement($this);
         }
-
         return $this;
     }
 
@@ -1384,7 +1320,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $attendanceReplacement->setReplacement(null);
             }
         }
-
         return $this;
     }
 
@@ -1402,7 +1337,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->roomRepairProviders[] = $roomRepairProvider;
             $roomRepairProvider->setProvider($this);
         }
-
         return $this;
     }
 
@@ -1414,7 +1348,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $roomRepairProvider->setProvider(null);
             }
         }
-
         return $this;
     }
 
@@ -1432,7 +1365,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->placeRepairProviders[] = $placeRepairProvider;
             $placeRepairProvider->setProvider($this);
         }
-
         return $this;
     }
 
@@ -1444,7 +1376,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $placeRepairProvider->setProvider(null);
             }
         }
-
         return $this;
     }
 
@@ -1462,7 +1393,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->juryMembers[] = $juryMember;
             $juryMember->addMember($this);
         }
-
         return $this;
     }
 
@@ -1471,7 +1401,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         if ($this->juryMembers->removeElement($juryMember)) {
             $juryMember->removeMember($this);
         }
-
         return $this;
     }
 
@@ -1489,7 +1418,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->organizationContacts[] = $organizationContact;
             $organizationContact->setContactPerson($this);
         }
-
         return $this;
     }
 
@@ -1501,7 +1429,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $organizationContact->setContactPerson(null);
             }
         }
-
         return $this;
     }
 
@@ -1519,7 +1446,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->commissionMembers[] = $commissionMember;
             $commissionMember->setMember($this);
         }
-
         return $this;
     }
 
@@ -1531,7 +1457,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $commissionMember->setMember(null);
             }
         }
-
         return $this;
     }
 
@@ -1549,7 +1474,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->equipmentSuppliers[] = $equipmentSupplier;
             $equipmentSupplier->setSupplier($this);
         }
-
         return $this;
     }
 
@@ -1561,7 +1485,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $equipmentSupplier->setSupplier(null);
             }
         }
-
         return $this;
     }
 
@@ -1579,7 +1502,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->equipmentControlManagers[] = $equipmentControlManager;
             $equipmentControlManager->setControlManager($this);
         }
-
         return $this;
     }
 
@@ -1591,7 +1513,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $equipmentControlManager->setControlManager(null);
             }
         }
-
         return $this;
     }
 
@@ -1609,7 +1530,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->equipmentEditors[] = $equipmentEditor;
             $equipmentEditor->setEditor($this);
         }
-
         return $this;
     }
 
@@ -1621,7 +1541,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $equipmentEditor->setEditor(null);
             }
         }
-
         return $this;
     }
 
@@ -1639,7 +1558,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->equipmentLoans[] = $equipmentLoan;
             $equipmentLoan->setBorrower($this);
         }
-
         return $this;
     }
 
@@ -1651,7 +1569,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $equipmentLoan->setBorrower(null);
             }
         }
-
         return $this;
     }
 
@@ -1669,7 +1586,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->equipments[] = $equipment;
             $equipment->setAccess($this);
         }
-
         return $this;
     }
 
@@ -1681,7 +1597,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $equipment->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -1699,7 +1614,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->accessFictionalIntangibles[] = $accessFictionalIntangible;
             $accessFictionalIntangible->setAccess($this);
         }
-
         return $this;
     }
 
@@ -1711,7 +1625,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $accessFictionalIntangible->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -1729,7 +1642,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->donors[] = $donor;
             $donor->setAccess($this);
         }
-
         return $this;
     }
 
@@ -1741,7 +1653,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $donor->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -1759,7 +1670,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->medals[] = $medal;
             $medal->setAccess($this);
         }
-
         return $this;
     }
 
@@ -1771,7 +1681,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $medal->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -1789,7 +1698,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->organizationResponsabilities[] = $organizationResponsability;
             $organizationResponsability->setAccess($this);
         }
-
         return $this;
     }
 
@@ -1801,7 +1709,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $organizationResponsability->setAccess(null);
             }
         }
-
         return $this;
     }
 
@@ -1819,7 +1726,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->accessWishes[] = $accessWish;
             $accessWish->setAccessOriginal($this);
         }
-
         return $this;
     }
 
@@ -1831,7 +1737,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $accessWish->setAccessOriginal(null);
             }
         }
-
         return $this;
     }
 
@@ -1849,7 +1754,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->workByUsers[] = $workByUser;
             $workByUser->setStudent($this);
         }
-
         return $this;
     }
 
@@ -1861,7 +1765,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $workByUser->setStudent(null);
             }
         }
-
         return $this;
     }
 
@@ -1878,14 +1781,12 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         if (!$this->tags->contains($tag)) {
             $this->tags[] = $tag;
         }
-
         return $this;
     }
 
     public function removeTag(Tagg $tag): self
     {
         $this->tags->removeElement($tag);
-
         return $this;
     }
 
@@ -1903,7 +1804,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->eventOrganizers[] = $eventOrganizer;
             $eventOrganizer->addOrganizer($this);
         }
-
         return $this;
     }
 
@@ -1912,7 +1812,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         if ($this->eventOrganizers->removeElement($eventOrganizer)) {
             $eventOrganizer->removeOrganizer($this);
         }
-
         return $this;
     }
 
@@ -1930,7 +1829,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->educationalProjectOrganizers[] = $educationalProjectOrganizer;
             $educationalProjectOrganizer->addOrganizer($this);
         }
-
         return $this;
     }
 
@@ -1939,7 +1837,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         if ($this->educationalProjectOrganizers->removeElement($educationalProjectOrganizer)) {
             $educationalProjectOrganizer->removeOrganizer($this);
         }
-
         return $this;
     }
 
@@ -1957,7 +1854,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->emails[] = $email;
             $email->setAuthor($this);
         }
-
         return $this;
     }
 
@@ -1969,7 +1865,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $email->setAuthor(null);
             }
         }
-
         return $this;
     }
 
@@ -1987,7 +1882,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->mails[] = $mail;
             $mail->setAuthor($this);
         }
-
         return $this;
     }
 
@@ -1999,7 +1893,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $mail->setAuthor(null);
             }
         }
-
         return $this;
     }
 
@@ -2017,7 +1910,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
             $this->sms[] = $sms;
             $sms->setAuthor($this);
         }
-
         return $this;
     }
 
@@ -2029,7 +1921,6 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
                 $sms->setAuthor(null);
             }
         }
-
         return $this;
     }
 
@@ -2044,15 +1935,11 @@ class Access implements UserInterface, PasswordAuthenticatedUserInterface
         if ($accessBilling === null && $this->accessBilling !== null) {
             $this->accessBilling->setAccess(null);
         }
-
         // set the owning side of the relation if necessary
         if ($accessBilling !== null && $accessBilling->getAccess() !== $this) {
             $accessBilling->setAccess($this);
         }
-
         $this->accessBilling = $accessBilling;
-
         return $this;
     }
-
 }

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Access;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class AccessCommunication
 {

+ 10 - 12
src/Entity/Access/AccessFamily.php

@@ -1,10 +1,11 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Access;
 
-use ApiPlatform\Core\Annotation\ApiResource;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -12,14 +13,15 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN')"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\')'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
 class AccessFamily
 {
     #[ORM\Id]
@@ -58,7 +60,6 @@ class AccessFamily
             $this->accesses[] = $access;
             $access->setAccessFamily($this);
         }
-
         return $this;
     }
 
@@ -70,7 +71,6 @@ class AccessFamily
                 $access->setAccessFamily(null);
             }
         }
-
         return $this;
     }
 
@@ -88,7 +88,6 @@ class AccessFamily
             $this->accessFictionalIntangibles[] = $accessFictionalIntangible;
             $accessFictionalIntangible->setAccessFamily($this);
         }
-
         return $this;
     }
 
@@ -100,7 +99,6 @@ class AccessFamily
                 $accessFictionalIntangible->setAccessFamily(null);
             }
         }
-
         return $this;
     }
 }

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

@@ -5,7 +5,7 @@ namespace App\Entity\Access;
 
 use App\Entity\Billing\BillingIntangibleExcludeDate;
 use App\Entity\Product\FictionalIntangible;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
@@ -13,7 +13,7 @@ use Doctrine\Common\Collections\Collection;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class AccessFictionalIntangible
 {

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Access;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class AccessNetworkSetting
 {

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Access;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class AccessSocial
 {

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

@@ -4,7 +4,7 @@ declare(strict_types=1);
 namespace App\Entity\Access;
 
 use App\Repository\Access\FunctionTypeRepository;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 use Symfony\Component\Validator\Constraints as Assert;
 
@@ -12,7 +12,7 @@ use Symfony\Component\Validator\Constraints as Assert;
  * Enum des fonctions que peuvent occuper un Access au sein d'une Organization
  *
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity(repositoryClass: FunctionTypeRepository::class)]
 class FunctionType
 {

+ 6 - 12
src/Entity/Access/OrganizationFunction.php

@@ -1,22 +1,22 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Access;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\ApiResource;
 use App\Annotation\DateTimeConstraintAware;
 use App\Entity\Organization\Activity;
 use App\Entity\Traits\ActivityPeriodTrait;
 use App\Repository\Access\OrganizationFunctionRepository;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 use Symfony\Component\Validator\Constraints as Assert;
 
 /**
  * Fonction d'un Access dans une Organization sur une période donnée
  */
-#[Auditable]
 #[ApiResource]
+//#[Auditable]
 #[ORM\Entity(repositoryClass: OrganizationFunctionRepository::class)]
 #[DateTimeConstraintAware(startDateFieldName: "startDate", endDateFieldName: "endDate")]
 class OrganizationFunction
@@ -44,7 +44,7 @@ class OrganizationFunction
     private Activity $activity;
 
     #[ORM\Column(length: 255, nullable: true)]
-    #[Assert\Choice(callback: ['\App\Enum\Access\DeparturesCauseEnum', 'toArray'], message: 'invalid-departure-cause')]
+    #[Assert\Choice(callback: ['\\App\\Enum\\Access\\DeparturesCauseEnum', 'toArray'], message: 'invalid-departure-cause')]
     private ?string $departureCause = null;
 
     #[ORM\Column(options: ['default' => true])]
@@ -63,14 +63,12 @@ class OrganizationFunction
     public function setAccess(?Access $access): self
     {
         $this->access = $access;
-
         return $this;
     }
 
     public function setFunctionType(FunctionType $functionType): self
     {
         $this->functionType = $functionType;
-
         return $this;
     }
 
@@ -87,18 +85,16 @@ class OrganizationFunction
     public function setFunctionComplement(?string $functionComplement): self
     {
         $this->functionComplement = $functionComplement;
-
         return $this;
     }
 
     public function setDepartureCause(?string $departureCause): self
     {
         $this->departureCause = $departureCause;
-
         return $this;
     }
 
-    public function getDepartureCause():?string
+    public function getDepartureCause(): ?string
     {
         return $this->departureCause;
     }
@@ -106,7 +102,6 @@ class OrganizationFunction
     public function setIsMemberSection(bool $isMemberSection): self
     {
         $this->isMemberSection = $isMemberSection;
-
         return $this;
     }
 
@@ -123,7 +118,6 @@ class OrganizationFunction
     public function setActivity(?Activity $activity): self
     {
         $this->activity = $activity;
-
         return $this;
     }
 }

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Access;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class OrganizationResponsability
 {

+ 20 - 34
src/Entity/Access/PersonalizedList.php

@@ -1,12 +1,13 @@
 <?php
 
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Access;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\GetCollection;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Repository\Access\PersonalizedListRepository;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 use JetBrains\PhpStorm\Pure;
 use Symfony\Component\Serializer\Annotation\Groups;
@@ -14,23 +15,16 @@ use Symfony\Component\Serializer\Annotation\Groups;
 /**
  * Liste personnalisées
  */
-#[Auditable]
 #[ApiResource(
-    collectionOperations: [
-        'get' => [
-            'normalization_context' => [
-                'groups' => ['lists:output']
-            ]
-        ]
+    operations: [
+        new Get(
+            security: 'object.getAccess().getId() == user.getId()'
+        ),
+        new GetCollection(
+            normalizationContext: ['groups' => ['lists:output']]
+        )
     ],
-    itemOperations: [
-        'get' => [
-            'security' => 'object.getAccess().getId() == user.getId()'
-        ]
-    ],
-    attributes: [
-        'pagination_enabled' => false
-    ]
+    paginationEnabled: false
 )]
 #[ORM\Entity(repositoryClass: PersonalizedListRepository::class)]
 class PersonalizedList
@@ -45,7 +39,6 @@ class PersonalizedList
     #[ORM\JoinColumn(nullable: false)]
     private ?Access $access = null;
 
-
     #[ORM\Column(length: 200, nullable: true)]
     #[Groups(['lists:output'])]
     private ?string $label = null;
@@ -64,7 +57,8 @@ class PersonalizedList
     #[Groups(['lists:output'])]
     private string $menuKey;
 
-    #[Pure] public function __construct()
+    #[Pure]
+    public function __construct()
     {
     }
 
@@ -73,11 +67,9 @@ class PersonalizedList
         return $this->id;
     }
 
-
-    public function setFilters(array $filters):self
+    public function setFilters(array $filters): self
     {
         $this->filters = $filters;
-
         return $this;
     }
 
@@ -86,10 +78,9 @@ class PersonalizedList
         return $this->filters;
     }
 
-    public function setColumns(array $columns):self
+    public function setColumns(array $columns): self
     {
         $this->columns = $columns;
-
         return $this;
     }
 
@@ -98,11 +89,9 @@ class PersonalizedList
         return $this->columns;
     }
 
-
-    public function setAccess(Access $access):self
+    public function setAccess(Access $access): self
     {
         $this->access = $access;
-
         return $this;
     }
 
@@ -111,10 +100,9 @@ class PersonalizedList
         return $this->access;
     }
 
-    public function setMenuKey(string $menuKey):self
+    public function setMenuKey(string $menuKey): self
     {
         $this->menuKey = $menuKey;
-
         return $this;
     }
 
@@ -123,10 +111,9 @@ class PersonalizedList
         return $this->menuKey;
     }
 
-    public function setLabel(string $label):self
+    public function setLabel(string $label): self
     {
         $this->label = $label;
-
         return $this;
     }
 
@@ -135,10 +122,9 @@ class PersonalizedList
         return $this->label;
     }
 
-    public function setEntity(string $entity):self
+    public function setEntity(string $entity): self
     {
         $this->entity = $entity;
-
         return $this;
     }
 

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

@@ -3,7 +3,7 @@ declare(strict_types=1);
 
 namespace App\Entity\AccessWish;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
@@ -11,7 +11,7 @@ use Doctrine\Common\Collections\Collection;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class AccessFamilyWish
 {

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

@@ -5,13 +5,13 @@ declare(strict_types=1);
 namespace App\Entity\AccessWish;
 
 use App\Entity\Organization\Organization;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class AccessTmp
 {

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

@@ -8,7 +8,7 @@ use App\Entity\Core\Country;
 use App\Entity\Core\File;
 use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
@@ -16,7 +16,7 @@ use Doctrine\Common\Collections\Collection;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class AccessWish
 {

+ 2 - 2
src/Entity/AccessWish/DocumentWish.php

@@ -5,7 +5,7 @@ namespace App\Entity\AccessWish;
 
 use App\Entity\Core\File;
 use App\Entity\Person\Person;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
@@ -13,7 +13,7 @@ use Doctrine\Common\Collections\Collection;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class DocumentWish
 {

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

@@ -7,13 +7,13 @@ use App\Entity\Education\Education;
 use App\Entity\Education\EducationCurriculum;
 use App\Entity\Education\EducationStudent;
 use App\Entity\Education\EducationTiming;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class EducationStudentWish
 {

+ 11 - 18
src/Entity/Billing/AccessBilling.php

@@ -1,11 +1,12 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
@@ -13,14 +14,15 @@ use Doctrine\Common\Collections\Collection;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getAccess().getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getAccess().getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
 class AccessBilling
 {
     #[ORM\Column]
@@ -40,7 +42,7 @@ class AccessBilling
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     private ResidenceArea $residenceArea;
 
-    #[ORM\OneToMany(mappedBy: 'accessBilling', targetEntity: BillPayment::class,  cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'accessBilling', targetEntity: BillPayment::class, cascade: ['persist'], orphanRemoval: true)]
     private Collection $billDetachedPayments;
 
     #[ORM\OneToMany(mappedBy: 'accessBilling', targetEntity: BillDebitBalance::class, cascade: ['persist'], orphanRemoval: true)]
@@ -69,7 +71,6 @@ class AccessBilling
     public function setFamilyQuotient(?FamilyQuotient $familyQuotient): self
     {
         $this->familyQuotient = $familyQuotient;
-
         return $this;
     }
 
@@ -81,7 +82,6 @@ class AccessBilling
     public function setResidenceArea(?ResidenceArea $residenceArea): self
     {
         $this->residenceArea = $residenceArea;
-
         return $this;
     }
 
@@ -99,7 +99,6 @@ class AccessBilling
             $this->billDetachedPayments[] = $billDetachedPayment;
             $billDetachedPayment->setAccessBilling($this);
         }
-
         return $this;
     }
 
@@ -111,7 +110,6 @@ class AccessBilling
                 $billDetachedPayment->setAccessBilling(null);
             }
         }
-
         return $this;
     }
 
@@ -129,7 +127,6 @@ class AccessBilling
             $this->billDebitBalances[] = $billDebitBalance;
             $billDebitBalance->setAccessBilling($this);
         }
-
         return $this;
     }
 
@@ -141,7 +138,6 @@ class AccessBilling
                 $billDebitBalance->setAccessBilling(null);
             }
         }
-
         return $this;
     }
 
@@ -159,7 +155,6 @@ class AccessBilling
             $this->accountBalanceReimbursements[] = $accountBalanceReimbursement;
             $accountBalanceReimbursement->setAccessBillingAccountBalanceReimbursement($this);
         }
-
         return $this;
     }
 
@@ -171,7 +166,6 @@ class AccessBilling
                 $accountBalanceReimbursement->setAccessBillingAccountBalanceReimbursement(null);
             }
         }
-
         return $this;
     }
 
@@ -183,7 +177,6 @@ class AccessBilling
     public function setAccess(?Access $access): self
     {
         $this->access = $access;
-
         return $this;
     }
 }

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

@@ -6,7 +6,7 @@ namespace App\Entity\Billing;
 use App\Entity\Access\Access;
 use App\Entity\Access\AccessFamily;
 use App\Entity\Product\FictionalIntangible;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
@@ -14,7 +14,7 @@ use Doctrine\Common\Collections\Collection;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class AccessFictionalIntangible
 {

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

@@ -1,11 +1,11 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
@@ -13,8 +13,8 @@ use Doctrine\Common\Collections\Collection;
 /**
  * Enregistrement d'un produit à facturer par un Access
  */
-#[Auditable]
 #[ApiResource]
+//#[Auditable]
 #[ORM\Entity(repositoryClass: AccessIntangible::class)]
 class AccessIntangible extends AbstractBillingIntangible
 {
@@ -29,11 +29,9 @@ class AccessIntangible extends AbstractBillingIntangible
         $this->billingIntangibleExcludeDates = new ArrayCollection();
     }
 
-
     public function setAccess(?Access $access): self
     {
         $this->access = $access;
-
         return $this;
     }
 
@@ -56,7 +54,6 @@ class AccessIntangible extends AbstractBillingIntangible
             $this->billingIntangibleExcludeDates[] = $billingIntangibleExcludeDate;
             $billingIntangibleExcludeDate->setAccessIntangible($this);
         }
-
         return $this;
     }
 
@@ -68,7 +65,6 @@ class AccessIntangible extends AbstractBillingIntangible
                 $billingIntangibleExcludeDate->setAccessIntangible(null);
             }
         }
-
         return $this;
     }
 }

+ 11 - 11
src/Entity/Billing/AccessPayer.php

@@ -1,13 +1,14 @@
 <?php
 
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Repository\Billing\AccessPayerRepository;
 use App\Entity\Access\Access;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
@@ -16,13 +17,14 @@ use Doctrine\ORM\Mapping as ORM;
  * Fais le lien entre l'Access qui règle la facture et l'Access concerné
  *
  */
-#[Auditable]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getAccessPayer().getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getAccessPayer().getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
 #[ORM\Table(name: 'BillingPayer')]
 #[ORM\Entity(repositoryClass: AccessPayerRepository::class)]
 class AccessPayer extends AbstractBillingPayer
@@ -39,11 +41,10 @@ class AccessPayer extends AbstractBillingPayer
     public function setAccessPayer(?Access $accessPayer): self
     {
         $this->accessPayer = $accessPayer;
-
         return $this;
     }
 
-    public function getAccessPayer():?Access
+    public function getAccessPayer(): ?Access
     {
         return $this->accessPayer;
     }
@@ -51,11 +52,10 @@ class AccessPayer extends AbstractBillingPayer
     public function setAccessReceiver(?Access $accessReceiver): self
     {
         $this->accessReceiver = $accessReceiver;
-
         return $this;
     }
 
-    public function getAccessReceiver():?Access
+    public function getAccessReceiver(): ?Access
     {
         return $this->accessReceiver;
     }

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

@@ -3,7 +3,7 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -11,7 +11,7 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class BergerLevrault
 {

+ 11 - 10
src/Entity/Billing/Bill.php

@@ -1,26 +1,28 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * @todo : A la suite de la migration, il faut supprimer le nom de la table pour avoir une table Bill, et supprimer l'attribut discr.
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
-#[ORM\Table(name: 'BillAccounting')]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
+#[ORM\Table(name: 'BillAccounting')]
 class Bill extends BillAccounting implements BillAccountingInterface
 {
     #[ORM\Column(length: 255, nullable: false)]
@@ -38,7 +40,6 @@ class Bill extends BillAccounting implements BillAccountingInterface
     public function setAccess(?Access $access): self
     {
         $this->access = $access;
-
         return $this;
     }
 }

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 class BillAccessDetail
 {
     #[ORM\Id]

+ 15 - 29
src/Entity/Billing/BillAccounting.php

@@ -1,12 +1,13 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
@@ -15,14 +16,15 @@ use Doctrine\Common\Collections\Collection;
  * @todo : A la suite de la migration, il faut supprimer le nom de la table pour avoir une table BillAccounting, et supprimer l'attribut discr.
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
 class BillAccounting
 {
     #[ORM\Id]
@@ -37,20 +39,20 @@ class BillAccounting
     #[ORM\JoinColumn(nullable: true)]
     protected Organization $organization;
 
-    #[ORM\OneToMany(mappedBy: 'bill',targetEntity: BillLine::class, cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillLine::class, cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billLines;
 
-    #[ORM\OneToMany(mappedBy: 'bill',targetEntity: BillCredit::class,  cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillCredit::class, cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billCredits;
 
-    #[ORM\OneToMany(mappedBy: 'bill',targetEntity: BillPayment::class,  cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillPayment::class, cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billPayments;
 
     #[ORM\ManyToOne(inversedBy: 'billCredits')]
     #[ORM\JoinColumn(nullable: true)]
     protected BillAccounting $bill;
 
-    #[ORM\OneToMany(mappedBy: 'bill',targetEntity: BillingIntangibleExcludeDate::class,  cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'bill', targetEntity: BillingIntangibleExcludeDate::class, cascade: ['persist'], orphanRemoval: true)]
     protected Collection $billingIntangibleExcludeDates;
 
     #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'bills')]
@@ -69,7 +71,7 @@ class BillAccounting
     #[ORM\JoinColumn(nullable: true)]
     protected Jvs $jvs;
 
-    #[ORM\ManyToMany( targetEntity: Tagg::class, inversedBy: 'billAccountings', cascade: ['persist'])]
+    #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'billAccountings', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_billAccounting')]
     #[ORM\JoinColumn(name: 'billAccounting_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
@@ -97,7 +99,6 @@ class BillAccounting
     public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
-
         return $this;
     }
 
@@ -115,7 +116,6 @@ class BillAccounting
             $this->billLines[] = $billLine;
             $billLine->setBill($this);
         }
-
         return $this;
     }
 
@@ -127,7 +127,6 @@ class BillAccounting
                 $billLine->setBill(null);
             }
         }
-
         return $this;
     }
 
@@ -145,7 +144,6 @@ class BillAccounting
             $this->billCredits[] = $billCredit;
             $billCredit->setBill($this);
         }
-
         return $this;
     }
 
@@ -157,7 +155,6 @@ class BillAccounting
                 $billCredit->setBill(null);
             }
         }
-
         return $this;
     }
 
@@ -175,7 +172,6 @@ class BillAccounting
             $this->billPayments[] = $billPayment;
             $billPayment->setBill($this);
         }
-
         return $this;
     }
 
@@ -187,7 +183,6 @@ class BillAccounting
                 $billPayment->setBill(null);
             }
         }
-
         return $this;
     }
 
@@ -199,7 +194,6 @@ class BillAccounting
     public function setBill(?self $bill): self
     {
         $this->bill = $bill;
-
         return $this;
     }
 
@@ -217,7 +211,6 @@ class BillAccounting
             $this->billingIntangibleExcludeDates[] = $billingIntangibleExcludeDate;
             $billingIntangibleExcludeDate->setBill($this);
         }
-
         return $this;
     }
 
@@ -229,7 +222,6 @@ class BillAccounting
                 $billingIntangibleExcludeDate->setBill(null);
             }
         }
-
         return $this;
     }
 
@@ -241,7 +233,6 @@ class BillAccounting
     public function setPes(?Pes $pes): self
     {
         $this->pes = $pes;
-
         return $this;
     }
 
@@ -253,7 +244,6 @@ class BillAccounting
     public function setBergerLevrault(?BergerLevrault $bergerLevrault): self
     {
         $this->bergerLevrault = $bergerLevrault;
-
         return $this;
     }
 
@@ -265,7 +255,6 @@ class BillAccounting
     public function setCiril(?Ciril $ciril): self
     {
         $this->ciril = $ciril;
-
         return $this;
     }
 
@@ -277,7 +266,6 @@ class BillAccounting
     public function setJvs(?Jvs $jvs): self
     {
         $this->jvs = $jvs;
-
         return $this;
     }
 
@@ -294,14 +282,12 @@ class BillAccounting
         if (!$this->tags->contains($tag)) {
             $this->tags[] = $tag;
         }
-
         return $this;
     }
 
     public function removeTag(Tagg $tag): self
     {
         $this->tags->removeElement($tag);
-
         return $this;
     }
 }

+ 11 - 10
src/Entity/Billing/BillCredit.php

@@ -1,11 +1,12 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
@@ -13,15 +14,16 @@ use Doctrine\ORM\Mapping as ORM;
  *
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
-#[ORM\Table(name: 'BillAccounting')]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
+#[ORM\Table(name: 'BillAccounting')]
 class BillCredit extends BillAccounting implements BillAccountingInterface
 {
     #[ORM\Column(length: 255, nullable: false)]
@@ -39,7 +41,6 @@ class BillCredit extends BillAccounting implements BillAccountingInterface
     public function setAccess(?Access $access): self
     {
         $this->access = $access;
-
         return $this;
     }
 }

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class BillDebitBalance
 {

+ 11 - 12
src/Entity/Billing/BillLine.php

@@ -1,25 +1,28 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 use App\Entity\Booking\EducationalProject;
 use App\Entity\Product\EquipmentLoan;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
+
 /**
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getAccess().getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getAccess().getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
 class BillLine
 {
     #[ORM\Id]
@@ -53,7 +56,6 @@ class BillLine
     public function setBill(?BillAccounting $bill): self
     {
         $this->bill = $bill;
-
         return $this;
     }
 
@@ -65,7 +67,6 @@ class BillLine
     public function setAccess(?Access $access): self
     {
         $this->access = $access;
-
         return $this;
     }
 
@@ -77,7 +78,6 @@ class BillLine
     public function setEducationalProject(?EducationalProject $educationalProject): self
     {
         $this->educationalProject = $educationalProject;
-
         return $this;
     }
 
@@ -89,7 +89,6 @@ class BillLine
     public function setEquipmentLoan(?EquipmentLoan $equipmentLoan): self
     {
         $this->equipmentLoan = $equipmentLoan;
-
         return $this;
     }
 }

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

@@ -4,14 +4,14 @@ declare(strict_types=1);
 namespace App\Entity\Billing;
 
 use App\Entity\Core\Tagg;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class BillPayment
 {

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class BillPeriod
 {

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class BillTotalDetail
 {

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class BillingExportSetting
 {

+ 10 - 13
src/Entity/Billing/BillingIntangibleExcludeDate.php

@@ -1,24 +1,26 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Product\EquipmentLoan;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN')"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\')'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
 class BillingIntangibleExcludeDate
 {
     #[ORM\Id]
@@ -54,7 +56,6 @@ class BillingIntangibleExcludeDate
     public function setAccessIntangible(?AccessIntangible $accessIntangible): self
     {
         $this->accessIntangible = $accessIntangible;
-
         return $this;
     }
 
@@ -66,7 +67,6 @@ class BillingIntangibleExcludeDate
     public function setAccessFictionalIntangible(?AccessFictionalIntangible $accessFictionalIntangible): self
     {
         $this->accessFictionalIntangible = $accessFictionalIntangible;
-
         return $this;
     }
 
@@ -78,7 +78,6 @@ class BillingIntangibleExcludeDate
     public function setEducationalProjectIntangible(?EducationalProjectIntangible $educationalProjectIntangible): self
     {
         $this->educationalProjectIntangible = $educationalProjectIntangible;
-
         return $this;
     }
 
@@ -90,7 +89,6 @@ class BillingIntangibleExcludeDate
     public function setEquipmentLoan(?EquipmentLoan $equipmentLoan): self
     {
         $this->equipmentLoan = $equipmentLoan;
-
         return $this;
     }
 
@@ -102,7 +100,6 @@ class BillingIntangibleExcludeDate
     public function setBill(?Bill $bill): self
     {
         $this->bill = $bill;
-
         return $this;
     }
 }

+ 11 - 15
src/Entity/Billing/BillingSetting.php

@@ -1,22 +1,24 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Organization\Organization;
 use App\Repository\Billing\BillingSettingRepository;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
 use JetBrains\PhpStorm\Pure;
 
-#[Auditable]
 #[ApiResource(
-    collectionOperations: [],
-    itemOperations: ['get']
+    operations: [
+        new Get()
+    ]
 )]
+//#[Auditable]
 #[ORM\Entity(repositoryClass: BillingSettingRepository::class)]
 class BillingSetting
 {
@@ -29,7 +31,7 @@ class BillingSetting
     #[ORM\JoinColumn(nullable: false)]
     private Organization $organization;
 
-    #[ORM\OneToMany( mappedBy: 'billingSetting', targetEntity: ResidenceArea::class, cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'billingSetting', targetEntity: ResidenceArea::class, cascade: ['persist'], orphanRemoval: true)]
     private Collection $residenceAreas;
 
     #[ORM\Column(options: ['default' => false])]
@@ -38,7 +40,8 @@ class BillingSetting
     #[ORM\OneToMany(mappedBy: 'billingSetting', targetEntity: FamilyQuotient::class, cascade: ['persist'], orphanRemoval: true)]
     private Collection $familyQuotients;
 
-    #[Pure] public function __construct()
+    #[Pure]
+    public function __construct()
     {
         $this->residenceAreas = new ArrayCollection();
         $this->familyQuotients = new ArrayCollection();
@@ -57,11 +60,9 @@ class BillingSetting
     public function setOrganization(Organization $organization): self
     {
         $this->organization = $organization;
-
         return $this;
     }
 
-
     public function getApplyVat(): bool
     {
         return $this->applyVat;
@@ -70,7 +71,6 @@ class BillingSetting
     public function setApplyVat(bool $applyVat): self
     {
         $this->applyVat = $applyVat;
-
         return $this;
     }
 
@@ -85,7 +85,6 @@ class BillingSetting
             $this->residenceAreas[] = $residenceArea;
             $residenceArea->setBillingSetting($this);
         }
-
         return $this;
     }
 
@@ -97,7 +96,6 @@ class BillingSetting
                 $residenceArea->setBillingSetting(null);
             }
         }
-
         return $this;
     }
 
@@ -115,7 +113,6 @@ class BillingSetting
             $this->familyQuotients[] = $familyQuotient;
             $familyQuotient->setBillingSetting($this);
         }
-
         return $this;
     }
 
@@ -127,7 +124,6 @@ class BillingSetting
                 $familyQuotient->setBillingSetting(null);
             }
         }
-
         return $this;
     }
 }

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class BillingSettingRent
 {

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

@@ -3,7 +3,7 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -11,7 +11,7 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class Ciril
 {

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

@@ -4,7 +4,7 @@ declare(strict_types=1);
 namespace App\Entity\Billing;
 
 use App\Entity\Booking\EducationalProject;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -12,7 +12,7 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class EducationalProjectIntangible
 {

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

@@ -1,12 +1,13 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 use App\Entity\Booking\EducationalProject;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
@@ -14,15 +15,16 @@ use Doctrine\ORM\Mapping as ORM;
  *
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Table(name: 'BillingPayer')]
-#[ORM\Entity]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getEducationalProjectPayer().getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getEducationalProjectPayer().getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Table(name: 'BillingPayer')]
+#[ORM\Entity]
 class EducationalProjectPayer
 {
     #[ORM\Column(length: 255, nullable: false)]
@@ -52,7 +54,6 @@ class EducationalProjectPayer
     public function setEducationalProjectPayer(?Access $educationalProjectPayer): self
     {
         $this->educationalProjectPayer = $educationalProjectPayer;
-
         return $this;
     }
 
@@ -64,7 +65,6 @@ class EducationalProjectPayer
     public function setEducationalProjectReceiver(?EducationalProject $educationalProjectReceiver): self
     {
         $this->educationalProjectReceiver = $educationalProjectReceiver;
-
         return $this;
     }
 }

+ 10 - 13
src/Entity/Billing/FamilyQuotient.php

@@ -1,11 +1,12 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Product\IntangibleDiscountDetail;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -13,14 +14,15 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getBillingSetting().getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getBillingSetting().getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
 class FamilyQuotient
 {
     #[ORM\Id]
@@ -57,7 +59,6 @@ class FamilyQuotient
     public function setBillingSetting(?BillingSetting $billingSetting): self
     {
         $this->billingSetting = $billingSetting;
-
         return $this;
     }
 
@@ -75,7 +76,6 @@ class FamilyQuotient
             $this->accessBilling[] = $accessBilling;
             $accessBilling->setFamilyQuotient($this);
         }
-
         return $this;
     }
 
@@ -87,7 +87,6 @@ class FamilyQuotient
                 $accessBilling->setFamilyQuotient(null);
             }
         }
-
         return $this;
     }
 
@@ -105,7 +104,6 @@ class FamilyQuotient
             $this->intangibleDiscountDetails[] = $intangibleDiscountDetail;
             $intangibleDiscountDetail->setFamilyQuotient($this);
         }
-
         return $this;
     }
 
@@ -117,7 +115,6 @@ class FamilyQuotient
                 $intangibleDiscountDetail->setFamilyQuotient(null);
             }
         }
-
         return $this;
     }
 }

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

@@ -3,7 +3,7 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -11,7 +11,7 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class Jvs
 {

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class PayfipPaymentReturn
 {

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

@@ -3,7 +3,7 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -11,7 +11,7 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class Pes
 {

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class PesSetting
 {

+ 26 - 19
src/Entity/Billing/ResidenceArea.php

@@ -1,13 +1,18 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Billing;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Post;
+use ApiPlatform\Metadata\GetCollection;
+use ApiPlatform\Metadata\Delete;
+use ApiPlatform\Metadata\Put;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Annotation\BillingSettingDefaultValue;
 use App\Entity\Product\IntangibleDiscountDetail;
 use App\Repository\Billing\ResidenceAreaRepository;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
@@ -15,19 +20,25 @@ use Doctrine\Common\Collections\Collection;
 /**
  * Zone de résidence d'un Access, telle que définie par l'Organization
  */
-#[Auditable]
 #[ApiResource(
-    collectionOperations: [
-        "get" => ["security" => "is_granted('ROLE_ORGANIZATION_VIEW')"],
-        "post"
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ORGANIZATION_VIEW\') and object.getBillingSetting().getOrganization().getId() == user.getOrganization().getId()'
+        ),
+        new Put(
+            security: 'object.getBillingSetting().getOrganization().getId() == user.getOrganization().getId()'
+        ),
+        new Delete(
+            security: 'object.getBillingSetting().getOrganization().getId() == user.getOrganization().getId()'
+        ),
+        new GetCollection(
+            security: 'is_granted(\'ROLE_ORGANIZATION_VIEW\')'
+        ),
+        new Post()
     ],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ORGANIZATION_VIEW') and object.getBillingSetting().getOrganization().getId() == user.getOrganization().getId()"],
-        "put" => ["security" => "object.getBillingSetting().getOrganization().getId() == user.getOrganization().getId()"],
-        "delete" => ["security" => "object.getBillingSetting().getOrganization().getId() == user.getOrganization().getId()"],
-    ],
-    attributes: ["security" => "is_granted('ROLE_ORGANIZATION')"]
+    security: 'is_granted(\'ROLE_ORGANIZATION\')'
 )]
+//#[Auditable]
 #[BillingSettingDefaultValue(fieldName: "billingSetting")]
 #[ORM\Entity(repositoryClass: ResidenceAreaRepository::class)]
 class ResidenceArea
@@ -66,7 +77,8 @@ class ResidenceArea
         return $this->label;
     }
 
-    public function setLabel(string $label){
+    public function setLabel(string $label)
+    {
         $this->label = $label;
         return $this;
     }
@@ -79,7 +91,6 @@ class ResidenceArea
     public function setBillingSetting(BillingSetting $billingSetting): self
     {
         $this->billingSetting = $billingSetting;
-
         return $this;
     }
 
@@ -97,7 +108,6 @@ class ResidenceArea
             $this->accessBilling[] = $accessBilling;
             $accessBilling->setResidenceArea($this);
         }
-
         return $this;
     }
 
@@ -109,7 +119,6 @@ class ResidenceArea
                 $accessBilling->setResidenceArea(null);
             }
         }
-
         return $this;
     }
 
@@ -127,7 +136,6 @@ class ResidenceArea
             $this->intangibleDiscountDetails[] = $intangibleDiscountDetail;
             $intangibleDiscountDetail->setResidenceArea($this);
         }
-
         return $this;
     }
 
@@ -139,7 +147,6 @@ class ResidenceArea
                 $intangibleDiscountDetail->setResidenceArea(null);
             }
         }
-
         return $this;
     }
 }

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

@@ -3,7 +3,7 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -11,7 +11,7 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class SddBank
 {

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

@@ -3,7 +3,7 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -11,7 +11,7 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class SddRegie
 {

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Billing;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class SddTeneur
 {

+ 11 - 14
src/Entity/Booking/Attendance.php

@@ -1,12 +1,13 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Booking;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 use App\Entity\Organization\Organization;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -14,14 +15,15 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
 class Attendance
 {
     #[ORM\Id]
@@ -38,7 +40,7 @@ class Attendance
     #[ORM\ManyToOne(inversedBy: 'attendanceReplacements')]
     private Access $replacement;
 
-    #[ORM\OneToMany( mappedBy: 'attendance', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'attendance', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $attendanceBooking;
 
@@ -60,7 +62,6 @@ class Attendance
     public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
-
         return $this;
     }
 
@@ -72,7 +73,6 @@ class Attendance
     public function setAccess(?Access $access): self
     {
         $this->access = $access;
-
         return $this;
     }
 
@@ -84,7 +84,6 @@ class Attendance
     public function setReplacement(?Access $replacement): self
     {
         $this->replacement = $replacement;
-
         return $this;
     }
 
@@ -102,7 +101,6 @@ class Attendance
             $this->attendanceBooking[] = $attendanceBooking;
             $attendanceBooking->setAttendance($this);
         }
-
         return $this;
     }
 
@@ -114,7 +112,6 @@ class Attendance
                 $attendanceBooking->setAttendance(null);
             }
         }
-
         return $this;
     }
 }

+ 10 - 14
src/Entity/Booking/AttendanceBooking.php

@@ -1,24 +1,26 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Booking;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN')"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\')'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
 class AttendanceBooking
 {
     #[ORM\Id]
@@ -57,7 +59,6 @@ class AttendanceBooking
     public function setAccess(?Access $access): self
     {
         $this->access = $access;
-
         return $this;
     }
 
@@ -69,7 +70,6 @@ class AttendanceBooking
     public function setAttendance(?Attendance $attendance): self
     {
         $this->attendance = $attendance;
-
         return $this;
     }
 
@@ -81,7 +81,6 @@ class AttendanceBooking
     public function setCourse(?Course $course): self
     {
         $this->course = $course;
-
         return $this;
     }
 
@@ -93,7 +92,6 @@ class AttendanceBooking
     public function setEducationalProject(?EducationalProject $educationalProject): self
     {
         $this->educationalProject = $educationalProject;
-
         return $this;
     }
 
@@ -105,7 +103,6 @@ class AttendanceBooking
     public function setEvent(?Event $event): self
     {
         $this->event = $event;
-
         return $this;
     }
 
@@ -117,7 +114,6 @@ class AttendanceBooking
     public function setExamen(?Examen $examen): self
     {
         $this->examen = $examen;
-
         return $this;
     }
 }

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

@@ -4,13 +4,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Booking;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class CalendarSynchro
 {

+ 16 - 38
src/Entity/Booking/Course.php

@@ -1,9 +1,11 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Booking;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\GetCollection;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 use App\Entity\Core\Tagg;
 use App\Entity\Education\Education;
@@ -13,7 +15,7 @@ use App\Entity\Place\Place;
 use App\Entity\Place\Room;
 use App\Entity\Product\Equipment;
 use App\Repository\Booking\CourseRepository;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
@@ -24,16 +26,16 @@ use Doctrine\Common\Collections\Collection;
  *
  * Classe Course qui permet de gérer les cours de la structure.
  */
-#[Auditable]
 #[ApiResource(
-    collectionOperations:[
-        'get'
-    ],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_COURSE_VIEW') and object.getOrganization().getId() == user.getOrganization().getId()"],
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_COURSE_VIEW\') and object.getOrganization().getId() == user.getOrganization().getId()'
+        ),
+        new GetCollection()
     ]
 )]
-#[ORM\Entity(repositoryClass:CourseRepository::class)]
+//#[Auditable]
+#[ORM\Entity(repositoryClass: CourseRepository::class)]
 #[ORM\Table(name: 'Booking')]
 class Course extends AbstractBooking
 {
@@ -43,7 +45,7 @@ class Course extends AbstractBooking
     #[ORM\OneToMany(mappedBy: 'event', targetEntity: CourseRecur::class, cascade: ['persist'], orphanRemoval: true)]
     private Collection $eventRecur;
 
-    #[ORM\OneToMany(mappedBy: 'parent',targetEntity: Course::class,  orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: Course::class, orphanRemoval: true)]
     private Collection $timeline;
 
     #[ORM\ManyToOne(inversedBy: 'timeline')]
@@ -80,7 +82,7 @@ class Course extends AbstractBooking
     #[ORM\InverseJoinColumn(name: 'student_id', referencedColumnName: 'id')]
     private Collection $students;
 
-    #[ORM\OneToMany(mappedBy: 'course',targetEntity: Work::class,  cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'course', targetEntity: Work::class, cascade: ['persist'], orphanRemoval: true)]
     private Collection $work;
 
     #[ORM\ManyToMany(targetEntity: Equipment::class)]
@@ -89,11 +91,11 @@ class Course extends AbstractBooking
     #[ORM\InverseJoinColumn(name: 'equipment_id', referencedColumnName: 'id')]
     private Collection $equipments;
 
-    #[ORM\OneToMany(mappedBy: 'course', targetEntity: AttendanceBooking::class, cascade: ['persist'],  orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'course', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $attendanceBooking;
 
-    #[ORM\ManyToMany(targetEntity: Tagg::class,  inversedBy: 'courses', cascade: ['persist'],)]
+    #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'courses', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_booking')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
@@ -120,7 +122,6 @@ class Course extends AbstractBooking
     public function setDiscr(string $discr): self
     {
         $this->discr = $discr;
-
         return $this;
     }
 
@@ -138,7 +139,6 @@ class Course extends AbstractBooking
             $this->eventRecur[] = $eventRecur;
             $eventRecur->setEvent($this);
         }
-
         return $this;
     }
 
@@ -150,7 +150,6 @@ class Course extends AbstractBooking
                 $eventRecur->setEvent(null);
             }
         }
-
         return $this;
     }
 
@@ -168,7 +167,6 @@ class Course extends AbstractBooking
             $this->timeline[] = $timeline;
             $timeline->setParent($this);
         }
-
         return $this;
     }
 
@@ -180,7 +178,6 @@ class Course extends AbstractBooking
                 $timeline->setParent(null);
             }
         }
-
         return $this;
     }
 
@@ -192,7 +189,6 @@ class Course extends AbstractBooking
     public function setParent(?self $parent): self
     {
         $this->parent = $parent;
-
         return $this;
     }
 
@@ -204,7 +200,6 @@ class Course extends AbstractBooking
     public function setPlace(?Place $place): self
     {
         $this->place = $place;
-
         return $this;
     }
 
@@ -216,7 +211,6 @@ class Course extends AbstractBooking
     public function setRoom(?Room $room): self
     {
         $this->room = $room;
-
         return $this;
     }
 
@@ -233,14 +227,12 @@ class Course extends AbstractBooking
         if (!$this->organizer->contains($organizer)) {
             $this->organizer[] = $organizer;
         }
-
         return $this;
     }
 
     public function removeOrganizer(Access $organizer): self
     {
         $this->organizer->removeElement($organizer);
-
         return $this;
     }
 
@@ -252,7 +244,6 @@ class Course extends AbstractBooking
     public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
-
         return $this;
     }
 
@@ -264,7 +255,6 @@ class Course extends AbstractBooking
     public function setEducation(?Education $education): self
     {
         $this->education = $education;
-
         return $this;
     }
 
@@ -281,14 +271,12 @@ class Course extends AbstractBooking
         if (!$this->educationCurriculum->contains($educationCurriculum)) {
             $this->educationCurriculum[] = $educationCurriculum;
         }
-
         return $this;
     }
 
     public function removeEducationCurriculum(EducationCurriculum $educationCurriculum): self
     {
         $this->educationCurriculum->removeElement($educationCurriculum);
-
         return $this;
     }
 
@@ -305,14 +293,12 @@ class Course extends AbstractBooking
         if (!$this->students->contains($student)) {
             $this->students[] = $student;
         }
-
         return $this;
     }
 
     public function removeStudent(Access $student): self
     {
         $this->students->removeElement($student);
-
         return $this;
     }
 
@@ -330,7 +316,6 @@ class Course extends AbstractBooking
             $this->work[] = $work;
             $work->setCourse($this);
         }
-
         return $this;
     }
 
@@ -342,7 +327,6 @@ class Course extends AbstractBooking
                 $work->setCourse(null);
             }
         }
-
         return $this;
     }
 
@@ -359,14 +343,12 @@ class Course extends AbstractBooking
         if (!$this->equipments->contains($equipment)) {
             $this->equipments[] = $equipment;
         }
-
         return $this;
     }
 
     public function removeEquipment(Equipment $equipment): self
     {
         $this->equipments->removeElement($equipment);
-
         return $this;
     }
 
@@ -384,7 +366,6 @@ class Course extends AbstractBooking
             $this->attendanceBooking[] = $attendanceBooking;
             $attendanceBooking->setCourse($this);
         }
-
         return $this;
     }
 
@@ -396,7 +377,6 @@ class Course extends AbstractBooking
                 $attendanceBooking->setCourse(null);
             }
         }
-
         return $this;
     }
 
@@ -413,14 +393,12 @@ class Course extends AbstractBooking
         if (!$this->tags->contains($tag)) {
             $this->tags[] = $tag;
         }
-
         return $this;
     }
 
     public function removeTag(Tagg $tag): self
     {
         $this->tags->removeElement($tag);
-
         return $this;
     }
 }

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

@@ -3,7 +3,7 @@ declare(strict_types=1);
 
 namespace App\Entity\Booking;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
@@ -11,7 +11,7 @@ use Doctrine\ORM\Mapping as ORM;
  *
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Table(name: 'BookingRecur')]
 #[ORM\Entity]
 class CourseRecur extends AbstractBookingRecur

+ 14 - 40
src/Entity/Booking/EducationalProject.php

@@ -1,9 +1,10 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Booking;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 use App\Entity\Billing\BillLine;
 use App\Entity\Billing\EducationalProjectIntangible;
@@ -13,7 +14,7 @@ use App\Entity\Core\Tagg;
 use App\Entity\Organization\Organization;
 use App\Entity\Place\Place;
 use App\Entity\Place\Room;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -23,15 +24,16 @@ use Doctrine\ORM\Mapping as ORM;
  * @todo : migration table tag_booking
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Table(name: 'Booking')]
-#[ORM\Entity]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Table(name: 'Booking')]
+#[ORM\Entity]
 class EducationalProject extends AbstractBooking
 {
     #[ORM\Column(length: 255, nullable: false)]
@@ -40,7 +42,7 @@ class EducationalProject extends AbstractBooking
     #[ORM\OneToMany(mappedBy: 'event', targetEntity: EducationalProjectRecur::class, cascade: ['persist'], orphanRemoval: true)]
     private Collection $eventRecur;
 
-    #[ORM\OneToMany(mappedBy: 'parent',targetEntity: EducationalProject::class,  orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: EducationalProject::class, orphanRemoval: true)]
     private Collection $timeline;
 
     #[ORM\ManyToOne(inversedBy: 'timeline')]
@@ -78,7 +80,7 @@ class EducationalProject extends AbstractBooking
     #[ORM\OneToMany(mappedBy: 'educationalProject', targetEntity: BillLine::class, orphanRemoval: true)]
     private Collection $billLines;
 
-    #[ORM\OneToMany(mappedBy: 'educationalProject', targetEntity: AttendanceBooking::class, cascade: ['persist'],  orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'educationalProject', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $attendanceBooking;
 
@@ -96,7 +98,7 @@ class EducationalProject extends AbstractBooking
     #[ORM\InverseJoinColumn(name: 'organizer_id', referencedColumnName: 'id')]
     private Collection $organizer;
 
-    #[ORM\ManyToMany(targetEntity: Tagg::class,  inversedBy: 'educationalProjects', cascade: ['persist'],)]
+    #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'educationalProjects', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_booking')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
@@ -124,7 +126,6 @@ class EducationalProject extends AbstractBooking
     public function setDiscr(string $discr): self
     {
         $this->discr = $discr;
-
         return $this;
     }
 
@@ -142,7 +143,6 @@ class EducationalProject extends AbstractBooking
             $this->eventRecur[] = $eventRecur;
             $eventRecur->setEvent($this);
         }
-
         return $this;
     }
 
@@ -154,7 +154,6 @@ class EducationalProject extends AbstractBooking
                 $eventRecur->setEvent(null);
             }
         }
-
         return $this;
     }
 
@@ -172,7 +171,6 @@ class EducationalProject extends AbstractBooking
             $this->timeline[] = $timeline;
             $timeline->setParent($this);
         }
-
         return $this;
     }
 
@@ -184,7 +182,6 @@ class EducationalProject extends AbstractBooking
                 $timeline->setParent(null);
             }
         }
-
         return $this;
     }
 
@@ -196,7 +193,6 @@ class EducationalProject extends AbstractBooking
     public function setParent(?self $parent): self
     {
         $this->parent = $parent;
-
         return $this;
     }
 
@@ -208,7 +204,6 @@ class EducationalProject extends AbstractBooking
     public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
-
         return $this;
     }
 
@@ -220,7 +215,6 @@ class EducationalProject extends AbstractBooking
     public function setSilentPartner(?Access $silentPartner): self
     {
         $this->silentPartner = $silentPartner;
-
         return $this;
     }
 
@@ -232,7 +226,6 @@ class EducationalProject extends AbstractBooking
     public function setPublic(?EducationalProjectPublic $public): self
     {
         $this->public = $public;
-
         return $this;
     }
 
@@ -244,7 +237,6 @@ class EducationalProject extends AbstractBooking
     public function setOperationalPartner(?Access $operationalPartner): self
     {
         $this->operationalPartner = $operationalPartner;
-
         return $this;
     }
 
@@ -261,14 +253,12 @@ class EducationalProject extends AbstractBooking
         if (!$this->financiers->contains($financier)) {
             $this->financiers[] = $financier;
         }
-
         return $this;
     }
 
     public function removeFinancier(Access $financier): self
     {
         $this->financiers->removeElement($financier);
-
         return $this;
     }
 
@@ -285,14 +275,12 @@ class EducationalProject extends AbstractBooking
         if (!$this->files->contains($file)) {
             $this->files[] = $file;
         }
-
         return $this;
     }
 
     public function removeFile(File $file): self
     {
         $this->files->removeElement($file);
-
         return $this;
     }
 
@@ -310,7 +298,6 @@ class EducationalProject extends AbstractBooking
             $this->educationalProjectIntangibles[] = $educationalProjectIntangible;
             $educationalProjectIntangible->setEducationalProject($this);
         }
-
         return $this;
     }
 
@@ -322,7 +309,6 @@ class EducationalProject extends AbstractBooking
                 $educationalProjectIntangible->setEducationalProject(null);
             }
         }
-
         return $this;
     }
 
@@ -340,7 +326,6 @@ class EducationalProject extends AbstractBooking
             $this->billingReceivers[] = $billingReceiver;
             $billingReceiver->setEducationalProjectReceiver($this);
         }
-
         return $this;
     }
 
@@ -352,7 +337,6 @@ class EducationalProject extends AbstractBooking
                 $billingReceiver->setEducationalProjectReceiver(null);
             }
         }
-
         return $this;
     }
 
@@ -370,7 +354,6 @@ class EducationalProject extends AbstractBooking
             $this->billLines[] = $billLine;
             $billLine->setEducationalProject($this);
         }
-
         return $this;
     }
 
@@ -382,7 +365,6 @@ class EducationalProject extends AbstractBooking
                 $billLine->setEducationalProject(null);
             }
         }
-
         return $this;
     }
 
@@ -400,7 +382,6 @@ class EducationalProject extends AbstractBooking
             $this->attendanceBooking[] = $attendanceBooking;
             $attendanceBooking->setEducationalProject($this);
         }
-
         return $this;
     }
 
@@ -412,7 +393,6 @@ class EducationalProject extends AbstractBooking
                 $attendanceBooking->setEducationalProject(null);
             }
         }
-
         return $this;
     }
 
@@ -424,7 +404,6 @@ class EducationalProject extends AbstractBooking
     public function setPlace(?Place $place): self
     {
         $this->place = $place;
-
         return $this;
     }
 
@@ -436,7 +415,6 @@ class EducationalProject extends AbstractBooking
     public function setRoom(?Room $room): self
     {
         $this->room = $room;
-
         return $this;
     }
 
@@ -453,14 +431,12 @@ class EducationalProject extends AbstractBooking
         if (!$this->organizer->contains($organizer)) {
             $this->organizer[] = $organizer;
         }
-
         return $this;
     }
 
     public function removeOrganizer(Access $organizer): self
     {
         $this->organizer->removeElement($organizer);
-
         return $this;
     }
 
@@ -477,14 +453,12 @@ class EducationalProject extends AbstractBooking
         if (!$this->tags->contains($tag)) {
             $this->tags[] = $tag;
         }
-
         return $this;
     }
 
     public function removeTag(Tagg $tag): self
     {
         $this->tags->removeElement($tag);
-
         return $this;
     }
 }

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

@@ -3,11 +3,11 @@ declare(strict_types=1);
 
 namespace App\Entity\Booking;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 use Symfony\Component\Serializer\Annotation\Groups;
 
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class EducationalProjectAge
 {

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

@@ -3,12 +3,12 @@ declare(strict_types=1);
 
 namespace App\Entity\Booking;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
 
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class EducationalProjectPublic
 {

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Booking;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * @todo : A la suite de la migration, il faut supprimer le nom de la table pour avoir une table EducationalProjectRecur, et supprimer l'attribut discr.
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Table(name: 'BookingRecur')]
 #[ORM\Entity]
 class EducationalProjectRecur extends AbstractBookingRecur

+ 16 - 40
src/Entity/Booking/Event.php

@@ -1,9 +1,10 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Booking;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
 use App\Entity\Core\Categories;
 use App\Entity\Core\File;
@@ -12,7 +13,7 @@ use App\Entity\Organization\Organization;
 use App\Entity\Place\Place;
 use App\Entity\Place\PlaceSystem;
 use App\Entity\Place\Room;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -22,15 +23,16 @@ use Symfony\Component\Validator\Constraints as Assert;
  * @todo : A la suite de la migration, il faut supprimer le nom de la table pour avoir une table Event, et supprimer l'attribut discr.
  * @todo : migration table tag_booking
  */
-#[Auditable]
-#[ORM\Entity]
-#[ORM\Table(name: 'Booking')]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
+#[ORM\Table(name: 'Booking')]
 class Event extends AbstractBooking
 {
     #[ORM\Column(length: 255, nullable: false)]
@@ -51,14 +53,14 @@ class Event extends AbstractBooking
     #[ORM\OneToMany(mappedBy: 'event', targetEntity: EventRecur::class, cascade: ['persist'], orphanRemoval: true)]
     private Collection $eventRecur;
 
-    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: Event::class,  orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: Event::class, orphanRemoval: true)]
     private Collection $timeline;
 
     #[ORM\ManyToOne(inversedBy: 'timeline')]
     private Event $parent;
 
     #[Assert\Valid]
-    #[ORM\ManyToOne(cascade: ['persist'],inversedBy: 'events')]
+    #[ORM\ManyToOne(cascade: ['persist'], inversedBy: 'events')]
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     private File $image;
 
@@ -66,7 +68,7 @@ class Event extends AbstractBooking
     private EventGender $gender;
 
     #[Assert\Valid]
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: EventUser::class,  cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'event', targetEntity: EventUser::class, cascade: ['persist'], orphanRemoval: true)]
     private Collection $eventUser;
 
     #[ORM\ManyToMany(targetEntity: Categories::class, cascade: ['persist'])]
@@ -85,7 +87,7 @@ class Event extends AbstractBooking
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     private PlaceSystem $placeSystem;
 
-    #[ORM\OneToMany(mappedBy: 'event', targetEntity: AttendanceBooking::class, cascade: ['persist'],  orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'event', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $attendanceBooking;
 
@@ -95,7 +97,7 @@ class Event extends AbstractBooking
     #[ORM\InverseJoinColumn(name: 'organizer_id', referencedColumnName: 'id')]
     private Collection $organizer;
 
-    #[ORM\ManyToMany(targetEntity: Tagg::class,  inversedBy: 'events', cascade: ['persist'],)]
+    #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'events', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_booking')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
@@ -122,7 +124,6 @@ class Event extends AbstractBooking
     public function setDiscr(string $discr): self
     {
         $this->discr = $discr;
-
         return $this;
     }
 
@@ -134,7 +135,6 @@ class Event extends AbstractBooking
     public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
-
         return $this;
     }
 
@@ -146,7 +146,6 @@ class Event extends AbstractBooking
     public function setPlace(?Place $place): self
     {
         $this->place = $place;
-
         return $this;
     }
 
@@ -158,7 +157,6 @@ class Event extends AbstractBooking
     public function setRoom(?Room $room): self
     {
         $this->room = $room;
-
         return $this;
     }
 
@@ -176,7 +174,6 @@ class Event extends AbstractBooking
             $this->eventRecur[] = $eventRecur;
             $eventRecur->setEvent($this);
         }
-
         return $this;
     }
 
@@ -188,7 +185,6 @@ class Event extends AbstractBooking
                 $eventRecur->setEvent(null);
             }
         }
-
         return $this;
     }
 
@@ -206,7 +202,6 @@ class Event extends AbstractBooking
             $this->timeline[] = $timeline;
             $timeline->setParent($this);
         }
-
         return $this;
     }
 
@@ -218,7 +213,6 @@ class Event extends AbstractBooking
                 $timeline->setParent(null);
             }
         }
-
         return $this;
     }
 
@@ -230,7 +224,6 @@ class Event extends AbstractBooking
     public function setParent(?self $parent): self
     {
         $this->parent = $parent;
-
         return $this;
     }
 
@@ -242,7 +235,6 @@ class Event extends AbstractBooking
     public function setImage(?File $image): self
     {
         $this->image = $image;
-
         return $this;
     }
 
@@ -254,7 +246,6 @@ class Event extends AbstractBooking
     public function setGender(?EventGender $gender): self
     {
         $this->gender = $gender;
-
         return $this;
     }
 
@@ -272,7 +263,6 @@ class Event extends AbstractBooking
             $this->eventUser[] = $eventUser;
             $eventUser->setEvent($this);
         }
-
         return $this;
     }
 
@@ -284,7 +274,6 @@ class Event extends AbstractBooking
                 $eventUser->setEvent(null);
             }
         }
-
         return $this;
     }
 
@@ -301,14 +290,12 @@ class Event extends AbstractBooking
         if (!$this->categories->contains($category)) {
             $this->categories[] = $category;
         }
-
         return $this;
     }
 
     public function removeCategory(Categories $category): self
     {
         $this->categories->removeElement($category);
-
         return $this;
     }
 
@@ -326,7 +313,6 @@ class Event extends AbstractBooking
             $this->eventReports[] = $eventReport;
             $eventReport->setEvent($this);
         }
-
         return $this;
     }
 
@@ -338,7 +324,6 @@ class Event extends AbstractBooking
                 $eventReport->setEvent(null);
             }
         }
-
         return $this;
     }
 
@@ -355,14 +340,12 @@ class Event extends AbstractBooking
         if (!$this->files->contains($file)) {
             $this->files[] = $file;
         }
-
         return $this;
     }
 
     public function removeFile(File $file): self
     {
         $this->files->removeElement($file);
-
         return $this;
     }
 
@@ -374,7 +357,6 @@ class Event extends AbstractBooking
     public function setPlaceSystem(?PlaceSystem $placeSystem): self
     {
         $this->placeSystem = $placeSystem;
-
         return $this;
     }
 
@@ -392,7 +374,6 @@ class Event extends AbstractBooking
             $this->attendanceBooking[] = $attendanceBooking;
             $attendanceBooking->setEvent($this);
         }
-
         return $this;
     }
 
@@ -404,7 +385,6 @@ class Event extends AbstractBooking
                 $attendanceBooking->setEvent(null);
             }
         }
-
         return $this;
     }
 
@@ -421,14 +401,12 @@ class Event extends AbstractBooking
         if (!$this->organizer->contains($organizer)) {
             $this->organizer[] = $organizer;
         }
-
         return $this;
     }
 
     public function removeOrganizer(Access $organizer): self
     {
         $this->organizer->removeElement($organizer);
-
         return $this;
     }
 
@@ -445,14 +423,12 @@ class Event extends AbstractBooking
         if (!$this->tags->contains($tag)) {
             $this->tags[] = $tag;
         }
-
         return $this;
     }
 
     public function removeTag(Tagg $tag): self
     {
         $this->tags->removeElement($tag);
-
         return $this;
     }
 }

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

@@ -3,10 +3,10 @@ declare(strict_types=1);
 
 namespace App\Entity\Booking;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class EventGender
 {

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

@@ -3,13 +3,13 @@ declare(strict_types=1);
 
 namespace App\Entity\Booking;
 
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * @todo : A la suite de la migration, il faut supprimer le nom de la table pour avoir une table EventRecur, et supprimer l'attribut discr.
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 #[ORM\Table(name: 'BookingRecur')]
 class EventRecur extends AbstractBookingRecur

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

@@ -4,12 +4,12 @@ declare(strict_types=1);
 namespace App\Entity\Booking;
 
 use App\Entity\Core\File;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\ORM\Mapping as ORM;
 use Doctrine\Common\Collections\Collection;
 
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class EventReport
 {

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

@@ -1,24 +1,26 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Booking;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Access\Access;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getAccess().getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getAccess().getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
 class EventUser
 {
     #[ORM\Id]
@@ -45,7 +47,6 @@ class EventUser
     public function setEvent(?Event $event): self
     {
         $this->event = $event;
-
         return $this;
     }
 
@@ -57,7 +58,6 @@ class EventUser
     public function setGuest(?Access $guest): self
     {
         $this->guest = $guest;
-
         return $this;
     }
 }

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

@@ -1,9 +1,10 @@
 <?php
-declare(strict_types=1);
+declare (strict_types=1);
 
 namespace App\Entity\Booking;
 
-use ApiPlatform\Core\Annotation\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\ApiResource;
 use App\Entity\Core\Tagg;
 use App\Entity\Education\Education;
 use App\Entity\Education\EducationCurriculum;
@@ -11,7 +12,7 @@ use App\Entity\Organization\Jury;
 use App\Entity\Organization\Organization;
 use App\Entity\Place\Place;
 use App\Entity\Place\Room;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -21,15 +22,16 @@ use Doctrine\ORM\Mapping as ORM;
  * @todo : migration table tag_booking
  * Classe ... qui ...
  */
-#[Auditable]
-#[ORM\Entity]
-#[ORM\Table(name: 'Booking')]
 #[ApiResource(
-    collectionOperations:[],
-    itemOperations: [
-        "get" => ["security" => "is_granted('ROLE_ADMIN') and object.getOrganization().getId() == user.getOrganization().getId()"]
+    operations: [
+        new Get(
+            security: 'is_granted(\'ROLE_ADMIN\') and object.getOrganization().getId() == user.getOrganization().getId()'
+        )
     ]
 )]
+//#[Auditable]
+#[ORM\Entity]
+#[ORM\Table(name: 'Booking')]
 class Examen extends AbstractBooking
 {
     #[ORM\Column(length: 255, nullable: false)]
@@ -39,10 +41,10 @@ class Examen extends AbstractBooking
     #[ORM\JoinColumn(nullable: false)]
     protected Organization $organization;
 
-    #[ORM\OneToMany(mappedBy: 'event',targetEntity: ExamenRecur::class,  cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'event', targetEntity: ExamenRecur::class, cascade: ['persist'], orphanRemoval: true)]
     private Collection $eventRecur;
 
-    #[ORM\OneToMany(mappedBy: 'parent',targetEntity: Examen::class,  orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'parent', targetEntity: Examen::class, orphanRemoval: true)]
     private Collection $timeline;
 
     #[ORM\ManyToOne(inversedBy: 'timeline')]
@@ -59,10 +61,10 @@ class Examen extends AbstractBooking
     #[ORM\ManyToMany(targetEntity: EducationCurriculum::class)]
     private Collection $educationCurriculum;
 
-    #[ORM\OneToMany(mappedBy: 'examen',targetEntity: ExamenConvocation::class,  cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'examen', targetEntity: ExamenConvocation::class, cascade: ['persist'], orphanRemoval: true)]
     private Collection $convocation;
 
-    #[ORM\OneToMany(mappedBy: 'examen', targetEntity: AttendanceBooking::class, cascade: ['persist'],  orphanRemoval: true)]
+    #[ORM\OneToMany(mappedBy: 'examen', targetEntity: AttendanceBooking::class, cascade: ['persist'], orphanRemoval: true)]
     #[ORM\JoinColumn(nullable: false)]
     private Collection $attendanceBooking;
 
@@ -74,7 +76,7 @@ class Examen extends AbstractBooking
     #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
     protected Room $room;
 
-    #[ORM\ManyToMany(targetEntity: Tagg::class,  inversedBy: 'examens', cascade: ['persist'],)]
+    #[ORM\ManyToMany(targetEntity: Tagg::class, inversedBy: 'examens', cascade: ['persist'])]
     #[ORM\JoinTable(name: 'tag_booking')]
     #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
     #[ORM\InverseJoinColumn(name: 'tag_id', referencedColumnName: 'id')]
@@ -98,7 +100,6 @@ class Examen extends AbstractBooking
     public function setDiscr(string $discr): self
     {
         $this->discr = $discr;
-
         return $this;
     }
 
@@ -110,7 +111,6 @@ class Examen extends AbstractBooking
     public function setOrganization(?Organization $organization): self
     {
         $this->organization = $organization;
-
         return $this;
     }
 
@@ -128,7 +128,6 @@ class Examen extends AbstractBooking
             $this->eventRecur[] = $eventRecur;
             $eventRecur->setEvent($this);
         }
-
         return $this;
     }
 
@@ -140,7 +139,6 @@ class Examen extends AbstractBooking
                 $eventRecur->setEvent(null);
             }
         }
-
         return $this;
     }
 
@@ -158,7 +156,6 @@ class Examen extends AbstractBooking
             $this->timeline[] = $timeline;
             $timeline->setParent($this);
         }
-
         return $this;
     }
 
@@ -170,7 +167,6 @@ class Examen extends AbstractBooking
                 $timeline->setParent(null);
             }
         }
-
         return $this;
     }
 
@@ -182,7 +178,6 @@ class Examen extends AbstractBooking
     public function setParent(?self $parent): self
     {
         $this->parent = $parent;
-
         return $this;
     }
 
@@ -194,7 +189,6 @@ class Examen extends AbstractBooking
     public function setJury(?Jury $jury): self
     {
         $this->jury = $jury;
-
         return $this;
     }
 
@@ -206,7 +200,6 @@ class Examen extends AbstractBooking
     public function setEducation(?Education $education): self
     {
         $this->education = $education;
-
         return $this;
     }
 
@@ -223,14 +216,12 @@ class Examen extends AbstractBooking
         if (!$this->educationCurriculum->contains($educationCurriculum)) {
             $this->educationCurriculum[] = $educationCurriculum;
         }
-
         return $this;
     }
 
     public function removeEducationCurriculum(EducationCurriculum $educationCurriculum): self
     {
         $this->educationCurriculum->removeElement($educationCurriculum);
-
         return $this;
     }
 
@@ -248,7 +239,6 @@ class Examen extends AbstractBooking
             $this->convocation[] = $convocation;
             $convocation->setExamen($this);
         }
-
         return $this;
     }
 
@@ -260,7 +250,6 @@ class Examen extends AbstractBooking
                 $convocation->setExamen(null);
             }
         }
-
         return $this;
     }
 
@@ -278,7 +267,6 @@ class Examen extends AbstractBooking
             $this->attendanceBooking[] = $attendanceBooking;
             $attendanceBooking->setExamen($this);
         }
-
         return $this;
     }
 
@@ -290,7 +278,6 @@ class Examen extends AbstractBooking
                 $attendanceBooking->setExamen(null);
             }
         }
-
         return $this;
     }
 
@@ -302,7 +289,6 @@ class Examen extends AbstractBooking
     public function setPlace(?Place $place): self
     {
         $this->place = $place;
-
         return $this;
     }
 
@@ -314,7 +300,6 @@ class Examen extends AbstractBooking
     public function setRoom(?Room $room): self
     {
         $this->room = $room;
-
         return $this;
     }
 
@@ -331,14 +316,12 @@ class Examen extends AbstractBooking
         if (!$this->tags->contains($tag)) {
             $this->tags[] = $tag;
         }
-
         return $this;
     }
 
     public function removeTag(Tagg $tag): self
     {
         $this->tags->removeElement($tag);
-
         return $this;
     }
 }

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

@@ -5,7 +5,7 @@ namespace App\Entity\Booking;
 
 use App\Entity\Access\Access;
 use App\Entity\Product\Equipment;
-use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
+//use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
 use Doctrine\Common\Collections\ArrayCollection;
 use Doctrine\Common\Collections\Collection;
 use Doctrine\ORM\Mapping as ORM;
@@ -13,7 +13,7 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * Classe ... qui ...
  */
-#[Auditable]
+//#[Auditable]
 #[ORM\Entity]
 class ExamenConvocation
 {

Some files were not shown because too many files changed in this diff