Skip to content

Commit 2e7bb12

Browse files
committed
Improve error handling and update dependencies (#572)
Target branch: 4.0.x Resolves issue # - [ ] It is a Bug fix - [ ] It is a New feature - [ ] It is related to dependencies Includes: - [ ] Breaks BC - [ ] Deprecations
1 parent fe8a219 commit 2e7bb12

File tree

5 files changed

+27
-26
lines changed

5 files changed

+27
-26
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
"ext-sodium": "*",
6868
"ekino/phpstan-banned-code": "^1.0",
6969
"ergebnis/phpunit-slow-test-detector": "^2.14",
70-
"infection/infection": "^0.28 || ^0.29",
70+
"infection/infection": "^0.28|^0.29",
7171
"matthiasnoback/symfony-config-test": "^5.0",
72-
"paragonie/sodium_compat": "^1.20 || ^2.0",
72+
"paragonie/sodium_compat": "^1.20|^2.0",
7373
"php-parallel-lint/php-parallel-lint": "^1.3",
7474
"phpbench/phpbench": "^1.2",
7575
"phpstan/extension-installer": "^1.3",
@@ -80,7 +80,7 @@
8080
"phpstan/phpstan-strict-rules": "^1.4",
8181
"phpstan/phpstan-symfony": "^1.3",
8282
"phpunit/phpunit": "^10.5.10|^11.0",
83-
"qossmic/deptrac-shim": "^1.0",
83+
"qossmic/deptrac": "^2.0",
8484
"rector/rector": "^1.0",
8585
"roave/security-advisories": "dev-latest",
8686
"spomky-labs/aes-key-wrap": "^7.0",

deptrac.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,24 @@ parameters:
44
layers:
55
- name: 'Library'
66
collectors:
7-
- { type: className, regex: '^Jose\\Component\\' }
7+
- { type: classLike, value: '^Jose\\Component\\' }
88
- name: 'Experimental'
99
collectors:
10-
- { type: className, regex: '^Jose\\Experimental\\' }
10+
- { type: classLike, value: '^Jose\\Experimental\\' }
1111
- name: 'Bundle'
1212
collectors:
13-
- { type: className, regex: '^Jose\\Bundle\\' }
13+
- { type: classLike, value: '^Jose\\Bundle\\' }
1414
- name: 'Vendors'
1515
collectors:
16-
- { type: className, regex: '^Symfony\\' }
17-
- { type: className, regex: '^SpomkyLabs\\Pki\\' }
18-
- { type: className, regex: '^ParagonIE\\Sodium\\' }
19-
- { type: className, regex: '^Psr\\EventDispatcher\\' }
20-
- { type: className, regex: '^Psr\\Clock\\' }
21-
- { type: className, regex: '^Brick\\Math\\' }
22-
- { type: className, regex: '^AESKW\\' }
23-
- { type: className, regex: '^ZxcvbnPhp\\' }
16+
- { type: classLike, value: '^Symfony\\' }
17+
- { type: classLike, value: '^SpomkyLabs\\Pki\\' }
18+
- { type: classLike, value: '^ParagonIE\\Sodium\\' }
19+
- { type: classLike, value: '^Psr\\EventDispatcher\\' }
20+
- { type: classLike, value: '^Psr\\Clock\\' }
21+
- { type: classLike, value: '^Brick\\Math\\' }
22+
- { type: classLike, value: '^AESKW\\' }
23+
- { type: classLike, value: '^ZxcvbnPhp\\' }
24+
- { type: classLike, value: '^Psr\\' }
2425
ruleset:
2526
Library:
2627
- 'Vendors'

src/Library/Checker/IsEqualChecker.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
{
1515
/**
1616
* @param string $key The claim or header parameter name to check.
17-
* @param mixed $value The expected value.
1817
* @param bool $protectedHeaderOnly [optional] Whether the header parameter MUST be protected.
1918
* This option has no effect for claim checkers.
2019
*/

tests/Bundle/JoseFramework/Functional/KeyManagement/JWKSetLoaderTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use PHPUnit\Framework\Attributes\Test;
1010
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
1111
use Symfony\Component\HttpClient\Response\MockResponse;
12+
use Symfony\Component\HttpFoundation\Request;
1213
use Symfony\Component\HttpFoundation\Response;
1314

1415
/**
@@ -33,7 +34,7 @@ public static function aJWKSetCanBeSharedInTheConfiguration(): void
3334
static::ensureKernelShutdown();
3435
$client = static::createClient();
3536

36-
$client->request('GET', '/keys/1.jwkset');
37+
$client->request(Request::METHOD_GET, '/keys/1.jwkset');
3738
/** @var Response $response */
3839
$response = $client->getResponse();
3940

@@ -62,7 +63,7 @@ public static function aJWKSetCanBeSharedFromAnotherBundle(): void
6263
static::ensureKernelShutdown();
6364
$client = static::createClient();
6465

65-
$client->request('GET', '/keys/2.jwkset');
66+
$client->request(Request::METHOD_GET, '/keys/2.jwkset');
6667
/** @var Response $response */
6768
$response = $client->getResponse();
6869

tests/Component/KeyManagement/JWKFactoryTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -247,55 +247,55 @@ public static function dataKeys(): iterable
247247
{
248248
yield [
249249
'filename' => __DIR__ . '/Keys/ED/public-ed448.pem',
250-
'values' => [
250+
'expectedValues' => [
251251
'kty' => 'OKP',
252252
'crv' => 'Ed448',
253253
'x' => 'wwHKDV7s4fBhmFSTzYorlaToGXNcsa7SakZdekT_sexD5ENj5lWP6_KX9_u--w_QSm80rNOodj0A',
254254
],
255255
];
256256
yield [
257257
'filename' => __DIR__ . '/Keys/ED/public-ed25519.pem',
258-
'values' => [
258+
'expectedValues' => [
259259
'kty' => 'OKP',
260260
'crv' => 'Ed25519',
261261
'x' => 'wrI33AEj15KHHYplueUE5cnJKtbM8oVHFf6wGnw2oOE',
262262
],
263263
];
264264
yield [
265265
'filename' => __DIR__ . '/Keys/ED/public-X448.pem',
266-
'values' => [
266+
'expectedValues' => [
267267
'kty' => 'OKP',
268268
'crv' => 'X448',
269269
'x' => 'UoPD73NQACC8A-otDUVun4IrMsk775ShMRf4ThDrq4xY2eAI-pOIVujrvBXXd9g8gUNwBT0fmnc',
270270
],
271271
];
272272
yield [
273273
'filename' => __DIR__ . '/Keys/ED/public-X25519.pem',
274-
'values' => [
274+
'expectedValues' => [
275275
'kty' => 'OKP',
276276
'crv' => 'X25519',
277277
'x' => '3OJLiffmOCQGtil23QGyn0nk9EBKoZx6P-6o-EnsBB4',
278278
],
279279
];
280280
yield [
281281
'filename' => __DIR__ . '/Keys/ED/private-ed448.pem',
282-
'values' => [
282+
'expectedValues' => [
283283
'kty' => 'OKP',
284284
'crv' => 'Ed448',
285285
'd' => '0GXSbNLOh7NQBlwoF8y2WJmjeP5Puif4_JL4ihFUzRLrb_3r4cH8l_HWJA-2ffY62LEB_ozsehG5',
286286
],
287287
];
288288
yield [
289289
'filename' => __DIR__ . '/Keys/ED/private-X448.pem',
290-
'values' => [
290+
'expectedValues' => [
291291
'kty' => 'OKP',
292292
'crv' => 'X448',
293293
'd' => 'OHZK0Fp9MAAmk0yZekiAkB8qxpCVAF4dT2x_xmFNDdCTnyDvixaiZ0NSRpAdR59tA6OJmOFfbck',
294294
],
295295
];
296296
yield [
297297
'filename' => __DIR__ . '/Keys/ED/private-ed25519.pem',
298-
'values' => [
298+
'expectedValues' => [
299299
'kty' => 'OKP',
300300
'crv' => 'Ed25519',
301301
'd' => 'Pr9AxZivB-zSq95wLrZfYa7DQ3TUPqZTkP_0w33r3rc',
@@ -304,7 +304,7 @@ public static function dataKeys(): iterable
304304
];
305305
yield [
306306
'filename' => __DIR__ . '/Keys/ED/private-secp384r1-with-public.pem',
307-
'values' => [
307+
'expectedValues' => [
308308
'kty' => 'EC',
309309
'crv' => 'P-384',
310310
'd' => '31taDOPQnlNl2aBC_EaGTqVGjGN_qg6iuLwP6cVTmhKMQ5PTL67wS6mmyKi8GdVP',
@@ -314,7 +314,7 @@ public static function dataKeys(): iterable
314314
];
315315
yield [
316316
'filename' => __DIR__ . '/Keys/ED/private-X25519.pem',
317-
'values' => [
317+
'expectedValues' => [
318318
'kty' => 'OKP',
319319
'crv' => 'X25519',
320320
'd' => 'mG-fgDwkr58hwIeqCQKZbR8HKeY4yg_AzvU6zyNaVUE',

0 commit comments

Comments
 (0)