mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Prevent default texter configuration if already defined
Check existing framework configurations for `texter_transports` before applying default settings. This avoids overwriting or conflicting with pre-defined notifier configurations.
This commit is contained in:
parent
47c0af3623
commit
ceb0bd982e
6
.changes/unreleased/Fixed-20250121-225838.yaml
Normal file
6
.changes/unreleased/Fixed-20250121-225838.yaml
Normal file
@ -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
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user