Skip to content

Commit 3ff6ab1

Browse files
[Mailer] Add Infobip bridge
Co-Authored-By: Jean-Baptiste Delhommeau <[email protected]> Co-Authored-By: Benoit Galati <[email protected]>
1 parent bcbfb01 commit 3ff6ab1

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Exception/UnsupportedSchemeException.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ class UnsupportedSchemeException extends LogicException
2424
'class' => Bridge\Google\Transport\GmailTransportFactory::class,
2525
'package' => 'symfony/google-mailer',
2626
],
27+
'infobip' => [
28+
'class' => Bridge\Infobip\Transport\InfobipTransportFactory::class,
29+
'package' => 'symfony/infobip-mailer',
30+
],
2731
'mailgun' => [
2832
'class' => Bridge\Mailgun\Transport\MailgunTransportFactory::class,
2933
'package' => 'symfony/mailgun-mailer',

Tests/Exception/UnsupportedSchemeExceptionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Bridge\PhpUnit\ClassExistsMock;
1616
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory;
1717
use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory;
18+
use Symfony\Component\Mailer\Bridge\Infobip\Transport\InfobipTransportFactory;
1819
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory;
1920
use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory;
2021
use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory;
@@ -35,6 +36,7 @@ public static function setUpBeforeClass(): void
3536
ClassExistsMock::register(__CLASS__);
3637
ClassExistsMock::withMockedClasses([
3738
GmailTransportFactory::class => false,
39+
InfobipTransportFactory::class => false,
3840
MailgunTransportFactory::class => false,
3941
MailjetTransportFactory::class => false,
4042
MandrillTransportFactory::class => false,
@@ -62,6 +64,7 @@ public function testMessageWhereSchemeIsPartOfSchemeToPackageMap(string $scheme,
6264
public function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \Generator
6365
{
6466
yield ['gmail', 'symfony/google-mailer'];
67+
yield ['infobip', 'symfony/infobip-mailer'];
6568
yield ['mailgun', 'symfony/mailgun-mailer'];
6669
yield ['mailjet', 'symfony/mailjet-mailer'];
6770
yield ['mandrill', 'symfony/mailchimp-mailer'];

Transport.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Psr\Log\LoggerInterface;
1616
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory;
1717
use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory;
18+
use Symfony\Component\Mailer\Bridge\Infobip\Transport\InfobipTransportFactory;
1819
use Symfony\Component\Mailer\Bridge\Mailchimp\Transport\MandrillTransportFactory;
1920
use Symfony\Component\Mailer\Bridge\Mailgun\Transport\MailgunTransportFactory;
2021
use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory;
@@ -44,6 +45,7 @@ final class Transport
4445
{
4546
private const FACTORY_CLASSES = [
4647
GmailTransportFactory::class,
48+
InfobipTransportFactory::class,
4749
MailgunTransportFactory::class,
4850
MailjetTransportFactory::class,
4951
MandrillTransportFactory::class,

0 commit comments

Comments
 (0)