8000 bug #34570 [FrameworkBundle][Notifier] Fixing notifier email definiti… · symfony/symfony@f888dbf · GitHub
[go: up one dir, main page]

Skip to content

Commit f888dbf

Browse files
committed
bug #34570 [FrameworkBundle][Notifier] Fixing notifier email definition without mailer (chr-hertel)
This PR was merged into the 5.0 branch. Discussion ---------- [FrameworkBundle][Notifier] Fixing notifier email definition without mailer | Q | A | ------------- | --- | Branch? | 5.0 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | I ran into this while having notifier and messenger but no mailer installed. definition `notifier.channel.email` gets removed in line 1934 if mailer is not enabled so we can't replace the argument. ``` In ContainerBuilder.php line 980: You have requested a non-existent service "notifier.channel.email". ``` Commits ------- f12b0c7 only replace argument if mailer is present
2 parents 255f557 + f12b0c7 commit f888dbf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,9 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $
19411941

19421942
// as we have a bus, the channels don't need the transports
19431943
$container->getDefinition('notifier.channel.chat')->setArgument(0, null);
1944-
$container->getDefinition('notifier.channel.email')->setArgument(0, null);
1944+
if ($container->hasDefinition('notifier.channel.email')) {
1945+
$container->getDefinition('notifier.channel.email')->setArgument(0, null);
1946+
}
19451947
$container->getDefinition('notifier.channel.sms')->setArgument(0, null);
19461948
}
19471949

0 commit comments

Comments
 (0)
0