Commit Graph

140 Commits

Author SHA1 Message Date
7a7d1d5b16 remove blank file 2024-09-16 12:13:52 +02:00
45323e9136 Merge remote-tracking branch 'origin/upgrade-sf5' into signature-app-master 2024-09-16 11:51:33 +02:00
f0f651edea update cs after php-cs-fixer upgrade 2024-09-12 12:02:33 +02:00
f5ba5d574b Add WopiConverter service and update Collabora integration tests
Introduce the WopiConverter service to handle document-to-PDF conversion using Collabora Online. Extend and update related tests in WopiConvertToPdfTest and ConvertControllerTest for better coverage and reliability. Enhance the GitLab CI configuration to exclude new test category "collabora-integration".
2024-09-10 17:48:31 +02:00
4d73f9b81a Rename Convert to ConvertController for clarity
Renamed Convert class and relevant references to ConvertController to improve clarity and maintain consistency. Updated corresponding test files and route configurations to reflect the new name.
2024-09-06 14:07:51 +02:00
313fb9ffdf PHP CS Fixer updated (3.63.1 -> v3.64.0) 2024-09-04 14:38:56 +02:00
cb90261309 Update random_bytes length in filename and prefix generation
The size of the random byte string used in the generateFilename method of StoredObjectVersion has been reduced from 16 to 8. Conversely, the size of the random byte string used in the generatePrefix method of StoredObject has been increased from 8 to 32.

The naming generation fit better with the usage, as 16bytes are generated for each file (more version), and less for the version.
2024-08-28 14:06:09 +02:00
2feea24c41 Add Collabora configuration guide and NullProofValidator class
A new document detailing the configuration steps for enabling Collabora in development has been added. This includes setting up ngrok and configuring both the Collabora and Symfony servers. Furthermore, a new class, NullProofValidator, has been created for validation during the development process. This class always returns true, making it useful for debugging purposes.
2024-08-28 14:06:08 +02:00
e21db73b84 Refactor and simplify document management functionality to adapt to StoredObject versioning
This commit includes several updates to the document management functionality within ChillWopiBundle and ChillDocGeneratorBundle, refactoring for simplicity and improved readability.
2024-08-28 14:06:07 +02:00
bb848746d5 Merge branch 'upgrade-sf5' into signature-app-master 2024-08-28 13:23:12 +02:00
c82991674e Rector changes: repositories become final readonly classes 2024-07-18 09:49:05 +02:00
21b79c1981 Php cs fixes 2024-07-04 11:39:02 +02:00
c648a560cc Fix merge conflict in AuthorizationManager 2024-07-02 15:51:51 +02:00
3d7c8596ee Pass StoredObject instead of Document to check permission in AuthorizationManager.php 2024-07-02 15:49:53 +02:00
345f379650 Implement StoredObject permissions WOPI AuthorizationManager.php 2024-07-02 15:39:31 +02:00
8c92d11722 Implement permissions for WOPI 2024-07-01 15:23:07 +02:00
916724c0c5 Merge branch 'master' into upgrade-sf5 2024-06-24 10:46:21 +02:00
99818c211d Fix cs: upgrade of php-cs-fixer 2024-06-19 12:18:20 +02:00
19e34d5dc0 PHP CS Fixer updated (3.57.2 -> v3.59.3) 2024-06-17 17:28:29 +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
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
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
450e7c348b Fix and clean DI configuration for chill_doc_store for usage with AsyncUpload 2023-12-12 15:55:12 +01:00
68f56671a4 DX: fix data type with new rules for phpstan 2023-11-05 23:19:00 +01:00
bc2041cbdd apply more cs rules for php-cs 2023-10-17 13:27:03 +02:00
6b8d6b76ba Upgrade code from 146 to new standards 2023-10-16 18:04:40 +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
1c0fd57913 Apply rector rules + fix CS 2023-08-30 14:55:26 +02:00
5481d029e8 Fix ConverTest.php: fix argument to build Convert controller. 2023-08-28 16:09:20 +02:00
398bbd12d5 Fix tests on ChillDocumentLockManager: take expiration delay into account 2023-08-28 16:09:20 +02:00
e839b03cc9 Update path to twig template with new syntax 2023-07-28 12:16:50 +02:00
e45430f0c9 Merge branch 'rector/rules-up-to-php82' into rector/rules-symfony 2023-07-19 23:22:57 +02:00
023a29cb78 apply rector rules: php up to php82 2023-07-19 23:19:50 +02:00
efaa01f4f6 DX: rector apply rules 'symfony up to 4.4 2023-05-05 18:21:33 +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
48772efd54 DX: fix phpstan issues 2023-03-28 22:32:08 +02:00
27dbdbcd96 Merge branch 'master' into upgrade-php82 2023-03-28 11:11:51 +02:00
2a3011d358 Fixed: force collabora to use the current locale for the UI + improve sidebar on opening 2023-03-28 10:45:29 +02:00
97a4c39941 Merge branch 'master' into upgrade-php82 2023-03-20 12:40:58 +01:00
d1bdf41c4c Feature: Force language when converting documents 2023-03-15 13:36:41 +01:00
c35ca3dbeb DX: fix cs 2023-02-28 22:39:33 +01:00
b1d4334c0f DX: fix phpstan issues 2023-02-28 22:07:52 +01:00
7dc07129f8 Merge branch 'master' into upgrade-php82 2023-02-28 18:21:51 +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