mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-27 09:05:01 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
ab684a20ad
|
|||
bc92b52498 | |||
be5655e537
|
|||
ceb0bd982e
|
|||
47c0af3623
|
@@ -3,3 +3,60 @@
|
|||||||
* Use the Notifier component from Symfony to sens short messages (SMS). This allow to use more provider.
|
* Use the Notifier component from Symfony to sens short messages (SMS). This allow to use more provider.
|
||||||
### Fixed
|
### Fixed
|
||||||
* ([#348](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/348)) [export] Fix aggregation of referrer's scope and job: fix the date range comparison
|
* ([#348](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/348)) [export] Fix aggregation of referrer's scope and job: fix the date range comparison
|
||||||
|
|
||||||
|
### Warning on configuration of Notifier component
|
||||||
|
|
||||||
|
If installed in an symfony app where the recipes are activated, this configuration should be added automatically:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
framework:
|
||||||
|
notifier:
|
||||||
|
chatter_transports:
|
||||||
|
texter_transports:
|
||||||
|
ovhcloud: '%env(OVHCLOUD_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 }
|
||||||
|
```
|
||||||
|
|
||||||
|
Actually, you should either:
|
||||||
|
|
||||||
|
- remove the configuration of ovhcloud added by the recipe
|
||||||
|
- or remove the previous configuration of chill, to avoid keeping legacy configuration
|
||||||
|
|
||||||
|
#### Remove the added configuration and keep the legacy configuration
|
||||||
|
|
||||||
|
To remove the configuration:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
framework:
|
||||||
|
notifier:
|
||||||
|
chatter_transports:
|
||||||
|
texter_transports:
|
||||||
|
- ovhcloud: '%env(OVHCLOUD_DSN)%'
|
||||||
|
```
|
||||||
|
|
||||||
|
In that case, the previous configuration, which was stored under the `chill_main.short_messages.dsn` will be reconfigured into the Notifier component's configuration.
|
||||||
|
|
||||||
|
#### Properly configure SMS
|
||||||
|
|
||||||
|
You can also properly configure it, as [described in the OVH cloud provider repository](https://github.com/symfony/ovh-cloud-notifier/tree/5.4?tab=readme-ov-file#dsn-example) (where the scheme is `ovhcloud`):
|
||||||
|
|
||||||
|
**NOTE**: You have access to all notifier available with the [Notifier component](https://symfony.com/doc/current/notifier.html#notifier-sms-channel). You are not restricted to use OVH as a provider.
|
||||||
|
|
||||||
|
```diff
|
||||||
|
framework:
|
||||||
|
notifier:
|
||||||
|
chatter_transports:
|
||||||
|
texter_transports:
|
||||||
|
+ ovhcloud: '%env(OVHCLOUD_DSN)%' # this value should be located in a variable, and have `ovhcloud://` as a scheme
|
||||||
|
|
||||||
|
chill_main:
|
||||||
|
- short_messages:
|
||||||
|
- dsn: '%env(string:SHORT_MESSAGE_DSN)%'
|
||||||
|
```
|
||||||
|
3
.changes/v3.7.1.md
Normal file
3
.changes/v3.7.1.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## v3.7.1 - 2025-01-21
|
||||||
|
### Fixed
|
||||||
|
* Fix legacy configuration processor for notifier component
|
61
CHANGELOG.md
61
CHANGELOG.md
@@ -6,12 +6,73 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|||||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||||
|
|
||||||
|
|
||||||
|
## v3.7.1 - 2025-01-21
|
||||||
|
### Fixed
|
||||||
|
* Fix legacy configuration processor for notifier component
|
||||||
|
|
||||||
## v3.7.0 - 2025-01-21
|
## v3.7.0 - 2025-01-21
|
||||||
### Feature
|
### Feature
|
||||||
* Use the Notifier component from Symfony to sens short messages (SMS). This allow to use more provider.
|
* Use the Notifier component from Symfony to sens short messages (SMS). This allow to use more provider.
|
||||||
### Fixed
|
### Fixed
|
||||||
* ([#348](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/348)) [export] Fix aggregation of referrer's scope and job: fix the date range comparison
|
* ([#348](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/348)) [export] Fix aggregation of referrer's scope and job: fix the date range comparison
|
||||||
|
|
||||||
|
### Warning on configuration of Notifier component
|
||||||
|
|
||||||
|
If installed in an symfony app where the recipes are activated, this configuration should be added automatically:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
framework:
|
||||||
|
notifier:
|
||||||
|
chatter_transports:
|
||||||
|
texter_transports:
|
||||||
|
ovhcloud: '%env(OVHCLOUD_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 }
|
||||||
|
```
|
||||||
|
|
||||||
|
Actually, you should either:
|
||||||
|
|
||||||
|
- remove the configuration of ovhcloud added by the recipe
|
||||||
|
- or remove the previous configuration of chill, to avoid keeping legacy configuration
|
||||||
|
|
||||||
|
#### Remove the added configuration and keep the legacy configuration
|
||||||
|
|
||||||
|
To remove the configuration:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
framework:
|
||||||
|
notifier:
|
||||||
|
chatter_transports:
|
||||||
|
texter_transports:
|
||||||
|
- ovhcloud: '%env(OVHCLOUD_DSN)%'
|
||||||
|
```
|
||||||
|
|
||||||
|
In that case, the previous configuration, which was stored under the `chill_main.short_messages.dsn` will be reconfigured into the Notifier component's configuration.
|
||||||
|
|
||||||
|
#### Properly configure SMS
|
||||||
|
|
||||||
|
You can also properly configure it, as [described in the OVH cloud provider repository](https://github.com/symfony/ovh-cloud-notifier/tree/5.4?tab=readme-ov-file#dsn-example) (where the scheme is `ovhcloud`):
|
||||||
|
|
||||||
|
**NOTE**: You have access to all notifier available with the [Notifier component](https://symfony.com/doc/current/notifier.html#notifier-sms-channel). You are not restricted to use OVH as a provider.
|
||||||
|
|
||||||
|
```diff
|
||||||
|
framework:
|
||||||
|
notifier:
|
||||||
|
chatter_transports:
|
||||||
|
texter_transports:
|
||||||
|
+ ovhcloud: '%env(OVHCLOUD_DSN)%' # this value should be located in a variable, and have `ovhcloud://` as a scheme
|
||||||
|
|
||||||
|
chill_main:
|
||||||
|
- short_messages:
|
||||||
|
- dsn: '%env(string:SHORT_MESSAGE_DSN)%'
|
||||||
|
```
|
||||||
|
|
||||||
## v3.6.0 - 2025-01-16
|
## v3.6.0 - 2025-01-16
|
||||||
### Feature
|
### Feature
|
||||||
* Importer for addresses does not fails when the postal code is not found with some addresses, and compute a recap list of all addresses that could not be imported. This recap list can be send by email.
|
* Importer for addresses does not fails when the postal code is not found with some addresses, and compute a recap list of all addresses that could not be imported. This recap list can be send by email.
|
||||||
|
@@ -366,6 +366,17 @@ class ChillMainExtension extends Extension implements
|
|||||||
*/
|
*/
|
||||||
private function prependNotifierTexterWithLegacyData(ContainerBuilder $container): void
|
private function prependNotifierTexterWithLegacyData(ContainerBuilder $container): void
|
||||||
{
|
{
|
||||||
|
foreach (array_reverse($container->getExtensionConfig('framework')) as $c) {
|
||||||
|
// we look into each configuration for framework. If there is a configuration for
|
||||||
|
// texter_transports in one of them, we don't configure anything else
|
||||||
|
if (null !== $notifConfig = $c['notifier'] ?? null) {
|
||||||
|
if (null !== ($notifConfig['texter_transports'] ?? null)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// there is no texter config, we try to configure one
|
||||||
$configs = $container->getExtensionConfig('chill_main');
|
$configs = $container->getExtensionConfig('chill_main');
|
||||||
$notifierSet = false;
|
$notifierSet = false;
|
||||||
foreach (array_reverse($configs) as $config) {
|
foreach (array_reverse($configs) as $config) {
|
||||||
|
@@ -32,6 +32,10 @@ final readonly class SentMessageEventSubscriber implements EventSubscriberInterf
|
|||||||
{
|
{
|
||||||
$message = $event->getMessage();
|
$message = $event->getMessage();
|
||||||
|
|
||||||
|
if (null === $message->getMessageId()) {
|
||||||
|
$this->logger->info('[sms] a sms message did not had any id after sending.', ['validReceiversI' => $message->getOriginalMessage()->getRecipientId()]);
|
||||||
|
} else {
|
||||||
$this->logger->warning('[sms] a sms was sent', ['validReceiversI' => $message->getOriginalMessage()->getRecipientId(), 'idsI' => $message->getMessageId()]);
|
$this->logger->warning('[sms] a sms was sent', ['validReceiversI' => $message->getOriginalMessage()->getRecipientId(), 'idsI' => $message->getMessageId()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user