Skip to content

Commit 1aa17b8

Browse files
committed
bug symfony#53007 [FrameworkBundle] Fix webhook parser service removal and add notifier parser service removal (alexandre-daubois)
This PR was merged into the 6.3 branch. Discussion ---------- [FrameworkBundle] Fix webhook parser service removal and add notifier parser service removal | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT Should be merged before symfony#53004 Commits ------- b7a17ad [FrameworkBundle] Fix webhook parser service removal and add notifier parser service removal
2 parents 1c4feac + b7a17ad commit 1aa17b8

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)