Skip to content

Commit 3e116f6

Browse files
committed
feature #46183 Hide sensitive information with SensitiveParameter attribute (GromNaN)
This PR was squashed before being merged into the 6.2 branch. Discussion ---------- Hide sensitive information with `SensitiveParameter` attribute | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | n/a | License | MIT | Doc PR | n/a New feature for PHP 8.2: [Redact parameters in back traces](https://stitcher.io/blog/new-in-php-82#redact-parameters-in-back-traces-rfc) This could be a "minor" change, but I think it should be highlighted to be fully functional. The annotation is required in all calling functions otherwise the argument value is displayed. Commits ------- 7dcc4ac2b8 Hide sensitive information with `SensitiveParameter` attribute
2 parents ca061da + 3b22962 commit 3e116f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UriSigner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class UriSigner
2727
* @param string $secret A secret
2828
* @param string $parameter Query string parameter to use
2929
*/
30-
public function __construct(string $secret, string $parameter = '_hash')
30+
public function __construct(#[\SensitiveParameter] string $secret, string $parameter = '_hash')
3131
{
3232
$this->secret = $secret;
3333
$this->parameter = $parameter;

0 commit comments

Comments
 (0)