From 7d564dcee36f92a7bb8e3eb1ebee542ee6ebb5c9 Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Mon, 12 Oct 2026 14:16:51 +0200 Subject: [PATCH] #90 - Document the Symfony Flex recipe --- CHANGELOG.md | 3 +++ docs/01-quick_start.md | 20 +++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aca8d079..69c12eb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ Latest ------ +## Changes +* [#90](https://github.com/cleverage/process-bundle/issues/90) Installation documentation: describe the Symfony Flex recipe ([symfony/recipes-contrib#2081](https://github.com/symfony/recipes-contrib/pull/2081)), which registers the bundle and creates `config/packages/clever_age_process.yaml` importing the `config/packages/process/` directory, and the manual setup without Flex. + v5.2 ----- diff --git a/docs/01-quick_start.md b/docs/01-quick_start.md index 739e3e94..40866dd5 100644 --- a/docs/01-quick_start.md +++ b/docs/01-quick_start.md @@ -30,12 +30,30 @@ Open a command console, enter your project directory and install it using compos composer require cleverage/process-bundle ``` -Remember to add the following line to `config/bundles.php` (not required if Symfony Flex is used): +With [Symfony Flex](https://symfony.com/doc/current/setup/flex.html), the +[recipe](https://github.com/symfony/recipes-contrib/tree/main/cleverage/process-bundle) registers the bundle and creates: +- `config/packages/clever_age_process.yaml`: the [global configuration](#global-configuration), which imports the + `config/packages/process/` directory, +- `config/packages/process/`: the directory of your processes, one file per process (see + [process definition](reference/01-process_definition.md)). + +Without Flex, add the following line to `config/bundles.php`: ```php CleverAge\ProcessBundle\CleverAgeProcessBundle::class => ['all' => true], ``` +Then create the `config/packages/process/` directory and the configuration that imports it: + +```yaml +# config/packages/clever_age_process.yaml +imports: + - { resource: process/ } + +clever_age_process: + default_error_strategy: stop +``` + Some tasks and transformers use the main Symfony serializer service, and the bundle checks at container compilation that it is available: if it is not, the build fails with an explicit message. Make sure it is enabled (see [`framework.serializer.enabled`](https://symfony.com/doc/current/reference/configuration/framework.html#reference-serializer-enabled)):