From 88fbf7bc1c524d8cb263ac1bda8c72b4637fbac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 17 Jan 2025 11:22:53 +0100 Subject: [PATCH] Add Symfony Notifier integration Integrated Symfony Notifier into the project by adding it to `composer.json` and creating a configuration file `notifier.yaml`. Updated `symfony.lock` to include the recipe configuration for Notifier. Minor documentation formatting issues were also fixed in `index.rst`. --- composer.json | 3 ++- config/packages/notifier.yaml | 12 ++++++++++++ docs/source/index.rst | 7 +++---- symfony.lock | 12 ++++++++++++ 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 config/packages/notifier.yaml diff --git a/composer.json b/composer.json index 8f6d01335..18ff0f222 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ "ext-zlib": "*", "champs-libres/wopi-bundle": "dev-master@dev", "champs-libres/wopi-lib": "dev-master@dev", - "doctrine/doctrine-bundle": "^2.1", "doctrine/data-fixtures": "^1.8", + "doctrine/doctrine-bundle": "^2.1", "doctrine/doctrine-migrations-bundle": "^3.0", "doctrine/orm": "^2.13.0", "erusev/parsedown": "^1.7", @@ -58,6 +58,7 @@ "symfony/messenger": "^5.4", "symfony/mime": "^5.4", "symfony/monolog-bundle": "^3.5", + "symfony/notifier": "^5.4", "symfony/options-resolver": "^5.4", "symfony/process": "^5.4", "symfony/property-access": "^5.4", diff --git a/config/packages/notifier.yaml b/config/packages/notifier.yaml new file mode 100644 index 000000000..ce26c77c4 --- /dev/null +++ b/config/packages/notifier.yaml @@ -0,0 +1,12 @@ +framework: + notifier: + texter_transports: + twilio: '%env(resolve:SHORT_MESSAGE_DSN)%' + channel_policy: + # use chat/slack, chat/telegram, sms/twilio or sms/nexmo + urgent: ['email'] + high: ['email'] + medium: ['email'] + low: ['email'] + admin_recipients: + - { email: admin@example.com } diff --git a/docs/source/index.rst b/docs/source/index.rst index 4ac09908f..ddfa23e3b 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -16,7 +16,7 @@ Welcome to Chill documentation! Chill is a free software for social workers. -Chill rely on the php framework `Symfony `_. +Chill rely on the php framework `Symfony `_. Contents of this documentation: @@ -42,7 +42,7 @@ Contribute User manual =========== -An user manual exists in French and currently focuses on describing the main concept of the software. +An user manual exists in French and currently focuses on describing the main concept of the software. `Read (and contribute) to the manual `_ @@ -55,12 +55,11 @@ Available bundles * Chill Person, to deal with persons, * chill custom fields, to add custom fields to some entities, * chill activity: to add activities to people, - * chill report: to add report to people, + * chill report: to add report to people, * chill event: to gather people into events, * chill docs store: to store documents to people, but also entities, * chill task: to register task with people, * chill third party: to register third parties, - * chill family members: to register family members You will also found the following projects : diff --git a/symfony.lock b/symfony.lock index 3d484a508..7d33810ea 100644 --- a/symfony.lock +++ b/symfony.lock @@ -296,6 +296,18 @@ "config/packages/monolog.yaml" ] }, + "symfony/notifier": { + "version": "5.4", + "recipe": { + "repo": "github.com/symfony/recipes", + "branch": "main", + "version": "5.0", + "ref": "178877daf79d2dbd62129dd03612cb1a2cb407cc" + }, + "files": [ + "config/packages/notifier.yaml" + ] + }, "symfony/phpunit-bridge": { "version": "7.1", "recipe": {