2518 Commits

Author SHA1 Message Date
0b40d807bc
Implement HasCentersInterface in Household class (will fix access control)
The Household class now implements the HasCentersInterface and includes a method to get all centers associated with current persons in the household. This enhancement will allow fetching of all household-associated centers easier.
2024-04-10 12:43:04 +02:00
a3efae7831
Update budget element voter and improve form handling in permissions group
The base class of BudgetElementVoter has been changed to Voter, and the form handling in PermissionsGroupController has been improved for better validation. In addition, minor changes were made for better menu building and service configuration was updated. Unnecessary date validation in AbstractElement has been removed as well.
2024-04-10 10:31:00 +02:00
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
29d53c53a4
fixup! Fix configuration and usage of password hasher 2024-04-08 13:45:37 +02:00
8700352cf8
Fix configuration and usage of password hasher 2024-04-08 13:21:34 +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
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
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
4f08019618
Fix the join in the user list (admin): show only current user job 2024-03-20 12:45:08 +01:00
f78f5e8419
Fix cs with php-cs-fixer version 3.52 2024-03-19 20:49:39 +01:00
0ff51b0a5c Force new parameter to be readonly in LoadAndUpdateLanguagesCommand constructor 2024-03-14 15:05: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
d29415317b Allow users to display news on homepage (+ configuring a dashboard homepage) 2024-03-07 21:08:00 +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
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
07f03ab715
Make data providers static on AbstractExportTest.php and Write a rector rule to adapt existing 2024-02-16 21:49:27 +01:00
11f6b78b26
Make static some methods in AbstractAggregatorTest.php + rector rule to adapt existing 2024-02-16 19:16:07 +01:00
fa0204adbc
Refactor test methods in AbstractFilterTest to be static + rector rules for updating existing
All test methods in AbstractFilterTest class have been refactored to be static.

A rector rule has been created to refactor existing test.
2024-02-14 22:30:16 +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
2ed42e1a2c
Fix cs with php-cs-fier version 3.49 2024-02-08 21:12:27 +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
e902b6d409
Create a page which list events 2024-02-08 12:59:50 +01:00
cef218fed5
Add interface for pagination 2024-02-08 12:59:47 +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
2b968b9a5b order centers dropdown alphabetically 2024-02-08 11:21:33 +01:00
32ae2f8f0d
Add a separate method for onPersist, use same private resetCache method 2024-02-07 13:55:31 +01:00
15f8432ce0
Use PostUpdateEventArgs typing instead of PostPersistEventArgs 2024-02-07 13:55:29 +01:00
036fe8d6f8
upgrade php-cs 3.49 2024-02-07 10:43:53 +01:00
27ce322690
upgrade php-cs-fixer to 3.47.0 2024-01-22 12:14:39 +01:00
3c8e59e088 php cs fixes after updating php cs fixer 2024-01-10 10:31:25 +01:00
825cd127d1
update php-cs-fixer and rector + fix rules 2024-01-09 13:50:45 +01:00
a63b40fb6c
use service subscriber injection to inject manager registry 2024-01-09 13:48:14 +01:00
5703fd0046
Refactor code to directly use Doctrine's ManagerRegistry
Replaced most of the invocations of getDoctrine()->getManager() with ManagerRegistry->getManager(), and added ManagerRegistry injection to controllers where needed. This is part of an ongoing effort to improve code clarity, and avoid unnecessary method chaining in various parts of the codebase.
2023-12-16 19:09:34 +01:00
655dc02538
CRUDRoutesLoader: use the syntax controller::method instead of the deprecated controller:method 2023-12-14 23:57:20 +01:00