[Mailer] Add Infobip bridge

by @B-Galati

Some issues have been detected in this pull request

0
Coding Standard

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/46211/a0c1d58df69925ced01460b6869510d144ff29fa/typos.diff | patch -p0
diff -ru src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
--- src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php	2022-06-01 12:24:37.249652591 +0000
+++ src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php	2022-06-01 12:33:01.911202086 +0000
@@ -2534,7 +2534,7 @@
             GoogleChatTransportFactory::class => 'notifier.transport_factory.google-chat',
             InfobipTransportFactory::class => 'notifier.transport_factory.infobip',
             IqsmsTransportFactory::class => 'notifier.transport_factory.iqsms',
-            KazInfoTehTransportFactory::class => 'notifier.transport_factory.kaz-info-teh',
+            KazInfoTehTransportFactory::class => 'notifier.transport_factory.kaz-info-the',
             LightSmsTransportFactory::class => 'notifier.transport_factory.light-sms',
             LinkedInTransportFactory::class => 'notifier.transport_factory.linked-in',
             MailjetNotifierTransportFactory::class => 'notifier.transport_factory.mailjet',

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/46211/a0c1d58df69925ced01460b6869510d144ff29fa/license.diff | patch -p0
diff -ru src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipApiTransport.php src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipApiTransport.php
--- src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipApiTransport.php	2022-06-01 12:24:39.091691089 +0000
+++ src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipApiTransport.php	2022-06-01 12:33:06.613300423 +0000
@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 declare(strict_types=1);
 
 /*
diff -ru src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipSmtpTransport.php src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipSmtpTransport.php
--- src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipSmtpTransport.php	2022-06-01 12:24:39.342696335 +0000
+++ src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipSmtpTransport.php	2022-06-01 12:33:06.614300444 +0000
@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 declare(strict_types=1);
 
 /*
diff -ru src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipTransportFactory.php src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipTransportFactory.php
--- src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipTransportFactory.php	2022-06-01 12:24:39.521700077 +0000
+++ src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipTransportFactory.php	2022-06-01 12:33:06.614300444 +0000
@@ -1,5 +1,14 @@
 <?php
 
+/*
+ * This file is part of the Symfony package.
+ *
+ * (c) Fabien Potencier <fabien@symfony.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
 declare(strict_types=1);
 
 /*

0
Pull Request Contributor Headers

0
JSON Files Syntax

0
File Permissions

0
Merge Commits

0
Exception Messages Formatting

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/46211/a0c1d58df69925ced01460b6869510d144ff29fa/void_in_tests.diff | patch -p0
diff -ru src/Symfony/Component/Mailer/Bridge/Infobip/Tests/Transport/InfobipApiTransportTest.php src/Symfony/Component/Mailer/Bridge/Infobip/Tests/Transport/InfobipApiTransportTest.php
--- src/Symfony/Component/Mailer/Bridge/Infobip/Tests/Transport/InfobipApiTransportTest.php	2022-06-01 12:24:38.899687076 +0000
+++ src/Symfony/Component/Mailer/Bridge/Infobip/Tests/Transport/InfobipApiTransportTest.php	2022-06-01 12:33:07.755324307 +0000
@@ -59,12 +59,12 @@
         unset($this->response, $this->httpClient, $this->transport);
     }
 
-    public function testToString(): void
+    public function testToString()
     {
         $this->assertSame('infobip+api://99999.api.infobip.com', (string) $this->transport);
     }
 
-    public function testInfobipShouldBeCalledWithTheRightMethodAndUrlAndHeaders(): void
+    public function testInfobipShouldBeCalledWithTheRightMethodAndUrlAndHeaders()
     {
         $email = $this->basicValidEmail();
 
@@ -81,7 +81,7 @@
         $this->assertStringMatchesFormat('Content-Length: %d', $options['headers'][3]);
     }
 
-    public function testSendMinimalEmailShouldCalledInfobipWithTheRightParameters(): void
+    public function testSendMinimalEmailShouldCalledInfobipWithTheRightParameters()
     {
         $email = (new Email())
             ->subject('Subject of the email')
@@ -125,7 +125,7 @@
         );
     }
 
-    public function testSendFullEmailShouldCalledInfobipWithTheRightParameters(): void
+    public function testSendFullEmailShouldCalledInfobipWithTheRightParameters()
     {
         $email = (new Email())
             ->subject('Subject of the email')
@@ -204,7 +204,7 @@
         );
     }
 
-    public function testSendEmailWithAttachmentsShouldCalledInfobipWithTheRightParameters(): void
+    public function testSendEmailWithAttachmentsShouldCalledInfobipWithTheRightParameters()
     {
         $email = $this->basicValidEmail()
             ->text('foobar')
@@ -242,7 +242,7 @@
         );
     }
 
-    public function testSendMinimalEmailWithSuccess(): void
+    public function testSendMinimalEmailWithSuccess()
     {
         $email = (new Email())
             ->subject('Subject of the email')
@@ -271,7 +271,7 @@
         );
     }
 
-    public function testSendFullEmailWithSuccess(): void
+    public function testSendFullEmailWithSuccess()
     {
         $email = (new Email())
             ->subject('Subject of the email')
@@ -318,7 +318,7 @@
         $this->assertEquals([new Address('bcc@example.com')], $sentMessage->getOriginalMessage()->getBcc());
     }
 
-    public function testSendEmailWithAttachmentsWithSuccess(): void
+    public function testSendEmailWithAttachmentsWithSuccess()
     {
         $email = $this->basicValidEmail()
             ->text('foobar')
@@ -358,7 +358,7 @@
         );
     }
 
-    public function testSentMessageShouldCaptureInfobipMessageId(): void
+    public function testSentMessageShouldCaptureInfobipMessageId()
     {
         $this->response = new MockResponse('{"messages": [{"messageId": "somexternalMessageId0"}]}');
         $email = $this->basicValidEmail();
@@ -368,7 +368,7 @@
         $this->assertSame('somexternalMessageId0', $sentMessage->getMessageId());
     }
 
-    public function testInfobipResponseShouldNotBeEmpty(): void
+    public function testInfobipResponseShouldNotBeEmpty()
     {
         $this->response = new MockResponse();
         $email = $this->basicValidEmail();
@@ -379,7 +379,7 @@
         $this->transport->send($email);
     }
 
-    public function testInfobipResponseShouldBeStatusCode200(): void
+    public function testInfobipResponseShouldBeStatusCode200()
     {
         $this->response = new MockResponse('{"requestError": {"serviceException": {"messageId": "string","text": "string"}}}', ['http_code' => 400]);
         $email = $this->basicValidEmail();
@@ -390,7 +390,7 @@
         $this->transport->send($email);
     }
 
-    public function testInfobipHttpConnectionFailed(): void
+    public function testInfobipHttpConnectionFailed()
     {
         $this->response = new MockResponse('', ['error' => 'Test error']);
         $email = $this->basicValidEmail();

0
Use ::class whenever possible

0
Deprecation Messages