Skip to content

Commit a9f9e75

Browse files
authored
Merge pull request #563 from web-token/temp-ac4d6f
Merge-up 3.4.x to 4.0.x
2 parents 7de4c82 + 476862e commit a9f9e75

File tree

13 files changed

+57
-22
lines changed

13 files changed

+57
-22
lines changed

.github/workflows/gitsplit.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: gitsplit
22
on:
33
push:
4-
tags:
5-
- '*'
6-
release:
7-
types: [published]
4+
branches:
5+
- "*.x"
86

97
jobs:
108
gitsplit:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Or
2626

2727
# Contributing
2828

29-
Requests for new features, bug fixed and all other ideas to make this library useful are welcome. [Please follow these best practices](doc/Contributing.md).
29+
Requests for new features, bug fixed and all other ideas to make this library useful are welcome. [Please follow these best practices](.github/CONTRIBUTING.md).
3030

3131
If you discover a security vulnerability within the project, please **don't use the bug tracker and don't publish it publicly**.
3232
Instead, all security issues must be sent to security [at] spomky-labs.com.

src/Bundle/Routing/JWKSetLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ public function add(string $pattern, string $name): void
3232
}
3333

3434
#[Override]
35-
public function load(mixed $resource, string $type = null): RouteCollection
35+
public function load(mixed $resource, ?string $type = null): RouteCollection
3636
{
3737
return $this->routes;
3838
}
3939

4040
#[Override]
41-
public function supports(mixed $resource, string $type = null): bool
41+
public function supports(mixed $resource, ?string $type = null): bool
4242
{
4343
return $type === 'jwkset';
4444
}

src/Bundle/Serializer/JWESerializer.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,19 @@ public function getSupportedTypes(?string $format): array
3636
}
3737

3838
#[Override]
39-
public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool
40-
{
39+
public function supportsDenormalization(
40+
mixed $data,
41+
string $type,
42+
?string $format = null,
43+
array $context = []
44+
): bool {
4145
return $type === JWE::class
4246
&& class_exists(JWESerializerManager::class)
4347
&& $this->formatSupported($format);
4448
}
4549

4650
#[Override]
47-
public function denormalize(mixed $data, string $type, string $format = null, array $context = []): JWE
51+
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): JWE
4852
{
4953
if ($data instanceof JWE === false) {
5054
throw new LogicException('Expected data to be a JWE.');

src/Bundle/Serializer/JWSSerializer.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,19 @@ public function getSupportedTypes(?string $format): array
3636
}
3737

3838
#[Override]
39-
public function supportsDenormalization(mixed $data, string $type, string $format = null, array $context = []): bool
40-
{
39+
public function supportsDenormalization(
40+
mixed $data,
41+
string $type,
42+
?string $format = null,
43+
array $context = []
44+
): bool {
4145
return $type === JWS::class
4246
&& class_exists(JWSSerializerManager::class)
4347
&& $this->formatSupported($format);
4448
}
4549

4650
#[Override]
47-
public function denormalize(mixed $data, string $type, string $format = null, array $context = []): JWS
51+
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): JWS
4852
{
4953
if ($data instanceof JWS === false) {
5054
throw new LogicException('Expected data to be a JWS.');

src/Bundle/Services/JWEDecrypter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function decryptUsingKeySet(
2828
JWE &$jwe,
2929
JWKSet $jwkset,
3030
int $recipient,
31-
JWK &$jwk = null,
31+
?JWK &$jwk = null,
3232
?JWK $senderKey = null
3333
): bool {
3434
$success = parent::decryptUsingKeySet($jwe, $jwkset, $recipient, $jwk, $senderKey);

src/Bundle/Services/JWSVerifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function verifyWithKeySet(
2929
JWKSet $jwkset,
3030
int $signatureIndex,
3131
?string $detachedPayload = null,
32-
JWK &$jwk = null
32+
?JWK &$jwk = null
3333
): bool {
3434
$success = parent::verifyWithKeySet($jws, $jwkset, $signatureIndex, $detachedPayload, $jwk);
3535
if ($success) {

src/Library/Console/KeyAnalyzerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ final class KeyAnalyzerCommand extends Command
2323
{
2424
public function __construct(
2525
private readonly KeyAnalyzerManager $analyzerManager,
26-
string $name = null
26+
?string $name = null
2727
) {
2828
parent::__construct($name);
2929
}

src/Library/Console/KeysetAnalyzerCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final class KeysetAnalyzerCommand extends Command
2626
public function __construct(
2727
private readonly KeysetAnalyzerManager $keysetAnalyzerManager,
2828
private readonly KeyAnalyzerManager $keyAnalyzerManager,
29-
string $name = null
29+
?string $name = null
3030
) {
3131
parent::__construct($name);
3232
}

src/Library/Encryption/JWEDecrypter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function decryptUsingKeySet(
8585
JWE &$jwe,
8686
JWKSet $jwkset,
8787
int $recipient,
88-
JWK &$jwk = null,
88+
?JWK &$jwk = null,
8989
?JWK $senderKey = null
9090
): bool {
9191
if ($jwkset->count() === 0) {
@@ -112,7 +112,7 @@ private function decryptRecipientKey(
112112
JWE $jwe,
113113
JWKSet $jwkset,
114114
int $i,
115-
JWK &$successJwk = null,
115+
?JWK &$successJwk = null,
116116
?JWK $senderKey = null
117117
): ?string {
118118
$recipient = $jwe->getRecipient($i);

0 commit comments

Comments
 (0)