Skip to content

Commit b28a1f3

Browse files
Mark DSNs as #[SensitiveParameter]
1 parent df52cfc commit b28a1f3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Transport/AmqpTransportFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
*/
2121
class AmqpTransportFactory 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 AmqpTransport(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, 'amqp://') || str_starts_with($dsn, 'amqps://');
3333
}

Transport/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function __construct(array $connectionOptions, array $exchangeOptions, ar
160160
* * verify: Enable or disable peer verification. If peer verification is enabled then the common name in the
161161
* server certificate must match the server name. Peer verification is enabled by default.
162162
*/
163-
public static function fromDsn(string $dsn, array $options = [], AmqpFactory $amqpFactory = null): self
163+
public static function fromDsn(#[\SensitiveParameter] string $dsn, array $options = [], AmqpFactory $amqpFactory = null): self
164164
{
165165
if (false === $parsedUrl = parse_url($dsn)) {
166166
// this is a valid URI that parse_url cannot handle when you want to pass all parameters as options

0 commit comments

Comments
 (0)