Commit Graph

74 Commits

Author SHA1 Message Date
916724c0c5 Merge branch 'master' into upgrade-sf5 2024-06-24 10:46:21 +02:00
ea1d4c48f2 Add history support to StoredObject entity
This commit adds a history saving feature to the StoredObject entity, which allows saving versions of the object's changes over time. This is achieved by implementing a saveHistory method that captures data attributes like filename, IV, key information, and type. The corresponding Automated tests were also created. Furthermore, adjustments were made to the StoredObject test to align with the new feature.
2024-06-04 22:31:50 +02:00
84f515d451 Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-05-28 14:16:01 +02:00
47a928a6cd Add DAV edit link to StoredObject serialization
Enabled the adding of access link, specifically DAV edit link to the JSON serialization of the StoredObject entity. The patch also adjusted the serializer groups of various attributes of StoredObject from "read, write" to "write". Lastly, these changes were reflected in the accompanying CourseWork Controller and the FormEvaluation Vue component.
2024-05-23 18:25:20 +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
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
931c69eee4 Merge remote-tracking branch 'origin/master' into upgrade-sf5 2024-04-04 18:45:01 +02:00
fc88a5f40d Improve admin UX for configuration of document template (document generation) 2024-03-26 17:06:49 +00: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
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
f131572344 Remove references to old async upload bundle 2023-12-12 15:55:14 +01:00
28d09a8206 Add form and types to handle async files 2023-12-12 15:55:13 +01:00
9ec5a633ad Fix possible null values or not null values in some entity / string properties 2023-10-17 23:15:06 +02:00
bc2041cbdd apply more cs rules for php-cs 2023-10-17 13:27:03 +02:00
65aa0a1588 Merge remote-tracking branch 'origin/master' into rector/rules-symfony 2023-09-27 15:25:29 +02:00
c2c14be9d7 Remove setId methods 2023-09-21 09:57:14 +02:00
eca26a15e6 Bugfix document mappedsuperclass should not contain id property 2023-09-19 09:42:46 +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
e4e52234ad Rector: apply rules for doctrine code quality 2023-08-31 10:35:52 +02:00
f570fe92a5 apply rector rules 2023-07-28 02:40:02 +02:00
6d63177ff4 apply rules rector up to php82 2023-05-01 21:39:45 +02:00
dde3002100 DX: apply rector rules up to php8.0 2023-04-28 22:30:33 +02:00
858ade467c DX: rector rules upt to PHP 74 2023-04-15 00:20:19 +02:00
386d1e44d0 Fixed: [accompanying course document] fix access to accompanying course document
The entity AccompanyingCourseDocument didn't had any center associated with this entity. Implementing the interface `HasCenterInterface` fixed the problem.

Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/83
2023-04-05 19:29:33 +02:00
c35ca3dbeb DX: fix cs 2023-02-28 22:39:33 +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
6254303392 Revert "Feature: [docgen][stored object] update model to store status, template_id and fix defaults"
This reverts commit 55918bcafb.
2023-02-16 14:08:16 +01:00
55918bcafb Feature: [docgen][stored object] update model to store status, template_id and fix defaults 2023-02-14 20:57:34 +01:00
bb05ba0f17 Feature: [docgen] create a service to generate a document from a template 2023-02-14 19:35:28 +01:00
db28443008 Fixed: correct use of scopes 2022-10-06 23:57:02 +02:00
9699e2304a fix cs: declare type and license header mismatch 2022-10-06 22:25:43 +02:00
67c3f3a840 fix cs with licencse header 2022-10-05 17:08:14 +02:00
ab08dab88a fixed: voter and permissions in accompanying course document 2022-07-11 12:57:08 +02:00
nobohan
dea554ced4 storedObject: add title field on StoredObject entity 2022-05-25 16:32:52 +02:00
89a700ff61 fix cs 2022-05-13 16:05:38 +02:00
nobohan
f44b9ca05b admin: fix error when creating document category 2022-05-11 12:03:38 +02:00
452c4b85c6 Merge remote-tracking branch 'origin/master' into issue565_document_storedObject 2022-04-27 08:43:35 +02:00
nobohan
3f47503528 storedObject: allow for null data in storedObject 2022-04-26 11:53:17 +02:00
e72a2004d7 Merge remote-tracking branch 'origin/master' into feat/add-document-encrypter-service 2022-04-26 09:37:30 +02:00
02409d4992 Merge remote-tracking branch 'origin/master' into issue469_budget 2022-03-24 16:22:52 +01:00
Pol Dellaiera
6ddbf35a7b misc: Add return types. 2022-03-15 09:40:32 +01:00
nobohan
1beae4d713 AccompanyingCourseWorkEdit: download existing documents 2022-03-14 14:42:04 +01:00
695b9d5bea merge with master 2022-03-01 14:32:03 +01:00
c4e0b68ebe change block personcontent to content more consistent with other templates and less need for if-statements 2022-02-24 15:59:13 +01:00