8000 [FrameworkBundle] Fix webhook parser service removal and add notifier parser service removal by alexandre-daubois · Pull Request #53007 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Fix webhook parser service removal and add notifier parser service removal #53007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2632,7 +2632,7 @@ private function registerMailerConfiguration(array $config, ContainerBuilder $co
];

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

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

if ($webhookEnabled) {
$loader->load('notifier_webhook.php');

$webhookRequestParsers = [
NotifierBridge\Twilio\Webhook\TwilioRequestParser::class => 'notifier.webhook.request_parser.twilio',
];

foreach ($webhookRequestParsers as $class => $service) {
$package = substr($service, \strlen('notifier.webhook.request_parser.'));

if (!ContainerBuilder::willBeAvailable(sprintf('symfony/%s-notifier', $package), $class, ['symfony/framework-bundle', 'symfony/notifier'])) {
$container->removeDefinition($service);
}
}
}
}

Expand Down
0