Commit Graph

11 Commits

Author SHA1 Message Date
036fe8d6f8 upgrade php-cs 3.49 2024-02-07 10:43:53 +01:00
bc2041cbdd apply more cs rules for php-cs 2023-10-17 13:27:03 +02:00
d1e09d7047 Fix constructor signature of BaseContext (in BaseContextDataTest.php) 2023-08-28 16:09:21 +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
bb05ba0f17 Feature: [docgen] create a service to generate a document from a template 2023-02-14 19:35:28 +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
efc3e3915b Docgen/action add missing goals 2022-01-10 09:35:26 +00:00
Pol Dellaiera
b55c19cd9e fix: Fix return types in tests. 2021-12-21 15:26:22 +01:00
d4a5735e15 Docgen/add base context 2021-12-15 22:43:06 +00:00