Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b92bdc0

Browse files
committed
minor #53399 [Mailer][Notifier] add more #[\SensitiveParameter] attributes (xabbuh)
This PR was merged into the 7.1 branch. Discussion ---------- [Mailer][Notifier] add more `#[\SensitiveParameter]` attributes | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- acd7353 add more SensitiveParameter attributes
2 parents 7c53816 + acd7353 commit b92bdc0

File tree

9 files changed

+11
-13
lines changed

9 files changed

+11
-13
lines changed

src/Symfony/Component/Mailer/Bridge/Infobip/Transport/InfobipSmtpTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
final class InfobipSmtpTransport extends EsmtpTransport
1919
{
20-
public function __construct(string $key, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
20+
public function __construct(#[\SensitiveParameter] string $key, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
2121
{
2222
parent::__construct('smtp-api.infobip.com', 587, false, $dispatcher, $logger);
2323

src/Symfony/Component/Mailer/Bridge/MailPace/Transport/MailPaceSmtpTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626
final class MailPaceSmtpTransport extends EsmtpTransport
2727
{
28-
public function __construct(string $id, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
28+
public function __construct(#[\SensitiveParameter] string $id, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
2929
{
3030
parent::__construct('smtp.mailpace.com', 587, false, $dispatcher, $logger);
3131

src/Symfony/Component/Mailer/Bridge/Postmark/Transport/PostmarkSmtpTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class PostmarkSmtpTransport extends EsmtpTransport
2929
{
3030
private ?string $messageStream = null;
3131

32-
public function __construct(string $id, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
32+
public function __construct(#[\SensitiveParameter] string $id, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
3333
{
3434
parent::__construct('smtp.postmarkapp.com', 587, false, $dispatcher, $logger);
3535

src/Symfony/Component/Mailer/Bridge/Scaleway/Transport/ScalewaySmtpTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
final class ScalewaySmtpTransport extends EsmtpTransport
1919
{
20-
public function __construct(string $projetId, string $token, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
20+
public function __construct(string $projetId, #[\SensitiveParameter] string $token, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
2121
{
2222
parent::__construct('smtp.tem.scw.cloud', 465, true, $dispatcher, $logger);
2323

src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridSmtpTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class SendgridSmtpTransport extends EsmtpTransport
2222
{
23-
public function __construct(string $key, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
23+
public function __construct(#[\SensitiveParameter] string $key, EventDispatcherInterface $dispatcher = null, LoggerInterface $logger = null)
2424
{
2525
parent::__construct('smtp.sendgrid.net', 465, true, $dispatcher, $logger);
2626

src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class Connection
9696
private \AMQPExchange $amqpDelayExchange;
9797
private int $lastActivityTime = 0;
9898

99-
public function __construct(array $connectionOptions, array $exchangeOptions, array $queuesOptions, AmqpFactory $amqpFactory = null)
99+
public function __construct(#[\SensitiveParameter] array $connectionOptions, array $exchangeOptions, array $queuesOptions, AmqpFactory $amqpFactory = null)
100100
{
101101
if (!\extension_loaded('amqp')) {
102102
throw new LogicException(sprintf('You cannot use the "%s" as the "amqp" extension is not installed.', __CLASS__));

src/Symfony/Component/Notifier/Bridge/GoogleChat/GoogleChatTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ final class GoogleChatTransport extends AbstractTransport
4141
*/
4242
public function __construct(
4343
private string $space,
44-
private string $accessKey,
44+
#[\SensitiveParameter] private string $accessKey,
4545
#[\SensitiveParameter] private string $accessToken,
4646
private ?string $threadKey = null,
4747
HttpClientInterface $client = null,

src/Symfony/Component/Notifier/Bridge/MessageMedia/MessageMediaTransport.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ final class MessageMediaTransport extends AbstractTransport
3030
protected const HOST = 'api.messagemedia.com';
3131

3232
public function __construct(
33-
private string $apiKey,
33+
#[\SensitiveParameter] private string $apiKey,
3434
#[\SensitiveParameter] private string $apiSecret,
3535
private ?string $from = null,
3636
HttpClientInterface $client = null,
3737
EventDispatcherInterface $dispatcher = null,
38-
)
39-
{
38+
) {
4039
parent::__construct($client, $dispatcher);
4140
}
4241

src/Symfony/Component/Notifier/Bridge/Ntfy/NtfyTransport.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ public function __construct(
3636
private bool $secureHttp = true,
3737
HttpClientInterface $client = null,
3838
EventDispatcherInterface $dispatcher = null,
39-
)
40-
{
39+
) {
4140
parent::__construct($client, $dispatcher);
4241
}
4342

@@ -46,7 +45,7 @@ public function getTopic(): string
4645
return $this->topic;
4746
}
4847

49-
public function setPassword(?string $password): self
48+
public function setPassword(#[\SensitiveParameter] ?string $password): self
5049
{
5150
$this->password = $password;
5251

0 commit comments

Comments
 (0)