Skip to content
Merged
Show file tree
Hide file tree
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 @@ -20,6 +20,10 @@
class UnsupportedSchemeException extends LogicException
{
private const SCHEME_TO_PACKAGE_MAP = [
'azure' => [
'class' => Bridge\Azure\Transport\AzureTransportFactory::class,
'package' => 'symfony/azure-mailer',
],
'brevo' => [
'class' => Bridge\Brevo\Transport\BrevoTransportFactory::class,
'package' => 'symfony/brevo-mailer',
Expand Down Expand Up @@ -56,6 +60,10 @@ class UnsupportedSchemeException extends LogicException
'class' => Bridge\Postmark\Transport\PostmarkTransportFactory::class,
'package' => 'symfony/postmark-mailer',
],
'resend' => [
'class' => Bridge\Resend\Transport\ResendTransportFactory::class,
'package' => 'symfony/resend-mailer',
],
'scaleway' => [
'class' => Bridge\Scaleway\Transport\ScalewayTransportFactory::class,
'package' => 'symfony/scaleway-mailer',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\PhpUnit\ClassExistsMock;
use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesTransportFactory;
use Symfony\Component\Mailer\Bridge\Azure\Transport\AzureTransportFactory;
use Symfony\Component\Mailer\Bridge\Brevo\Transport\BrevoTransportFactory;
use Symfony\Component\Mailer\Bridge\Google\Transport\GmailTransportFactory;
use Symfony\Component\Mailer\Bridge\Infobip\Transport\InfobipTransportFactory;
Expand All @@ -23,6 +24,7 @@
use Symfony\Component\Mailer\Bridge\Mailjet\Transport\MailjetTransportFactory;
use Symfony\Component\Mailer\Bridge\MailPace\Transport\MailPaceTransportFactory;
use Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkTransportFactory;
use Symfony\Component\Mailer\Bridge\Resend\Transport\ResendTransportFactory;
use Symfony\Component\Mailer\Bridge\Scaleway\Transport\ScalewayTransportFactory;
use Symfony\Component\Mailer\Bridge\Sendgrid\Transport\SendgridTransportFactory;
use Symfony\Component\Mailer\Exception\UnsupportedSchemeException;
Expand All @@ -37,6 +39,7 @@ public static function setUpBeforeClass(): void
{
ClassExistsMock::register(__CLASS__);
ClassExistsMock::withMockedClasses([
AzureTransportFactory::class => false,
BrevoTransportFactory::class => false,
GmailTransportFactory::class => false,
InfobipTransportFactory::class => false,
Expand All @@ -46,6 +49,7 @@ public static function setUpBeforeClass(): void
MailjetTransportFactory::class => false,
MandrillTransportFactory::class => false,
PostmarkTransportFactory::class => false,
ResendTransportFactory::class => false,
ScalewayTransportFactory::class => false,
SendgridTransportFactory::class => false,
SesTransportFactory::class => false,
Expand All @@ -67,6 +71,7 @@ public function testMessageWhereSchemeIsPartOfSchemeToPackageMap(string $scheme,

public static function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \Generator
{
yield ['azure', 'symfony/azure-mailer'];
yield ['brevo', 'symfony/brevo-mailer'];
yield ['gmail', 'symfony/google-mailer'];
yield ['infobip', 'symfony/infobip-mailer'];
Expand All @@ -76,6 +81,7 @@ public static function messageWhereSchemeIsPartOfSchemeToPackageMapProvider(): \
yield ['mailpace', 'symfony/mail-pace-mailer'];
yield ['mandrill', 'symfony/mailchimp-mailer'];
yield ['postmark', 'symfony/postmark-mailer'];
yield ['resend', 'symfony/resend-mailer'];
yield ['scaleway', 'symfony/scaleway-mailer'];
yield ['sendgrid', 'symfony/sendgrid-mailer'];
yield ['ses', 'symfony/amazon-mailer'];
Expand Down