176 Commits

Author SHA1 Message Date
92800f5dd0
fix cs 2024-04-04 22:19:56 +02:00
409a571010
fix upgrade in document generation request 2024-04-04 22:17:51 +02:00
931c69eee4
Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-04-04 18:45:01 +02:00
807f1b4aa1
Fix layout in admin document generation
A layout issue in the admin document generation has been fixed, particularly in the ChillDocGeneratorBundle. Unnecessary elements such as table headers and multiple entity data rows in DocGeneratorTemplate have been removed, simplifying the view page and improving its performance.
2024-03-26 22:10:01 +01:00
fc88a5f40d Improve admin UX for configuration of document template (document generation) 2024-03-26 17:06:49 +00:00
f251e6f100
upgrade phpunit: make data provider static 2024-02-14 12:28: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
036fe8d6f8
upgrade php-cs 3.49 2024-02-07 10:43:53 +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
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
1098bafd3d
Replaced the deprecated 'self::$container->get' with 'self::getContainer()->get' using rector
This change is made to comply with the new Symfony standards and to avoid deprecation warnings for future versions. The update touches various functionalities, including retrieving EntityManagerInterface instance and various service classes within the test files.
2023-12-14 23:36:56 +01:00
da997badd9
Fix phpstan issues 2023-12-12 22:43:44 +01:00
63124f8f92
Fix type-hinting of DocGenObjectNormalizer and related 2023-11-21 13:37:23 +01:00
bc2041cbdd
apply more cs rules for php-cs 2023-10-17 13:27:03 +02:00
d2323e91ca
new cs rule: single_line_empty_body
Rule is added to the last version of php-cs-fixer
2023-09-12 15:58:59 +02:00
1f2ecb923e
Remove unnecessary return types 2023-08-30 20:49:26 +02:00
bad3cdca09
Fix serializing collection with intersection types 2023-08-30 20:25:35 +02:00
68e1384416
Remove echo with array to string conversion 2023-08-30 15:11:47 +02:00
d1e09d7047
Fix constructor signature of BaseContext (in BaseContextDataTest.php) 2023-08-28 16:09:21 +02:00
e839b03cc9
Update path to twig template with new syntax 2023-07-28 12:16:50 +02:00
f570fe92a5
apply rector rules 2023-07-28 02:40:02 +02:00
023a29cb78
apply rector rules: php up to php82 2023-07-19 23:19:50 +02:00
224c2c74e8
Merge remote-tracking branch 'origin/master' into rector/rules-up-to-php80
Conflicts:
	src/Bundle/ChillActivityBundle/Controller/ActivityController.php
	src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php
	src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php
	src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php
	src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php
	src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php
	src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSGraphUserRepository.php
	src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php
	src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php
	src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php
	src/Bundle/ChillEventBundle/Search/EventSearch.php
	src/Bundle/ChillMainBundle/Controller/ExportController.php
	src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php
	src/Bundle/ChillMainBundle/Cron/CronManager.php
	src/Bundle/ChillMainBundle/Entity/CronJobExecution.php
	src/Bundle/ChillMainBundle/Export/ExportManager.php
	src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php
	src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php
	src/Bundle/ChillMainBundle/Repository/NotificationRepository.php
	src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php
	src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php
	src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactory.php
	src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
	src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php
	src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php
	src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php
	src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php
	src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php
	src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php
	src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php
	src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkEvaluationContext.php
	src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContext.php
	src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php
	src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php
2023-07-17 12:49:13 +02:00
8a684734e7
Fixed: fix docgen normalization on household with "old" members
When a household had old members, the indexes of each "current" members
should be numerical and contiguous, to be transformed in a list. If this
is not the case, the members are mapped to an associative array.

This commit alter the generic DocGenObjectNormalizer to ensure that
the ReadableCollection are normalized using the
CollectionDocGenNormalizer as default, which do not preserve keys.
2023-05-16 23:30:02 +02:00
dde3002100
DX: apply rector rules up to php8.0 2023-04-28 22:30:33 +02:00
47d0334b9e
Merge remote-tracking branch 'origin/master' into rector/rules-up-to-php74 2023-04-27 23:32:31 +02:00
01f2697b8d Merge branch 'admin-permissionsgroup-templates' into 'master'
Improve permissionsgroup page in admin templates

See merge request Chill-Projet/chill-bundles!504
2023-04-21 15:36:00 +00:00
746ed4f5e5
DX: fix cs 2023-04-15 00:43:55 +02:00
858ade467c
DX: rector rules upt to PHP 74 2023-04-15 00:20:19 +02:00
19034ac1d8
Merge remote-tracking branch 'origin/master' into refactor-using-rector-202303 2023-04-15 00:07:09 +02:00
ec7f59fc03 UX [translations] batch replace 'activité' by 'échange' + check !
note: fix some others mistakes
2023-04-14 15:58:27 +02:00
0af13b028e UX: improve admin templates 2023-04-14 13:02:36 +02:00
2a4b73457b
DX: fix phpstan issues 2023-04-12 17:48:02 +02:00
4c5dae60a8
DX: apply rector rulesets up to PHP 73 2023-03-29 22:39:11 +02:00
331443ae12
fix cs 2023-03-28 18:12:47 +02:00
97a4c39941
Merge branch 'master' into upgrade-php82 2023-03-20 12:40:58 +01:00
44ecad2bca
Fixed: re-introduce creator in async doc generation 2023-03-15 13:38:19 +01:00
672418e70a
Merge branch 'master' into upgrade-php82 2023-03-06 16:37:09 +01:00
f5d17eb38c
Merge remote-tracking branch 'origin/master' into issue715_household_move_email 2023-03-06 12:20:20 +01:00
c35ca3dbeb
DX: fix cs 2023-02-28 22:39:33 +01:00
318599334e
Fix phpstan issues 2023-02-28 21:43:28 +01:00
77c545344c
DX: adapt to php 7.4 2023-02-28 16:44:37 +01:00
a16244a3f5 Feature: [docgen] generate documents in an async queue
The documents are now generated in a queue, using symfony messenger. This queue should be configured:

```yaml
# app/config/messenger.yaml
framework:
    messenger:
        # reset services after consuming messages
        # reset_on_message: true

        failure_transport: failed

        transports:
            # https://symfony.com/doc/current/messenger.html#transport-configuration
            async: '%env(MESSENGER_TRANSPORT_DSN)%'
            priority:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
            failed: 'doctrine://default?queue_name=failed'

        routing:
            # ... other messages
            'Chill\DocGeneratorBundle\Service\Messenger\RequestGenerationMessage': priority
```

`StoredObject`s now have additionnal properties:

* status (pending, failure, ready (by default) ), which explain if the document is generated;
* a generationTrialCounter, which is incremented on each generation trial, which prevent each generation more than 5 times;

The generator computation is moved from the `DocGenTemplateController` to a `Generator` (implementing `GeneratorInterface`. 

There are new methods to `Context` which allow to normalize/denormalize context data to/from a messenger's `Message`.
2023-02-28 15:25:47 +00:00
f07ea3259e php cs fixes 2023-02-22 11:54:03 +01:00
6254303392
Revert "Feature: [docgen][stored object] update model to store status, template_id and fix defaults"
This reverts commit 55918bcafb9b958e83696a9eaa4f6f17e90a9602.
2023-02-16 14:08:16 +01:00
9676975cd8
Revert "Feature: [docgen][stored object] handler for request generator and required fixes"
This reverts commit 91d21ba939e39af504888be3cced98d0b95a92bb.
2023-02-16 14:08:11 +01:00
7c4bc8f46a
Revert commits linked to decoupling of docgen (changes not reviewed)
This reverts commit 55a845fcd63f2fe45f0bf84da79ee75d7207db64.
2023-02-16 14:07:47 +01:00
55a845fcd6
Sanitize DocGeneratorTemplateController constructor 2023-02-14 23:34:21 +01:00