Skip to content

Commit 5e4de71

Browse files
authored
Merge pull request #49 from SimonFrings/sensitive_parameter
Mark passwords and URIs as `#[\SensitiveParameter]` (PHP 8.2+)
2 parents 8c642b2 + 90cb5a2 commit 5e4de71

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ProxyConnector.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,12 @@ class ProxyConnector implements ConnectorInterface
5757
* @param array $httpHeaders Custom HTTP headers to be sent to the proxy.
5858
* @throws InvalidArgumentException if the proxy URL is invalid
5959
*/
60-
public function __construct($proxyUrl, ConnectorInterface $connector = null, array $httpHeaders = array())
61-
{
60+
public function __construct(
61+
#[\SensitiveParameter]
62+
$proxyUrl,
63+
ConnectorInterface $connector = null,
64+
array $httpHeaders = array()
65+
) {
6266
// support `http+unix://` scheme for Unix domain socket (UDS) paths
6367
if (preg_match('/^http\+unix:\/\/(.*?@)?(.+?)$/', $proxyUrl, $match)) {
6468
// rewrite URI to parse authentication from dummy host

0 commit comments

Comments
 (0)