Skip to content

Commit 27c0f65

Browse files
bug symfony#59122 [Notifier] fix desktop channel bus abstract arg (raphael-geffroy)
This PR was merged into the 7.2 branch. Discussion ---------- [Notifier] fix desktop channel bus abstract arg | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | none | License | MIT From what I understand the Desktop and Push channels are not configured the same way as the other channels, they don't use the 'message bus' abstract arg which allows the component to disable or selecting message bus through configuration. So if another message_bus than the default bus is configured inside framework.notifier.message_bus it is ignored for those two. And same if it is set to false inside the configuration. ![image](https://github.com/user-attachments/assets/dd9ecd1b-0edc-4da4-8976-34d6fddefa4c) Commits ------- a06dab8 fix: notifier channel bus abstract arg
2 parents c591b4d + a06dab8 commit 27c0f65

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2784,7 +2784,7 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $
27842784
$container->removeDefinition('notifier.channel.email');
27852785
}
27862786

2787-
foreach (['texter', 'chatter', 'notifier.channel.chat', 'notifier.channel.email', 'notifier.channel.sms', 'notifier.channel.push'] as $serviceId) {
2787+
foreach (['texter', 'chatter', 'notifier.channel.chat', 'notifier.channel.email', 'notifier.channel.sms', 'notifier.channel.push', 'notifier.channel.desktop'] as $serviceId) {
27882788
if (!$container->hasDefinition($serviceId)) {
27892789
continue;
27902790
}

src/Symfony/Bundle/FrameworkBundle/Resources/config/notifier.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@
8282
->tag('notifier.channel', ['channel' => 'push'])
8383

8484
->set('notifier.channel.desktop', DesktopChannel::class)
85-
->args([service('texter.transports'), service('messenger.default_bus')->ignoreOnInvalid()])
85+
->args([
86+
service('texter.transports'),
87+
abstract_arg('message bus'),
88+
])
8689
->tag('notifier.channel', ['channel' => 'desktop'])
8790

8891
->set('notifier.monolog_handler', NotifierHandler::class)

0 commit comments

Comments
 (0)