Skip to content

Commit b7a17ad

Browse files
[FrameworkBundle] Fix webhook parser service removal and add notifier parser service removal
1 parent 1c4feac commit b7a17ad

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2632,7 +2632,7 @@ private function registerMailerConfiguration(array $config, ContainerBuilder $co
26322632
];
26332633

26342634
foreach ($webhookRequestParsers as $class => $service) {
2635-
$package = substr($service, \strlen('mailer.transport_factory.'));
2635+
$package = substr($service, \strlen('mailer.webhook.request_parser.'));
26362636

26372637
if (!ContainerBuilder::willBeAvailable(sprintf('symfony/%s-mailer', 'gmail' === $package ? 'google' : $package), $class, ['symfony/framework-bundle', 'symfony/mailer'])) {
26382638
$container->removeDefinition($service);
@@ -2839,6 +2839,18 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $
28392839

28402840
if ($webhookEnabled) {
28412841
$loader->load('notifier_webhook.php');
2842+
2843+
$webhookRequestParsers = [
2844+
NotifierBridge\Twilio\Webhook\TwilioRequestParser::class => 'notifier.webhook.request_parser.twilio',
2845+
];
2846+
2847+
foreach ($webhookRequestParsers as $class => $service) {
2848+
$package = substr($service, \strlen('notifier.webhook.request_parser.'));
2849+
2850+
if (!ContainerBuilder::willBeAvailable(sprintf('symfony/%s-notifier', $package), $class, ['symfony/framework-bundle', 'symfony/notifier'])) {
2851+
$container->removeDefinition($service);
2852+
}
2853+
}
28422854
}
28432855
}
28442856

0 commit comments

Comments
 (0)