Commit Graph

3864 Commits

Author SHA1 Message Date
76fdd6d889 Add explicit controller definition requirement for APIs
Updated API creation to require an explicit controller definition. This change has been reflected in the ChillMainExtension and ChillPersonExtension files. Also, it has introduced a new exception, the InvalidCrudConfiguration, which will be thrown when a new API or CRUD is created without this explicit controller definition.
2024-04-08 19:06:47 +02:00
78a3dfd65e Add validation for household metadata
A new validation group 'household_metadata' has been added to the Household form. The 'waitingForBirth' field now has a type check, and for the 'waitingForBirthDate' field, an expression is added to ensure it's set if 'waitingForBirth' is true. Simultaneously, error handling for form submission has been enriched in the HouseholdController to display specific error messages.
2024-04-08 14:52:40 +02:00
e3bd68112e fix test for editing household metadata 2024-04-08 13:44:22 +02:00
19ffef156b Fix use of Ordering constant in doctrine orm association
See https://github.com/doctrine/orm/issues/11313 for a follow-up
2024-04-08 13:10:38 +02:00
e8c7623a1e Refactor Relationship entity to use traits
The Relationship entity in ChillPersonBundle has been refactored to use TrackCreationTrait and TrackUpdateTrait. As a result, the redundant code for handling creation and update tracking has been removed. This change will simplify future development by reusing core functionality from the trait instead of manually controlling the process in each entity.
2024-04-08 12:13:39 +02:00
5be85a4fc6 Refactored code to use PHP8 attributes instead of annotations
In this change, Doctrine and validation annotations have been replaced with PHP8 Attributes. The Rector tool has been configured with a list of annotations to convert to attributes. As a consequence, the PHPStan's rules have been updated to reflect these changes. The PHP8's nullable operator (?) has been added where required, and comments in field declaration have been replaced with #[Attribute] syntax.
2024-04-08 12:11:29 +02:00
0ff4593863 Apply rector rules: add annotation for doctrine mapping 2024-04-05 13:11:42 +02:00
a3f775a69b Apply rector rules: add annotation for doctrine mapping 2024-04-05 00:19:30 +02:00
72016e1a21 Apply rector rules: add annotation for doctrine mapping 2024-04-05 00:01:30 +02:00
579bd829f8 Apply rector rules: symfony up to 54 2024-04-04 23:30:25 +02:00
1ee3b9e2f0 Remove the tearDown method, because we are not able to delete entities linked with materialized views 2024-04-04 23:00:27 +02:00
e5e9ba6d31 make static required method in AbstractExportTests 2024-04-04 22:46:13 +02:00
a497c3ffca fix return type of getFormData 2024-04-04 22:37:44 +02:00
553fb271e4 fix container operations within tests 2024-04-04 22:26:42 +02:00
92800f5dd0 fix cs 2024-04-04 22:19:56 +02:00
931c69eee4 Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-04-04 18:45:01 +02:00
d6a6cc2572 Rename chill.role tag to chill_main.provide_role and optimize role provider
The `chill.role` tag has been renamed to `chill_main.provide_role` to prevent any confusion and make the namespaces more consistent. During this process, the class RoleProvidersCompilerPass was deleted, simplifying the role provision process by injecting tagged services directly into the RoleProvider. The change is also reflected in multiple YAML service configurations and explained in the MIGRATION.md file.
2024-04-03 17:14:02 +02:00
fc88a5f40d Improve admin UX for configuration of document template (document generation) 2024-03-26 17:06:49 +00:00
f78f5e8419 Fix cs with php-cs-fixer version 3.52 2024-03-19 20:49:39 +01:00
ccf3324bc2 Refactor ListPersonHelper and ListPerson to simplify process and allow to add customization of fields 2024-03-19 20:49:39 +01:00
dd056efa0d In the accompanying period list, add person's centers and duration 2024-03-14 21:35:00 +00:00
d66933c8b5 Merge branch '264-repair-loading-languages' into 'master'
Fix the command which load language

Closes #264

See merge request Chill-Projet/chill-bundles!666
2024-03-14 15:12:30 +00:00
d7f4895248 Fix the command which load language
The command load the languages in the configured languages in chill's configuration.
2024-03-14 15:46:32 +01:00
5880858191 Resolve "Nouveau filtre: Filtrer les actions ayant reçu une nouvelle évaluation créée entre deux dates" 2024-03-08 10:37:43 +00:00
1d636f5e9e Fix deprecations and code style issues 2024-03-07 15:26:58 +01:00
5b714f17be order scopes alphabetically 2024-02-26 14:40:41 +01:00
bbb167bb85 order user jobs alphabetically when returning all active user jobs 2024-02-26 13:36:44 +01:00
97f2c75de8 Change syntax of check on null for closing motive 2024-02-21 20:14:18 +01:00
00444e1e56 Add check on null value in template for closing motive 2024-02-20 10:10:44 +01:00
0081146a78 Change non-static class-level variables and methods to static in tests's data providers
The update modifies several test classes within the "chill-project" to change non-static class-level variables and methods to static ones. This change has been made to improve readability, performance, and to eliminate unnecessary instantiation of class objects in test scenarios. Also, flush and clear actions on the entity manager are moved to individual data providers.
2024-02-19 15:38:28 +01:00
d0f23eb6b1 fixup! Make all existing export test data provider static 2024-02-18 23:17:33 +01:00
bb4b7e9735 Make all existing export test data provider static 2024-02-16 21:52:47 +01:00
b9ae878791 Aggregators: Update test methods to static and return array
Modified aggregator test methods throughout the Chill project to be now static methods. Also updated yield construction to array returns for more standardised code.
2024-02-16 21:33:57 +01:00
94725bc92f fixup! Update test methods to static in AbstractFilterTest 2024-02-16 19:17:10 +01:00
35d55cced4 Update test methods to static in AbstractFilterTest
The methods getFormData() and getQueryBuilders() across multiple test classes have been updated to static methods. This refactoring is part of a broader effort to improve code structure and readability. A rector rule has been employed to assist in the systematic update of these existing methods.
2024-02-16 19:09:15 +01:00
f251e6f100 upgrade phpunit: make data provider static 2024-02-14 12:28:14 +01:00
510023d630 fix cs 2024-02-13 21:04:09 +01:00
2ddfd56401 fix phpstan and rector errors, fix path for rector rules 2024-02-13 19:12:14 +01:00
f889d67e94 fixes after merge of master into upgrade-sf4 2024-02-12 22:31:16 +01:00
37af488f69 Merge branch 'master' into upgrade-sf5 2024-02-12 21:50:34 +01:00
b3d1320c94 Merge branch '149-150-events-improve' into 'master'
Modernisation fonctionnement module Evénement

Closes #149, #150, and #225

See merge request Chill-Projet/chill-bundles!621
2024-02-08 20:19:30 +00:00
cc281762b3 Translate message on conflict in AccompanyingPeriodWorkEdit App 2024-02-08 14:33:30 +01:00
aa0cadfa84 Add conflict resolution for generated API + add test
Implemented additional code to handle version conflicts when editing accompanying period work. By keeping track of the current version and returning an HTTP conflict response when it doesn't match with the provided entity version, users are properly alerted to update their entity before continuing. Furthermore, adjusted BadRequestHttpException to match correct arguments order and introduced entity version as query parameter for the URL.

ensure kernel is shutdown after generating data
2024-02-08 14:33:30 +01:00
9b9c2774ad Allow Pick*Type to submit the form when selection an entity, and apply inside Event 2024-02-08 12:59:50 +01:00
f11f7498d7 Add new option "as_id" to Pick*DynamicType
This option will make the app return a single id of the entity in data, and not the entity json.
2024-02-08 12:54:44 +01:00
3bb911b4d0 Update version within PUT request
Try to add api logic

check for version being the same instead of smaller

implementing optimistic locking and displaying correct message in frontend

rector fixes

adjust violation message and add translation in translation.yaml

add translator in apiController
2024-02-08 12:09:51 +01:00
f00b39980c Add version of the social action to the state
put correct serialization groups
2024-02-08 12:08:36 +01:00
09882bb4be Add translations that were missing according to console error 2024-02-08 12:08:35 +01:00
1d21499eab add version property to accompanyingperiodwork for optimistic locking 2024-02-08 12:08:35 +01:00
f1fa4d415e Fix messages+intl-icu.fr.yaml file, which was altered during multiple git merge 2024-02-07 21:28:18 +01:00