@@ -58,14 +58,14 @@ final class Transport
58
58
59
59
private iterable $ factories ;
60
60
61
- public static function fromDsn (string $ dsn , EventDispatcherInterface $ dispatcher = null , HttpClientInterface $ client = null , LoggerInterface $ logger = null ): TransportInterface
61
+ public static function fromDsn (#[\SensitiveParameter] string $ dsn , EventDispatcherInterface $ dispatcher = null , HttpClientInterface $ client = null , LoggerInterface $ logger = null ): TransportInterface
62
62
{
63
63
$ factory = new self (iterator_to_array (self ::getDefaultFactories ($ dispatcher , $ client , $ logger )));
64
64
65
65
return $ factory ->fromString ($ dsn );
66
66
}
67
67
68
- public static function fromDsns (array $ dsns , EventDispatcherInterface $ dispatcher = null , HttpClientInterface $ client = null , LoggerInterface $ logger = null ): TransportInterface
68
+ public static function fromDsns (#[\SensitiveParameter] array $ dsns , EventDispatcherInterface $ dispatcher = null , HttpClientInterface $ client = null , LoggerInterface $ logger = null ): TransportInterface
69
69
{
70
70
$ factory = new self (iterator_to_array (self ::getDefaultFactories ($ dispatcher , $ client , $ logger )));
71
71
@@ -80,7 +80,7 @@ public function __construct(iterable $factories)
80
80
$ this ->factories = $ factories ;
81
81
}
82
82
83
- public function fromStrings (array $ dsns ): Transports
83
+ public function fromStrings (#[\SensitiveParameter] array $ dsns ): Transports
84
84
{
85
85
$ transports = [];
86
86
foreach ($ dsns as $ name => $ dsn ) {
@@ -90,7 +90,7 @@ public function fromStrings(array $dsns): Transports
90
90
return new Transports ($ transports );
91
91
}
92
92
93
- public function fromString (string $ dsn ): TransportInterface
93
+ public function fromString (#[\SensitiveParameter] string $ dsn ): TransportInterface
94
94
{
95
95
[$ transport , $ offset ] = $ this ->parseDsn ($ dsn );
96
96
if ($ offset !== \strlen ($ dsn )) {
@@ -100,7 +100,7 @@ public function fromString(string $dsn): TransportInterface
100
100
return $ transport ;
101
101
}
102
102
103
- private function parseDsn (string $ dsn , int $ offset = 0 ): array
103
+ private function parseDsn (#[\SensitiveParameter] string $ dsn , int $ offset = 0 ): array
104
104
{
105
105
static $ keywords = [
106
106
'failover ' => FailoverTransport::class,
0 commit comments