Skip to content

Commit 5338bfc

Browse files
Mark DSNs as #[SensitiveParameter]
1 parent fa29611 commit 5338bfc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Transport/BeanstalkdTransportFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
*/
2121
class BeanstalkdTransportFactory implements TransportFactoryInterface
2222
{
23-
public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface
23+
public function createTransport(#[\SensitiveParameter] string $dsn, array $options, SerializerInterface $serializer): TransportInterface
2424
{
2525
unset($options['transport_name']);
2626

2727
return new BeanstalkdTransport(Connection::fromDsn($dsn, $options), $serializer);
2828
}
2929

30-
public function supports(string $dsn, array $options): bool
30+
public function supports(#[\SensitiveParameter] string $dsn, array $options): bool
3131
{
3232
return str_starts_with($dsn, 'beanstalkd://');
3333
}

Transport/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function __construct(array $configuration, PheanstalkInterface $client)
5555
$this->ttr = $this->configuration['ttr'];
5656
}
5757

58-
public static function fromDsn(string $dsn, array $options = []): self
58+
public static function fromDsn(#[\SensitiveParameter] string $dsn, array $options = []): self
5959
{
6060
if (false === $components = parse_url($dsn)) {
6161
throw new InvalidArgumentException(sprintf('The given Beanstalkd DSN "%s" is invalid.', $dsn));

0 commit comments

Comments
 (0)