diff --git a/.changes/unreleased/Fixed-20250121-225838.yaml b/.changes/unreleased/Fixed-20250121-225838.yaml new file mode 100644 index 000000000..f22ed2697 --- /dev/null +++ b/.changes/unreleased/Fixed-20250121-225838.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Fix legacy configuration processor for notifier component +time: 2025-01-21T22:58:38.805800688+01:00 +custom: + Issue: "" + SchemaChange: No schema change diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index 2e9b7c029..9fa3b0f42 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -366,6 +366,17 @@ class ChillMainExtension extends Extension implements */ 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'); $notifierSet = false; foreach (array_reverse($configs) as $config) {