Skip to content

Commit 6cb3054

Browse files
committed
[Notifier] moved the deprecation to the factory
1 parent 109e92a commit 6cb3054

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/notifier_transports.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,11 @@
283283
->set('notifier.transport_factory.simple-textin', Bridge\SimpleTextin\SimpleTextinTransportFactory::class)
284284
->parent('notifier.transport_factory.abstract')
285285
->tag('texter.transport_factory')
286-
286+
287287
->set('notifier.transport_factory.click-send', Bridge\ClickSend\ClickSendTransportFactory::class)
288288
->parent('notifier.transport_factory.abstract')
289289
->tag('texter.transport_factory')
290-
290+
291291
->set('notifier.transport_factory.smsmode', Bridge\Smsmode\SmsmodeTransportFactory::class)
292292
->parent('notifier.transport_factory.abstract')
293293
->tag('texter.transport_factory')

src/Symfony/Component/Notifier/Bridge/Brevo/BrevoTransport.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ final class BrevoTransport extends AbstractTransport
2828
{
2929
protected const HOST = 'api.brevo.com';
3030

31-
private string $apiKey;
32-
private string $sender;
33-
34-
public function __construct(#[\SensitiveParameter] string $apiKey, string $sender, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
35-
{
36-
$this->apiKey = $apiKey;
37-
$this->sender = $sender;
38-
31+
public function __construct(
32+
#[\SensitiveParameter] private readonly string $apiKey,
33+
private readonly string $sender,
34+
HttpClientInterface $client = null,
35+
EventDispatcherInterface $dispatcher = null
36+
) {
3937
parent::__construct($client, $dispatcher);
4038
}
4139

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CHANGELOG
22
=========
33

4-
6.3
4+
6.4
55
---
66

77
* Added the bridge

src/Symfony/Component/Notifier/Bridge/Brevo/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "symfony/brevo-notifier",
33
"type": "symfony-notifier-bridge",
4-
"description": "Symfony Brevo Notifier Bridge",
4+
"description": "Symfony Brevo Notifier Bridge - formerly Sendinblue",
55
"keywords": ["brevo", "notifier"],
66
"homepage": "https://symfony.com",
77
"license": "MIT",

src/Symfony/Component/Notifier/Bridge/Sendinblue/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
6.3
5+
---
6+
7+
* Deprecated the bridge, replaced it with Brevo in reaction to their rebranding.
8+
49
6.2
510
---
611

src/Symfony/Component/Notifier/Bridge/Sendinblue/SendinblueTransport.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Notifier\Bridge\Sendinblue;
1313

14-
use Symfony\Component\Notifier\Bridge\Brevo\BrevoTransport;
1514
use Symfony\Component\Notifier\Exception\TransportException;
1615
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
1716
use Symfony\Component\Notifier\Message\MessageInterface;
@@ -22,8 +21,6 @@
2221
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
2322
use Symfony\Contracts\HttpClient\HttpClientInterface;
2423

25-
trigger_deprecation('symfony/sendinblue-notifier', '6.3', 'The "%s" class is deprecated, use "%s" instead.', SendinblueTransport::class, BrevoTransport::class);
26-
2724
/**
2825
* @author Pierre Tondereau <pierre.tondereau@gmail.com>
2926
*

src/Symfony/Component/Notifier/Bridge/Sendinblue/SendinblueTransportFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
use Symfony\Component\Notifier\Transport\AbstractTransportFactory;
1717
use Symfony\Component\Notifier\Transport\Dsn;
1818

19-
trigger_deprecation('symfony/sendinblue-notifier', '6.3', 'The "%s" class is deprecated, use "%s" instead.', SendinblueTransport::class, BrevoTransport::class);
20-
2119
/**
2220
* @author Pierre Tondereau <pierre.tondereau@protonmail.com>
2321
*
@@ -27,6 +25,8 @@ final class SendinblueTransportFactory extends AbstractTransportFactory
2725
{
2826
public function create(Dsn $dsn): SendinblueTransport
2927
{
28+
trigger_deprecation('symfony/sendinblue-notifier', '6.3', 'The "%s" class is deprecated, use "%s" instead.', SendinblueTransport::class, BrevoTransport::class);
29+
3030
$scheme = $dsn->getScheme();
3131

3232
if ('sendinblue' !== $scheme) {

0 commit comments

Comments
 (0)
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