32 Commits

Author SHA1 Message Date
f889d67e94
fixes after merge of master into upgrade-sf4 2024-02-12 22:31:16 +01:00
3c8e59e088 php cs fixes after updating php cs fixer 2024-01-10 10:31:25 +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
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
2a4b73457b
DX: fix phpstan issues 2023-04-12 17:48:02 +02:00
318599334e
Fix phpstan issues 2023-02-28 21:43:28 +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
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
91d21ba939
Feature: [docgen][stored object] handler for request generator and required fixes 2023-02-14 23:26:00 +01: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
Pol Dellaiera
b8992b8eeb
misc: Update interface doc. 2022-03-15 09:40:32 +01:00
Pol Dellaiera
8401ce2656
cs: Fix code-style (using PHPCSFixer and PHPCS). 2021-12-21 10:59:23 +01:00
063ceb2c53 various improvements 2021-12-04 01:13:55 +01:00
6c1a946608 generate context for evaluations 2021-12-03 23:31:19 +01:00
23eff9f6d4 add basic context for AccompanyingPeriodWorkEvalution WIP 2021-12-03 13:50:35 +01:00
be626079d0 move logic of context to different interfaces 2021-12-02 18:18:11 +01:00
af6efdd0ba generate document with relatorio: config and driver 2021-12-02 18:02:19 +01:00
475b40e896 add form to doc generation and custom form to admin template configuration 2021-12-01 23:00:02 +01:00
7719d2b073 full generation for accompanying period 2021-12-01 15:43:34 +01:00
de4e83b3fb Generate a context for docgen, on accompanying period 2021-11-30 23:23:02 +01:00
3404d3669c create contextmanager and refactor docgeneratorTemplateType 2021-11-30 18:35:05 +01:00
Pol Dellaiera
cd3be25c22
cs: Remove duplicated headers. 2021-11-30 13:54:58 +01:00
Pol Dellaiera
47c5855a21
cs: Switch to a stricter way of coding - this might break in a lot of places. 2021-11-30 13:33:18 +01:00
Pol Dellaiera
a9188355c5
cs: Enable more risky rules. 2021-11-30 11:37:57 +01:00
Pol Dellaiera
f531cdc0ec
cs: Enable a couple of risky rules. 2021-11-30 09:39:45 +01:00
Pol Dellaiera
8f96a1121d
cs: Fix code style (safe rules only). 2021-11-23 14:08:50 +01:00
Marc Ducobu
026ac91e69 Injection firstPerson in doc 2021-08-20 15:01:59 +02:00
Marc Ducobu
0479ddb42b Data injection in to file on openstack 2021-08-20 09:49:46 +02:00
Marc Ducobu
cbdf976885 Adding context 2021-08-17 11:42:30 +02:00