Skip to content

Commit 8c445d0

Browse files
committed
Remove #[SensitiveParameter] attributes not being supported in PHP 8.1
1 parent df24b49 commit 8c445d0

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Please read about the future of the Firebase Admin PHP SDK on the
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
* Removed the `#[SensitiveParameter]` attribute because it's not supported in PHP 8.1.
13+
1014
## [7.21.0] - 2025-07-23
1115

1216
### Changed

src/Firebase/AppCheck/AppCheckTokenGenerator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
use Firebase\JWT\JWT;
99
use Kreait\Firebase\Exception\AppCheck\InvalidAppCheckTokenOptions;
1010
use Psr\Clock\ClockInterface;
11-
use SensitiveParameter;
1211

1312
/**
1413
* @internal
14+
*
15+
* @todo Add #[SensitiveParameter] attribute to the private key once the minimum required PHP version is >=8.2
1516
*/
1617
final class AppCheckTokenGenerator
1718
{
@@ -25,7 +26,7 @@ final class AppCheckTokenGenerator
2526
*/
2627
public function __construct(
2728
private readonly string $clientEmail,
28-
#[SensitiveParameter] private readonly string $privateKey,
29+
private readonly string $privateKey,
2930
?ClockInterface $clock = null,
3031
) {
3132
$this->clock = $clock ?? SystemClock::create();

src/Firebase/ServiceAccount.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,38 @@
44

55
namespace Kreait\Firebase;
66

7-
use SensitiveParameter;
8-
97
/**
108
* @internal
9+
*
10+
* @todo Add #[SensitiveParameter] attributes once the minimum required PHP version is >=8.2
1111
*/
1212
final class ServiceAccount
1313
{
1414
public function __construct(
1515
/** @var non-empty-string */
1616
public string $type,
1717
/** @var non-empty-string */
18-
#[SensitiveParameter] public string $projectId,
18+
public string $projectId,
1919
/** @var non-empty-string */
20-
#[SensitiveParameter] public string $clientEmail,
20+
public string $clientEmail,
2121
/** @var non-empty-string */
22-
#[SensitiveParameter] public string $clientId,
22+
public string $clientId,
2323
/** @var non-empty-string */
24-
#[SensitiveParameter] public string $privateKey,
24+
public string $privateKey,
2525
/** @var non-empty-string */
26-
#[SensitiveParameter] public string $privateKeyId,
26+
public string $privateKeyId,
2727
/** @var non-empty-string */
28-
#[SensitiveParameter] public string $authUri,
28+
public string $authUri,
2929
/** @var non-empty-string */
30-
#[SensitiveParameter] public string $tokenUri,
30+
public string $tokenUri,
3131
/** @var non-empty-string */
32-
#[SensitiveParameter] public string $authProviderX509CertUrl,
32+
public string $authProviderX509CertUrl,
3333
/** @var non-empty-string */
34-
#[SensitiveParameter] public string $clientX509CertUrl,
34+
public string $clientX509CertUrl,
3535
/** @var non-empty-string|null */
36-
#[SensitiveParameter] public ?string $quotaProjectId = null,
36+
public ?string $quotaProjectId = null,
3737
/** @var non-empty-string|null */
38-
#[SensitiveParameter] public ?string $universeDomain = null,
38+
public ?string $universeDomain = null,
3939
) {
4040
}
4141
}

0 commit comments

Comments
 (0)