Skip to content

Commit 1e414e8

Browse files
PEtanguyfabpot
authored andcommitted
[Mailer] New Brevo mailer bridge (formerly Sendinblue)
1 parent 9bca4bd commit 1e414e8

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)