diff --git a/composer.json b/composer.json index 5d5d3274..3e2964c5 100644 --- a/composer.json +++ b/composer.json @@ -67,9 +67,9 @@ "ext-sodium": "*", "ekino/phpstan-banned-code": "^1.0", "ergebnis/phpunit-slow-test-detector": "^2.14", - "infection/infection": "^0.28 || ^0.29", + "infection/infection": "^0.28|^0.29", "matthiasnoback/symfony-config-test": "^5.0", - "paragonie/sodium_compat": "^1.20 || ^2.0", + "paragonie/sodium_compat": "^1.20|^2.0", "php-parallel-lint/php-parallel-lint": "^1.3", "phpbench/phpbench": "^1.2", "phpstan/extension-installer": "^1.3", @@ -80,7 +80,7 @@ "phpstan/phpstan-strict-rules": "^1.4", "phpstan/phpstan-symfony": "^1.3", "phpunit/phpunit": "^10.5.10|^11.0", - "qossmic/deptrac-shim": "^1.0", + "qossmic/deptrac": "^2.0", "rector/rector": "^1.0", "roave/security-advisories": "dev-latest", "spomky-labs/aes-key-wrap": "^7.0", diff --git a/deptrac.yaml b/deptrac.yaml index 1cfa0151..8f2c4f4a 100644 --- a/deptrac.yaml +++ b/deptrac.yaml @@ -4,23 +4,24 @@ parameters: layers: - name: 'Library' collectors: - - { type: className, regex: '^Jose\\Component\\' } + - { type: classLike, value: '^Jose\\Component\\' } - name: 'Experimental' collectors: - - { type: className, regex: '^Jose\\Experimental\\' } + - { type: classLike, value: '^Jose\\Experimental\\' } - name: 'Bundle' collectors: - - { type: className, regex: '^Jose\\Bundle\\' } + - { type: classLike, value: '^Jose\\Bundle\\' } - name: 'Vendors' collectors: - - { type: className, regex: '^Symfony\\' } - - { type: className, regex: '^SpomkyLabs\\Pki\\' } - - { type: className, regex: '^ParagonIE\\Sodium\\' } - - { type: className, regex: '^Psr\\EventDispatcher\\' } - - { type: className, regex: '^Psr\\Clock\\' } - - { type: className, regex: '^Brick\\Math\\' } - - { type: className, regex: '^AESKW\\' } - - { type: className, regex: '^ZxcvbnPhp\\' } + - { type: classLike, value: '^Symfony\\' } + - { type: classLike, value: '^SpomkyLabs\\Pki\\' } + - { type: classLike, value: '^ParagonIE\\Sodium\\' } + - { type: classLike, value: '^Psr\\EventDispatcher\\' } + - { type: classLike, value: '^Psr\\Clock\\' } + - { type: classLike, value: '^Brick\\Math\\' } + - { type: classLike, value: '^AESKW\\' } + - { type: classLike, value: '^ZxcvbnPhp\\' } + - { type: classLike, value: '^Psr\\' } ruleset: Library: - 'Vendors' diff --git a/src/Library/Checker/IsEqualChecker.php b/src/Library/Checker/IsEqualChecker.php index c39ee9db..73d601bc 100644 --- a/src/Library/Checker/IsEqualChecker.php +++ b/src/Library/Checker/IsEqualChecker.php @@ -14,7 +14,6 @@ { /** * @param string $key The claim or header parameter name to check. - * @param mixed $value The expected value. * @param bool $protectedHeaderOnly [optional] Whether the header parameter MUST be protected. * This option has no effect for claim checkers. */ diff --git a/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKSetLoaderTest.php b/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKSetLoaderTest.php index 235ba33f..2bb62576 100644 --- a/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKSetLoaderTest.php +++ b/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKSetLoaderTest.php @@ -9,6 +9,7 @@ use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\HttpClient\Response\MockResponse; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; /** @@ -33,7 +34,7 @@ public static function aJWKSetCanBeSharedInTheConfiguration(): void static::ensureKernelShutdown(); $client = static::createClient(); - $client->request('GET', '/keys/1.jwkset'); + $client->request(Request::METHOD_GET, '/keys/1.jwkset'); /** @var Response $response */ $response = $client->getResponse(); @@ -62,7 +63,7 @@ public static function aJWKSetCanBeSharedFromAnotherBundle(): void static::ensureKernelShutdown(); $client = static::createClient(); - $client->request('GET', '/keys/2.jwkset'); + $client->request(Request::METHOD_GET, '/keys/2.jwkset'); /** @var Response $response */ $response = $client->getResponse(); diff --git a/tests/Component/KeyManagement/JWKFactoryTest.php b/tests/Component/KeyManagement/JWKFactoryTest.php index 80cb6cf3..c46c8395 100644 --- a/tests/Component/KeyManagement/JWKFactoryTest.php +++ b/tests/Component/KeyManagement/JWKFactoryTest.php @@ -247,7 +247,7 @@ public static function dataKeys(): iterable { yield [ 'filename' => __DIR__ . '/Keys/ED/public-ed448.pem', - 'values' => [ + 'expectedValues' => [ 'kty' => 'OKP', 'crv' => 'Ed448', 'x' => 'wwHKDV7s4fBhmFSTzYorlaToGXNcsa7SakZdekT_sexD5ENj5lWP6_KX9_u--w_QSm80rNOodj0A', @@ -255,7 +255,7 @@ public static function dataKeys(): iterable ]; yield [ 'filename' => __DIR__ . '/Keys/ED/public-ed25519.pem', - 'values' => [ + 'expectedValues' => [ 'kty' => 'OKP', 'crv' => 'Ed25519', 'x' => 'wrI33AEj15KHHYplueUE5cnJKtbM8oVHFf6wGnw2oOE', @@ -263,7 +263,7 @@ public static function dataKeys(): iterable ]; yield [ 'filename' => __DIR__ . '/Keys/ED/public-X448.pem', - 'values' => [ + 'expectedValues' => [ 'kty' => 'OKP', 'crv' => 'X448', 'x' => 'UoPD73NQACC8A-otDUVun4IrMsk775ShMRf4ThDrq4xY2eAI-pOIVujrvBXXd9g8gUNwBT0fmnc', @@ -271,7 +271,7 @@ public static function dataKeys(): iterable ]; yield [ 'filename' => __DIR__ . '/Keys/ED/public-X25519.pem', - 'values' => [ + 'expectedValues' => [ 'kty' => 'OKP', 'crv' => 'X25519', 'x' => '3OJLiffmOCQGtil23QGyn0nk9EBKoZx6P-6o-EnsBB4', @@ -279,7 +279,7 @@ public static function dataKeys(): iterable ]; yield [ 'filename' => __DIR__ . '/Keys/ED/private-ed448.pem', - 'values' => [ + 'expectedValues' => [ 'kty' => 'OKP', 'crv' => 'Ed448', 'd' => '0GXSbNLOh7NQBlwoF8y2WJmjeP5Puif4_JL4ihFUzRLrb_3r4cH8l_HWJA-2ffY62LEB_ozsehG5', @@ -287,7 +287,7 @@ public static function dataKeys(): iterable ]; yield [ 'filename' => __DIR__ . '/Keys/ED/private-X448.pem', - 'values' => [ + 'expectedValues' => [ 'kty' => 'OKP', 'crv' => 'X448', 'd' => 'OHZK0Fp9MAAmk0yZekiAkB8qxpCVAF4dT2x_xmFNDdCTnyDvixaiZ0NSRpAdR59tA6OJmOFfbck', @@ -295,7 +295,7 @@ public static function dataKeys(): iterable ]; yield [ 'filename' => __DIR__ . '/Keys/ED/private-ed25519.pem', - 'values' => [ + 'expectedValues' => [ 'kty' => 'OKP', 'crv' => 'Ed25519', 'd' => 'Pr9AxZivB-zSq95wLrZfYa7DQ3TUPqZTkP_0w33r3rc', @@ -304,7 +304,7 @@ public static function dataKeys(): iterable ]; yield [ 'filename' => __DIR__ . '/Keys/ED/private-secp384r1-with-public.pem', - 'values' => [ + 'expectedValues' => [ 'kty' => 'EC', 'crv' => 'P-384', 'd' => '31taDOPQnlNl2aBC_EaGTqVGjGN_qg6iuLwP6cVTmhKMQ5PTL67wS6mmyKi8GdVP', @@ -314,7 +314,7 @@ public static function dataKeys(): iterable ]; yield [ 'filename' => __DIR__ . '/Keys/ED/private-X25519.pem', - 'values' => [ + 'expectedValues' => [ 'kty' => 'OKP', 'crv' => 'X25519', 'd' => 'mG-fgDwkr58hwIeqCQKZbR8HKeY4yg_AzvU6zyNaVUE',