Skip to content

Commit 82466d3

Browse files
committed
feature #50302 [Mailer] New Brevo mailer bridge (formerly Sendinblue) (PEtanguy)
This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [Mailer] New Brevo mailer bridge (formerly Sendinblue) | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | TODO Hello, This PR is aimed at updating the config for the sendinblue mailer. As you might have seen, Sendinblue has rebranded to [Brevo](https://developers.brevo.com/) and also rewrote their apis. This change ensure compatibility with the new endpoints and removes any reference to Sendinblue. This is the notifier PR: symfony/symfony#50296 Commits ------- f537358e5a [Mailer] New Brevo mailer bridge (formerly Sendinblue)
2 parents 5b26624 + 1e414e8 commit 82466d3

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Exception/UnsupportedSchemeException.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
class UnsupportedSchemeException extends LogicException
2121
{
2222
private const SCHEME_TO_PACKAGE_MAP = [
23+
'brevo' => [
24+
'class' => Bridge\Brevo\Transport\BrevoTransportFactory::class,
25+
'package' => 'symfony/brevo-mailer',
26+
],
2327
'gmail' => [
2428
'class' => Bridge\Google\Transport\GmailTransportFactory::class,
2529
'package' => 'symfony/google-mailer',

Tests/Exception/UnsupportedSchemeExceptionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Bridge\PhpUnit\ClassExistsMock;
1616
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory;
17+
use Symfony\Component\Mailer\Bridge\Brevo\Transport\BrevoTransportFactory;
1718
use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory;
1819
use Symfony\Component\Mailer\Bridge\Infobip\Transport\InfobipTransportFactory;
1920
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory;
@@ -36,6 +37,7 @@ public static function setUpBeforeClass(): void
3637
{
3738
ClassExistsMock::register(__CLASS__);
3839
ClassExistsMock::withMockedClasses([
40+
BrevoTransportFactory::class => false,
3941
GmailTransportFactory::class => false,
4042
InfobipTransportFactory::class => false,
4143
MailerSendTransportFactory::class => false,
@@ -65,6 +67,7 @@ public function testMessageWhereSchemeIsPartOfSchemeToPackageMap(string $scheme,
6567

6668
public static function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \Generator
6769
{
70+
yield ['brevo', 'symfony/brevo-mailer'];
6871
yield ['gmail', 'symfony/google-mailer'];
6972
yield ['infobip', 'symfony/infobip-mailer'];
7073
yield ['mailersend', 'symfony/mailersend-mailer'];

0 commit comments

Comments
 (0)