diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/CHANGELOG.md b/src/Symfony/Component/Mailer/Bridge/Amazon/CHANGELOG.md index 67a52bd9460ba..3d889f297d90d 100644 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/CHANGELOG.md +++ b/src/Symfony/Component/Mailer/Bridge/Amazon/CHANGELOG.md @@ -1,6 +1,12 @@ CHANGELOG ========= +6.0 +--- + + * Remove the `SesApiTransport` class, use `SesApiAsyncAwsTransport` instead + * Remove the `SesHttpTransport` class, use `SesHttpAsyncAwsTransport` instead + 5.3 --- diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiTransportTest.php deleted file mode 100644 index 2df22ed67c644..0000000000000 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiTransportTest.php +++ /dev/null @@ -1,176 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpClient\MockHttpClient; -use Symfony\Component\HttpClient\Response\MockResponse; -use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesApiTransport; -use Symfony\Component\Mailer\Exception\HttpTransportException; -use Symfony\Component\Mime\Address; -use Symfony\Component\Mime\Email; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @group legacy - */ -class SesApiTransportTest extends TestCase -{ - /** - * @dataProvider getTransportData - */ - public function testToString(SesApiTransport $transport, string $expected) - { - $this->assertSame($expected, (string) $transport); - } - - public function getTransportData() - { - return [ - [ - new SesApiTransport('ACCESS_KEY', 'SECRET_KEY'), - 'ses+api://ACCESS_KEY@email.eu-west-1.amazonaws.com', - ], - [ - new SesApiTransport('ACCESS_KEY', 'SECRET_KEY', 'us-east-1'), - 'ses+api://ACCESS_KEY@email.us-east-1.amazonaws.com', - ], - [ - (new SesApiTransport('ACCESS_KEY', 'SECRET_KEY'))->setHost('example.com'), - 'ses+api://ACCESS_KEY@example.com', - ], - [ - (new SesApiTransport('ACCESS_KEY', 'SECRET_KEY'))->setHost('example.com')->setPort(99), - 'ses+api://ACCESS_KEY@example.com:99', - ], - ]; - } - - public function testSend() - { - $client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface { - $this->assertSame('POST', $method); - $this->assertSame('https://email.eu-west-1.amazonaws.com:8984/', $url); - $this->assertStringContainsStringIgnoringCase('X-Amzn-Authorization: AWS3-HTTPS AWSAccessKeyId=ACCESS_KEY,Algorithm=HmacSHA256,Signature=', $options['headers'][0] ?? $options['request_headers'][0]); - - parse_str($options['body'], $content); - - $this->assertSame('Hello!', $content['Message_Subject_Data']); - $this->assertSame('"Saif Eddin" ', $content['Destination_ToAddresses_member'][0]); - $this->assertSame('=?UTF-8?B?SsOpcsOpbXk=?= ', $content['Destination_CcAddresses_member'][0]); - $this->assertSame('"Fabien" ', $content['Source']); - $this->assertSame('Hello There!', $content['Message_Body_Text_Data']); - $this->assertSame('aws-configuration-set-name', $content['ConfigurationSetName']); - $this->assertSame('aws-source-arn', $content['FromEmailAddressIdentityArn']); - - $xml = ' - - foobar - -'; - - return new MockResponse($xml, [ - 'http_code' => 200, - ]); - }); - $transport = new SesApiTransport('ACCESS_KEY', 'SECRET_KEY', null, $client); - $transport->setPort(8984); - - $mail = new Email(); - $mail->subject('Hello!') - ->to(new Address('saif.gmati@symfony.com', 'Saif Eddin')) - ->cc(new Address('jeremy@derusse.com', 'Jérémy')) - ->from(new Address('fabpot@symfony.com', 'Fabien')) - ->text('Hello There!'); - - $mail->getHeaders()->addTextHeader('X-SES-CONFIGURATION-SET', 'aws-configuration-set-name'); - $mail->getHeaders()->addTextHeader('X-SES-SOURCE-ARN', 'aws-source-arn'); - - $message = $transport->send($mail); - - $this->assertSame('foobar', $message->getMessageId()); - } - - public function testSendWithAttachments() - { - $client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface { - $this->assertSame('POST', $method); - $this->assertSame('https://email.eu-west-1.amazonaws.com:8984/', $url); - $this->assertStringContainsStringIgnoringCase('X-Amzn-Authorization: AWS3-HTTPS AWSAccessKeyId=ACCESS_KEY,Algorithm=HmacSHA256,Signature=', $options['headers'][0] ?? $options['request_headers'][0]); - - parse_str($options['body'], $body); - $content = base64_decode($body['RawMessage_Data']); - - $this->assertStringContainsString('Hello!', $content); - $this->assertStringContainsString('Saif Eddin ', $content); - $this->assertStringContainsString('Fabien ', $content); - $this->assertStringContainsString('Hello There!', $content); - $this->assertStringContainsString(base64_encode('attached data'), $content); - - $this->assertSame('aws-configuration-set-name', $body['ConfigurationSetName']); - - $xml = ' - - foobar - -'; - - return new MockResponse($xml, [ - 'http_code' => 200, - ]); - }); - $transport = new SesApiTransport('ACCESS_KEY', 'SECRET_KEY', null, $client); - $transport->setPort(8984); - - $mail = new Email(); - $mail->subject('Hello!') - ->to(new Address('saif.gmati@symfony.com', 'Saif Eddin')) - ->from(new Address('fabpot@symfony.com', 'Fabien')) - ->text('Hello There!') - ->attach('attached data'); - - $mail->getHeaders()->addTextHeader('X-SES-CONFIGURATION-SET', 'aws-configuration-set-name'); - $mail->getHeaders()->addTextHeader('X-SES-SOURCE-ARN', 'aws-source-arn'); - - $message = $transport->send($mail); - - $this->assertSame('foobar', $message->getMessageId()); - } - - public function testSendThrowsForErrorResponse() - { - $client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface { - $xml = " - - i'm a teapot - 418 - - "; - - return new MockResponse($xml, [ - 'http_code' => 418, - ]); - }); - $transport = new SesApiTransport('ACCESS_KEY', 'SECRET_KEY', null, $client); - $transport->setPort(8984); - - $mail = new Email(); - $mail->subject('Hello!') - ->to(new Address('saif.gmati@symfony.com', 'Saif Eddin')) - ->from(new Address('fabpot@symfony.com', 'Fabien')) - ->text('Hello There!'); - - $this->expectException(HttpTransportException::class); - $this->expectExceptionMessage('Unable to send an email: i\'m a teapot (code 418).'); - $transport->send($mail); - } -} diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpTransportTest.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpTransportTest.php deleted file mode 100644 index bd5babdadd0e3..0000000000000 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesHttpTransportTest.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Mailer\Bridge\Amazon\Tests\Transport; - -use PHPUnit\Framework\TestCase; -use Symfony\Component\HttpClient\MockHttpClient; -use Symfony\Component\HttpClient\Response\MockResponse; -use Symfony\Component\Mailer\Bridge\Amazon\Transport\SesHttpTransport; -use Symfony\Component\Mailer\Exception\HttpTransportException; -use Symfony\Component\Mime\Address; -use Symfony\Component\Mime\Email; -use Symfony\Contracts\HttpClient\ResponseInterface; - -/** - * @group legacy - */ -class SesHttpTransportTest extends TestCase -{ - /** - * @dataProvider getTransportData - */ - public function testToString(SesHttpTransport $transport, string $expected) - { - $this->assertSame($expected, (string) $transport); - } - - public function getTransportData() - { - return [ - [ - new SesHttpTransport('ACCESS_KEY', 'SECRET_KEY'), - 'ses+https://ACCESS_KEY@email.eu-west-1.amazonaws.com', - ], - [ - new SesHttpTransport('ACCESS_KEY', 'SECRET_KEY', 'us-east-1'), - 'ses+https://ACCESS_KEY@email.us-east-1.amazonaws.com', - ], - [ - (new SesHttpTransport('ACCESS_KEY', 'SECRET_KEY'))->setHost('example.com'), - 'ses+https://ACCESS_KEY@example.com', - ], - [ - (new SesHttpTransport('ACCESS_KEY', 'SECRET_KEY'))->setHost('example.com')->setPort(99), - 'ses+https://ACCESS_KEY@example.com:99', - ], - ]; - } - - public function testSend() - { - $client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface { - $this->assertSame('POST', $method); - $this->assertSame('https://email.eu-west-1.amazonaws.com:8984/', $url); - $this->assertStringContainsString('AWS3-HTTPS AWSAccessKeyId=ACCESS_KEY,Algorithm=HmacSHA256,Signature=', $options['headers'][0] ?? $options['request_headers'][0]); - - parse_str($options['body'], $body); - - $this->assertArrayHasKey('Destinations_member_1', $body); - $this->assertSame('saif.gmati@symfony.com', $body['Destinations_member_1']); - $this->assertArrayHasKey('Destinations_member_2', $body); - $this->assertSame('jeremy@derusse.com', $body['Destinations_member_2']); - - $content = base64_decode($body['RawMessage_Data']); - - $this->assertStringContainsString('Hello!', $content); - $this->assertStringContainsString('Saif Eddin ', $content); - $this->assertStringContainsString('Fabien ', $content); - $this->assertStringContainsString('Hello There!', $content); - - $this->assertSame('aws-configuration-set-name', $body['ConfigurationSetName']); - $this->assertSame('aws-source-arn', $body['FromEmailAddressIdentityArn']); - - $xml = ' - - foobar - -'; - - return new MockResponse($xml, [ - 'http_code' => 200, - ]); - }); - $transport = new SesHttpTransport('ACCESS_KEY', 'SECRET_KEY', null, $client); - $transport->setPort(8984); - - $mail = new Email(); - $mail->subject('Hello!') - ->to(new Address('saif.gmati@symfony.com', 'Saif Eddin')) - ->bcc(new Address('jeremy@derusse.com', 'Jérémy Derussé')) - ->from(new Address('fabpot@symfony.com', 'Fabien')) - ->text('Hello There!'); - - $mail->getHeaders()->addTextHeader('X-SES-CONFIGURATION-SET', 'aws-configuration-set-name'); - $mail->getHeaders()->addTextHeader('X-SES-SOURCE-ARN', 'aws-source-arn'); - - $message = $transport->send($mail); - - $this->assertSame('foobar', $message->getMessageId()); - } - - public function testSendThrowsForErrorResponse() - { - $client = new MockHttpClient(function (string $method, string $url, array $options): ResponseInterface { - $xml = " - - i'm a teapot - 418 - - "; - - return new MockResponse($xml, [ - 'http_code' => 418, - ]); - }); - $transport = new SesHttpTransport('ACCESS_KEY', 'SECRET_KEY', null, $client); - - $mail = new Email(); - $mail->subject('Hello!') - ->to(new Address('saif.gmati@symfony.com', 'Saif Eddin')) - ->from(new Address('fabpot@symfony.com', 'Fabien')) - ->text('Hello There!'); - - $this->expectException(HttpTransportException::class); - $this->expectExceptionMessage('Unable to send an email: i\'m a teapot (code 418).'); - $transport->send($mail); - } -} diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesApiTransport.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesApiTransport.php deleted file mode 100644 index 37e08729f9d0d..0000000000000 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesApiTransport.php +++ /dev/null @@ -1,156 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Mailer\Bridge\Amazon\Transport; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Mailer\Envelope; -use Symfony\Component\Mailer\Exception\HttpTransportException; -use Symfony\Component\Mailer\SentMessage; -use Symfony\Component\Mailer\Transport\AbstractApiTransport; -use Symfony\Component\Mime\Address; -use Symfony\Component\Mime\Email; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; - -trigger_deprecation('symfony/amazon-mailer', '5.1', 'The "%s" class is deprecated, use "%s" instead. The Amazon transport now requires "AsyncAws". Run "composer require async-aws/ses".', SesApiTransport::class, SesApiAsyncAwsTransport::class); - -/** - * @author Kevin Verschaeve - */ -class SesApiTransport extends AbstractApiTransport -{ - private const HOST = 'email.%region%.amazonaws.com'; - - private $accessKey; - private $secretKey; - private $region; - - /** - * @param string|null $region Amazon SES region - */ - public function __construct(string $accessKey, string $secretKey, string $region = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null) - { - $this->accessKey = $accessKey; - $this->secretKey = $secretKey; - $this->region = $region ?: 'eu-west-1'; - - parent::__construct($client, $dispatcher, $logger); - } - - public function __toString(): string - { - return sprintf('ses+api://%s@%s', $this->accessKey, $this->getEndpoint()); - } - - protected function doSendApi(SentMessage $sentMessage, Email $email, Envelope $envelope): ResponseInterface - { - $date = gmdate('D, d M Y H:i:s e'); - $auth = sprintf('AWS3-HTTPS AWSAccessKeyId=%s,Algorithm=HmacSHA256,Signature=%s', $this->accessKey, $this->getSignature($date)); - - $response = $this->client->request('POST', 'https://'.$this->getEndpoint(), [ - 'headers' => [ - 'X-Amzn-Authorization' => $auth, - 'Date' => $date, - 'Content-Type' => 'application/x-www-form-urlencoded', - ], - 'body' => $payload = $this->getPayload($email, $envelope), - ]); - - $result = new \SimpleXMLElement($response->getContent(false)); - if (200 !== $response->getStatusCode()) { - throw new HttpTransportException('Unable to send an email: '.$result->Error->Message.sprintf(' (code %d).', $result->Error->Code), $response); - } - - $property = $payload['Action'].'Result'; - - $sentMessage->setMessageId($result->{$property}->MessageId); - - return $response; - } - - private function getEndpoint(): ?string - { - return ($this->host ?: str_replace('%region%', $this->region, self::HOST)).($this->port ? ':'.$this->port : ''); - } - - private function getSignature(string $string): string - { - return base64_encode(hash_hmac('sha256', $string, $this->secretKey, true)); - } - - private function getPayload(Email $email, Envelope $envelope): array - { - if ($email->getAttachments()) { - $payload = [ - 'Action' => 'SendRawEmail', - 'RawMessage.Data' => base64_encode($email->toString()), - ]; - - if ($header = $email->getHeaders()->get('X-SES-CONFIGURATION-SET')) { - $payload['ConfigurationSetName'] = $header->getBodyAsString(); - } - - if ($header = $email->getHeaders()->get('X-SES-SOURCE-ARN')) { - $payload['FromEmailAddressIdentityArn'] = $header->getBodyAsString(); - } - - return $payload; - } - - $payload = [ - 'Action' => 'SendEmail', - 'Destination.ToAddresses.member' => $this->stringifyAddresses($this->getRecipients($email, $envelope)), - 'Message.Subject.Data' => $email->getSubject(), - 'Source' => $envelope->getSender()->toString(), - ]; - - if ($emails = $email->getCc()) { - $payload['Destination.CcAddresses.member'] = $this->stringifyAddresses($emails); - } - if ($emails = $email->getBcc()) { - $payload['Destination.BccAddresses.member'] = $this->stringifyAddresses($emails); - } - if ($email->getTextBody()) { - $payload['Message.Body.Text.Data'] = $email->getTextBody(); - } - if ($email->getHtmlBody()) { - $payload['Message.Body.Html.Data'] = $email->getHtmlBody(); - } - if ($email->getReplyTo()) { - $payload['ReplyToAddresses.member'] = $this->stringifyAddresses($email->getReplyTo()); - } - if ($header = $email->getHeaders()->get('X-SES-CONFIGURATION-SET')) { - $payload['ConfigurationSetName'] = $header->getBodyAsString(); - } - if ($header = $email->getHeaders()->get('X-SES-SOURCE-ARN')) { - $payload['FromEmailAddressIdentityArn'] = $header->getBodyAsString(); - } - - return $payload; - } - - protected function stringifyAddresses(array $addresses): array - { - return array_map(function (Address $a) { - // AWS does not support UTF-8 address - if (preg_match('~[\x00-\x08\x10-\x19\x7F-\xFF\r\n]~', $name = $a->getName())) { - return sprintf('=?UTF-8?B?%s?= <%s>', - base64_encode($name), - $a->getEncodedAddress() - ); - } - - return $a->toString(); - }, $addresses); - } -} diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesHttpTransport.php b/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesHttpTransport.php deleted file mode 100644 index 779566788af32..0000000000000 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesHttpTransport.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Mailer\Bridge\Amazon\Transport; - -use Psr\Log\LoggerInterface; -use Symfony\Component\Mailer\Exception\HttpTransportException; -use Symfony\Component\Mailer\SentMessage; -use Symfony\Component\Mailer\Transport\AbstractHttpTransport; -use Symfony\Component\Mime\Message; -use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; -use Symfony\Contracts\HttpClient\HttpClientInterface; -use Symfony\Contracts\HttpClient\ResponseInterface; - -trigger_deprecation('symfony/amazon-mailer', '5.1', 'The "%s" class is deprecated, use "%s" instead. The Amazon transport now requires "AsyncAws". Run "composer require async-aws/ses".', SesHttpTransport::class, SesHttpAsyncAwsTransport::class); - -/** - * @author Kevin Verschaeve - */ -class SesHttpTransport extends AbstractHttpTransport -{ - private const HOST = 'email.%region%.amazonaws.com'; - - private $accessKey; - private $secretKey; - private $region; - - /** - * @param string|null $region Amazon SES region - */ - public function __construct(string $accessKey, string $secretKey, string $region = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null) - { - $this->accessKey = $accessKey; - $this->secretKey = $secretKey; - $this->region = $region ?: 'eu-west-1'; - - parent::__construct($client, $dispatcher, $logger); - } - - public function __toString(): string - { - return sprintf('ses+https://%s@%s', $this->accessKey, $this->getEndpoint()); - } - - protected function doSendHttp(SentMessage $message): ResponseInterface - { - $date = gmdate('D, d M Y H:i:s e'); - $auth = sprintf('AWS3-HTTPS AWSAccessKeyId=%s,Algorithm=HmacSHA256,Signature=%s', $this->accessKey, $this->getSignature($date)); - - $request = [ - 'headers' => [ - 'X-Amzn-Authorization' => $auth, - 'Date' => $date, - ], - 'body' => [ - 'Action' => 'SendRawEmail', - 'RawMessage.Data' => base64_encode($message->toString()), - ], - ]; - - $index = 1; - foreach ($message->getEnvelope()->getRecipients() as $recipient) { - $request['body']['Destinations.member.'.$index++] = $recipient->getAddress(); - } - - if ($message->getOriginalMessage() instanceof Message - && $configurationSetHeader = $message->getOriginalMessage()->getHeaders()->get('X-SES-CONFIGURATION-SET') - ) { - $request['body']['ConfigurationSetName'] = $configurationSetHeader->getBodyAsString(); - } - - if ($message->getOriginalMessage() instanceof Message - && $sourceArnHeader = $message->getOriginalMessage()->getHeaders()->get('X-SES-SOURCE-ARN')) { - $request['body']['FromEmailAddressIdentityArn'] = $sourceArnHeader->getBodyAsString(); - } - - $response = $this->client->request('POST', 'https://'.$this->getEndpoint(), $request); - - $result = new \SimpleXMLElement($response->getContent(false)); - if (200 !== $response->getStatusCode()) { - throw new HttpTransportException('Unable to send an email: '.$result->Error->Message.sprintf(' (code %d).', $result->Error->Code), $response); - } - - $message->setMessageId($result->SendRawEmailResult->MessageId); - - return $response; - } - - private function getEndpoint(): ?string - { - return ($this->host ?: str_replace('%region%', $this->region, self::HOST)).($this->port ? ':'.$this->port : ''); - } - - private function getSignature(string $string): string - { - return base64_encode(hash_hmac('sha256', $string, $this->secretKey, true)); - } -} diff --git a/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json b/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json index dce785fb91f44..582693fc47e88 100644 --- a/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json +++ b/src/Symfony/Component/Mailer/Bridge/Amazon/composer.json @@ -18,7 +18,6 @@ "require": { "php": ">=8.0.2", "async-aws/ses": "^1.0", - "symfony/deprecation-contracts": "^2.1", "symfony/mailer": "^5.4|^6.0" }, "require-dev": { diff --git a/src/Symfony/Component/Mailer/Bridge/Mailgun/composer.json b/src/Symfony/Component/Mailer/Bridge/Mailgun/composer.json index b30b104206344..e4547cdd5d83d 100644 --- a/src/Symfony/Component/Mailer/Bridge/Mailgun/composer.json +++ b/src/Symfony/Component/Mailer/Bridge/Mailgun/composer.json @@ -17,7 +17,6 @@ ], "require": { "php": ">=8.0.2", - "symfony/deprecation-contracts": "^2.1", "symfony/mailer": "^5.4|^6.0" }, "require-dev": { diff --git a/src/Symfony/Component/Mailer/CHANGELOG.md b/src/Symfony/Component/Mailer/CHANGELOG.md index 2d0f1faddbf1a..fd30774753ea0 100644 --- a/src/Symfony/Component/Mailer/CHANGELOG.md +++ b/src/Symfony/Component/Mailer/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +6.0 +--- + + * The `HttpTransportException` class takes a string at first argument + 5.3 --- diff --git a/src/Symfony/Component/Mailer/Exception/HttpTransportException.php b/src/Symfony/Component/Mailer/Exception/HttpTransportException.php index c72eb6cf6e3ee..01650f0344e80 100644 --- a/src/Symfony/Component/Mailer/Exception/HttpTransportException.php +++ b/src/Symfony/Component/Mailer/Exception/HttpTransportException.php @@ -20,14 +20,8 @@ class HttpTransportException extends TransportException { private $response; - public function __construct(?string $message, ResponseInterface $response, int $code = 0, \Throwable $previous = null) + public function __construct(string $message, ResponseInterface $response, int $code = 0, \Throwable $previous = null) { - if (null === $message) { - trigger_deprecation('symfony/mailer', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__); - - $message = ''; - } - parent::__construct($message, $code, $previous); $this->response = $response; diff --git a/src/Symfony/Component/Mailer/composer.json b/src/Symfony/Component/Mailer/composer.json index 774100c4c6deb..363702c66646d 100644 --- a/src/Symfony/Component/Mailer/composer.json +++ b/src/Symfony/Component/Mailer/composer.json @@ -19,7 +19,6 @@ "php": ">=8.0.2", "egulias/email-validator": "^2.1.10|^3", "psr/log": "~1.0", - "symfony/deprecation-contracts": "^2.1", "symfony/event-dispatcher": "^5.4|^6.0", "symfony/mime": "^5.4|^6.0", "symfony/service-contracts": "^1.1|^2" pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy