diff --git a/.editorconfig b/.editorconfig index c0130606a..183c4953c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,6 +17,9 @@ block_comment_end = */ [{*.yml,*.yaml}] indent_size = 2 +[*.neon] +indent_style = tab + [*.md] trim_trailing_whitespace = false diff --git a/.github/workflows/integrate.yml b/.github/workflows/integrate.yml index 3e4db0e75..bbcc4a8a9 100644 --- a/.github/workflows/integrate.yml +++ b/.github/workflows/integrate.yml @@ -14,7 +14,7 @@ jobs: runs-on: "ubuntu-latest" steps: - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Check file permissions" run: | @@ -34,7 +34,7 @@ jobs: php-version: "8.1" - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install dependencies" uses: "ramsey/composer-install@v2" @@ -68,7 +68,7 @@ jobs: coverage: "xdebug" - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Install dependencies" uses: "ramsey/composer-install@v2" @@ -101,7 +101,7 @@ jobs: extensions: "json, mbstring, openssl, sqlite3, curl, uuid" - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Validate Composer configuration" run: "composer validate --strict" @@ -129,7 +129,7 @@ jobs: extensions: "json, mbstring, openssl, sqlite3, curl, uuid" - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Check adherence to EditorConfig" uses: "greut/eclint-action@v0" @@ -157,7 +157,7 @@ jobs: extensions: "json, mbstring, openssl, sqlite3, curl, uuid" - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Fetch Git base reference" run: "git fetch --depth=1 origin ${GITHUB_BASE_REF}" @@ -186,7 +186,7 @@ jobs: coverage: "xdebug" - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Fetch Git base reference" run: "git fetch --depth=1 origin ${GITHUB_BASE_REF}" @@ -208,7 +208,7 @@ jobs: runs-on: "ubuntu-20.04" steps: - name: "Checkout code" - uses: "actions/checkout@v3" + uses: "actions/checkout@v4" - name: "Check exported files" run: | diff --git a/composer.json b/composer.json index af300658f..912d8588e 100644 --- a/composer.json +++ b/composer.json @@ -99,7 +99,7 @@ "ext-mbstring": "*", "ext-openssl": "*", "ext-sodium": "*", - "brick/math": "^0.9|^0.10|^0.11", + "brick/math": "^0.9|^0.10|^0.11|^0.12", "paragonie/constant_time_encoding": "^2.4", "psr/clock": "^1.0", "psr/event-dispatcher": "^1.0", @@ -107,11 +107,11 @@ "psr/http-factory": "^1.0", "spomky-labs/aes-key-wrap": "^7.0", "spomky-labs/pki-framework": "^1.0", - "symfony/config": "^5.4|^6.0", - "symfony/console": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", "symfony/polyfill-mbstring": "^1.12" }, "require-dev": { @@ -121,7 +121,7 @@ "blackfire/php-sdk": "^2.0", "ekino/phpstan-banned-code": "^1.0", "infection/infection": "^0.27", - "matthiasnoback/symfony-config-test": "^4.3.0", + "matthiasnoback/symfony-config-test": "^5.0", "nyholm/psr7": "^1.5", "php-http/mock-client": "^1.5", "php-parallel-lint/php-parallel-lint": "^1.3", @@ -131,20 +131,19 @@ "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.1", "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^9.5.23", + "phpunit/phpunit": "^10.1", "qossmic/deptrac-shim": "^1.0", - "rector/rector": "^0.16", + "rector/rector": "^0.18", "roave/security-advisories": "dev-latest", - "symfony/browser-kit": "^6.1.3", - "symfony/finder": "^5.4|^6.0", - "symfony/framework-bundle": "^6.1.3", - "symfony/http-client": "^5.4|^6.0", - "symfony/phpunit-bridge": "^6.1.3", - "symfony/serializer": "^6.1.3", - "symfony/var-dumper": "^6.1.3", - "symfony/yaml": "^6.1.3", - "symplify/easy-coding-standard": "^11.0", - "symplify/monorepo-builder": "11.2.3.72" + "symfony/browser-kit": "^6.1|^7.0", + "symfony/finder": "^6.1|^7.0", + "symfony/framework-bundle": "^6.1|^7.0", + "symfony/http-client": "^6.1|^7.0", + "symfony/phpunit-bridge": "^6.1|^7.0", + "symfony/serializer": "^6.1|^7.0", + "symfony/var-dumper": "^6.1|^7.0", + "symfony/yaml": "^6.1|^7.0", + "symplify/easy-coding-standard": "^12.0" }, "replace": { "web-token/encryption-pack": "self.version", diff --git a/ecs.php b/ecs.php index 6c1bbc65f..5493a40b9 100644 --- a/ecs.php +++ b/ecs.php @@ -87,8 +87,9 @@ 'import_functions' => true, ]); - $config->services() - ->remove(PhpUnitTestClassRequiresCoversFixer::class); + $config->skip([ + PhpUnitTestClassRequiresCoversFixer::class + ]); $config->parallel(); $config->paths([ __DIR__ . '/performance', diff --git a/monorepo-builder.php b/monorepo-builder.php deleted file mode 100644 index 85de166f9..000000000 --- a/monorepo-builder.php +++ /dev/null @@ -1,31 +0,0 @@ -packageDirectories([ - __DIR__ . '/src', - __DIR__ . '/packs', - ]); - - $mbConfig->workers([ - UpdateReplaceReleaseWorker::class, - SetCurrentMutualDependenciesReleaseWorker::class, - AddTagToChangelogReleaseWorker::class, - TagVersionReleaseWorker::class, - PushTagReleaseWorker::class, - SetNextMutualDependenciesReleaseWorker::class, - UpdateBranchAliasReleaseWorker::class, - PushNextDevReleaseWorker::class, - ]); -}; diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index c70398a1b..8452437b2 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,1936 +1,2206 @@ parameters: - ignoreErrors: - - - message: "#^Parameter \\#1 \\$jwk of method Jose\\\\Component\\\\KeyManagement\\\\Analyzer\\\\KeyAnalyzerManager\\:\\:analyze\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DataCollector/KeyCollector.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\JoseFrameworkExtension\\:\\:getConfiguration\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/JoseFrameworkExtension.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\JoseFrameworkExtension\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/JoseFrameworkExtension.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/AbstractSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\AbstractSource\\:\\:create\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/AbstractSource.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 2 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\CheckerSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\CheckerSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\CheckerSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/ClaimChecker.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\ClaimChecker\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/ClaimChecker.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\ClaimChecker\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/ClaimChecker.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\ClaimChecker\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/ClaimChecker.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/HeaderChecker.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\HeaderChecker\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/HeaderChecker.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\HeaderChecker\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/HeaderChecker.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\HeaderChecker\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/HeaderChecker.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Console\\\\ConsoleSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Console/ConsoleSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Console\\\\ConsoleSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Console/ConsoleSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Console\\\\ConsoleSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Console/ConsoleSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Core\\\\CoreSource\\:\\:load\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Core/CoreSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Core\\\\CoreSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Core/CoreSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Core\\\\CoreSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Core/CoreSource.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/AbstractEncryptionSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\AbstractEncryptionSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/AbstractEncryptionSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\AbstractEncryptionSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/AbstractEncryptionSource.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\EncryptionSource\\:\\:getAlgorithmsFiles\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\EncryptionSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\EncryptionSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\EncryptionSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWEBuilder\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWEDecrypter\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWEDecrypter.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWELoader.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWELoader\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWELoader.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWELoader\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWELoader.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWELoader\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWELoader.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWESerializer.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWESerializer\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWESerializer.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWESerializer\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWESerializer.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWESerializer\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWESerializer.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JKUSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JKUSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JKUSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JKUSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JKUSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JKUSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JKUSource.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSetSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSetSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSetSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource/JKU.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource/JWKSet.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource/X5U.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/CertificateFile.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/JWK.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/JWKSet.php - - - - message: "#^Parameter \\#1 \\$id of class Symfony\\\\Component\\\\DependencyInjection\\\\Reference constructor expects string, mixed given\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/JWKSet.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/KeyFile.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/P12.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/Secret.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/Values.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/X5C.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKUriSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKUriSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKUriSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKUriSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKUriSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKUriSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKUriSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\KeyManagementSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/KeyManagementSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\KeyManagementSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/KeyManagementSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\KeyManagementSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/KeyManagementSource.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedToken\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedToken\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedToken\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenBuilder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenBuilder\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenBuilder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenBuilder\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenBuilder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenBuilder\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenBuilder.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenLoader.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenLoader\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenLoader.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenLoader\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenLoader.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenLoader\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenLoader.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/AbstractSignatureSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\AbstractSignatureSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/AbstractSignatureSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\AbstractSignatureSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/AbstractSignatureSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSBuilder\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSBuilder.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSLoader.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSLoader\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSLoader.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSLoader\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSLoader.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSLoader\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSLoader.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSSerializer.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSSerializer\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSSerializer.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSSerializer\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSSerializer.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSSerializer\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSSerializer.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSVerifier\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSVerifier.php - - - - message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\SignatureSource\\:\\:getAlgorithmsFiles\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\SignatureSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\SignatureSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\SignatureSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Source\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Source.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Source\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Source.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Source\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/DependencyInjection/Source/Source.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedFailureEvent\\:\\:__construct\\(\\) has parameter \\$claims with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/ClaimCheckedFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedFailureEvent\\:\\:__construct\\(\\) has parameter \\$mandatoryClaims with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/ClaimCheckedFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedFailureEvent\\:\\:getClaims\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/ClaimCheckedFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedFailureEvent\\:\\:getMandatoryClaims\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/ClaimCheckedFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:__construct\\(\\) has parameter \\$checkedClaims with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:__construct\\(\\) has parameter \\$claims with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:__construct\\(\\) has parameter \\$mandatoryClaims with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:getCheckedClaims\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:getClaims\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:getMandatoryClaims\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\HeaderCheckedFailureEvent\\:\\:__construct\\(\\) has parameter \\$mandatoryHeaderParameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/HeaderCheckedFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\HeaderCheckedFailureEvent\\:\\:getMandatoryHeaderParameters\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/HeaderCheckedFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\HeaderCheckedSuccessEvent\\:\\:__construct\\(\\) has parameter \\$mandatoryHeaderParameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/HeaderCheckedSuccessEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\HeaderCheckedSuccessEvent\\:\\:getMandatoryHeaderParameters\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/HeaderCheckedSuccessEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:__construct\\(\\) has parameter \\$recipients with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:__construct\\(\\) has parameter \\$sharedHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:__construct\\(\\) has parameter \\$sharedProtectedHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:getRecipients\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:getSharedHeader\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:getSharedProtectedHeader\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWSBuiltFailureEvent\\:\\:__construct\\(\\) has parameter \\$signatures with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/JWSBuiltFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWSBuiltFailureEvent\\:\\:getSignatures\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Event/JWSBuiltFailureEvent.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addClaimChecker\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addHeaderChecker\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEBuilder\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEBuilder\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEBuilder\\(\\) has parameter \\$keyEncryptionAlgorithm with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEBuilder\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEDecrypter\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEDecrypter\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEDecrypter\\(\\) has parameter \\$keyEncryptionAlgorithm with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEDecrypter\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWELoader\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWESerializer\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWSBuilder\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWSLoader\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWSSerializer\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWSVerifier\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKey\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKey\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKeyUri\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKeyUri\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKeyset\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKeyset\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addNestedTokenBuilder\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addNestedTokenLoader\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:updateJoseConfiguration\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge expects array, mixed given\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php - - - - message: "#^Class Jose\\\\Bundle\\\\JoseFramework\\\\Routing\\\\JWKSetLoader has an uninitialized property \\$resolver\\. Give it default value or assign it in the constructor\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Routing/JWKSetLoader.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWEEncoder\\:\\:decode\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWEEncoder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWEEncoder\\:\\:encode\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWEEncoder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWEEncoder\\:\\:getRecipientIndex\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWEEncoder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWEEncoder\\:\\:supportsDecoding\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWEEncoder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWEEncoder\\:\\:supportsEncoding\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWEEncoder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWESerializer\\:\\:denormalize\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWESerializer.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWESerializer\\:\\:supportsDenormalization\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWESerializer.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSEncoder\\:\\:decode\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWSEncoder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSEncoder\\:\\:encode\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWSEncoder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSEncoder\\:\\:getSignatureIndex\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWSEncoder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSEncoder\\:\\:supportsDecoding\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWSEncoder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSEncoder\\:\\:supportsEncoding\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWSEncoder.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSSerializer\\:\\:denormalize\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWSSerializer.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSSerializer\\:\\:supportsDenormalization\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Serializer/JWSSerializer.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\ClaimCheckerManager\\:\\:check\\(\\) has parameter \\$claims with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/ClaimCheckerManager.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\ClaimCheckerManager\\:\\:check\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/ClaimCheckerManager.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWEDecrypterFactory\\:\\:create\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWEDecrypterFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWEDecrypterFactory\\:\\:create\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWEDecrypterFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWEDecrypterFactory\\:\\:create\\(\\) has parameter \\$keyEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWEDecrypterFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWELoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWELoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$headerCheckers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWELoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$keyEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWELoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$serializers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWELoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWSLoaderFactory\\:\\:create\\(\\) has parameter \\$algorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWSLoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWSLoaderFactory\\:\\:create\\(\\) has parameter \\$headerCheckers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWSLoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWSLoaderFactory\\:\\:create\\(\\) has parameter \\$serializers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWSLoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWSVerifierFactory\\:\\:create\\(\\) has parameter \\$algorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/JWSVerifierFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$jwe_serializers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$jws_serializers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$keyEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$signatureAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$jweHeaderCheckers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$jweSerializers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$jwsHeaderCheckers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$jwsSerializers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$keyEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php - - - - message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$signatureAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php - - - - message: "#^Invalid type object to throw\\.$#" - count: 3 - path: src/Component/Checker/AudienceChecker.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\ClaimCheckerManager\\:\\:check\\(\\) has parameter \\$claims with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/ClaimCheckerManager.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\ClaimCheckerManager\\:\\:check\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/ClaimCheckerManager.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\ClaimCheckerManager\\:\\:checkMandatoryClaims\\(\\) has parameter \\$claims with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/ClaimCheckerManager.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkCriticalHeader\\(\\) has parameter \\$checkedHeaderParameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/HeaderCheckerManager.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkCriticalHeader\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/HeaderCheckerManager.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkCriticalHeader\\(\\) has parameter \\$protected with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/HeaderCheckerManager.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkDuplicatedHeaderParameters\\(\\) has parameter \\$header1 with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/HeaderCheckerManager.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkDuplicatedHeaderParameters\\(\\) has parameter \\$header2 with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/HeaderCheckerManager.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkHeaders\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/HeaderCheckerManager.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkHeaders\\(\\) has parameter \\$protected with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/HeaderCheckerManager.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkMandatoryHeaderParameters\\(\\) has parameter \\$protected with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/HeaderCheckerManager.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkMandatoryHeaderParameters\\(\\) has parameter \\$unprotected with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/HeaderCheckerManager.php - - - - message: "#^Invalid type object to throw\\.$#" - count: 2 - path: src/Component/Checker/IssuerChecker.php - - - - message: "#^Method Jose\\\\Component\\\\Checker\\\\IssuerChecker\\:\\:__construct\\(\\) has parameter \\$issuers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Checker/IssuerChecker.php - - - - message: "#^Cannot cast mixed to int\\.$#" - count: 1 - path: src/Component/Console/EcKeysetGeneratorCommand.php - - - - message: "#^Method Jose\\\\Component\\\\Console\\\\GeneratorCommand\\:\\:getOptions\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Console/GeneratorCommand.php - - - - message: "#^Parameter \\#1 \\$jwk of method Jose\\\\Component\\\\KeyManagement\\\\Analyzer\\\\KeyAnalyzerManager\\:\\:analyze\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" - count: 1 - path: src/Component/Console/KeysetAnalyzerCommand.php - - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 1 - path: src/Component/Console/KeysetAnalyzerCommand.php - - - - message: "#^Cannot cast mixed to int\\.$#" - count: 1 - path: src/Component/Console/OctKeyGeneratorCommand.php - - - - message: "#^Cannot cast mixed to int\\.$#" - count: 2 - path: src/Component/Console/OctKeysetGeneratorCommand.php - - - - message: "#^Cannot cast mixed to int\\.$#" - count: 1 - path: src/Component/Console/OkpKeysetGeneratorCommand.php - - - - message: "#^Cannot cast mixed to int\\.$#" - count: 1 - path: src/Component/Console/RsaKeyGeneratorCommand.php - - - - message: "#^Cannot cast mixed to int\\.$#" - count: 2 - path: src/Component/Console/RsaKeysetGeneratorCommand.php - - - - message: "#^Property Jose\\\\Component\\\\Core\\\\AlgorithmManager\\:\\:\\$algorithms type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/AlgorithmManager.php - - - - message: "#^Call to function is_string\\(\\) with string will always evaluate to true\\.$#" - count: 1 - path: src/Component/Core/AlgorithmManagerFactory.php - - - - message: "#^Property Jose\\\\Component\\\\Core\\\\AlgorithmManagerFactory\\:\\:\\$algorithms type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/AlgorithmManagerFactory.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\JWK\\:\\:__construct\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/JWK.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\JWK\\:\\:all\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/JWK.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\JWK\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/JWK.php - - - - message: "#^Property Jose\\\\Component\\\\Core\\\\JWK\\:\\:\\$values type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/JWK.php - - - - message: "#^Class Jose\\\\Component\\\\Core\\\\JWKSet implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" - count: 1 - path: src/Component/Core/JWKSet.php - - - - message: "#^Instanceof between Jose\\\\Component\\\\Core\\\\JWK and Jose\\\\Component\\\\Core\\\\JWK will always evaluate to true\\.$#" - count: 1 - path: src/Component/Core/JWKSet.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:convertKeyOpsToKeyUse\\(\\) has parameter \\$key_ops with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/JWKSet.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:createFromKeyData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/JWKSet.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:doesKeySatisfyRestrictions\\(\\) has parameter \\$restrictions with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/JWKSet.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/JWKSet.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:sortKeys\\(\\) has parameter \\$a with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/JWKSet.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:sortKeys\\(\\) has parameter \\$b with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/JWKSet.php - - - - message: "#^Only numeric types are allowed in \\+, int\\|true given on the right side\\.$#" - count: 2 - path: src/Component/Core/JWKSet.php - - - - message: "#^Parameter \\#1 \\$values of class Jose\\\\Component\\\\Core\\\\JWK constructor expects array, mixed given\\.$#" - count: 1 - path: src/Component/Core/JWKSet.php - - - - message: "#^Property Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:\\$keys type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/JWKSet.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\Util\\\\ECKey\\:\\:createECKey\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/Util/ECKey.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\Util\\\\ECKey\\:\\:createECKeyUsingOpenSSL\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/Util/ECKey.php - - - - message: "#^Strict comparison using \\=\\=\\= between '30' and '81' will always evaluate to false\\.$#" - count: 1 - path: src/Component/Core/Util/ECSignature.php - - - - message: "#^Access to an uninitialized property Jose\\\\Component\\\\Core\\\\Util\\\\RSAKey\\:\\:\\$modulus\\.$#" - count: 1 - path: src/Component/Core/Util/RSAKey.php - - - - message: "#^Method Jose\\\\Component\\\\Core\\\\Util\\\\RSAKey\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/Util/RSAKey.php - - - - message: "#^Parameter \\#1 \\$number of static method Brick\\\\Math\\\\BigInteger\\:\\:fromBase\\(\\) expects string, mixed given\\.$#" - count: 1 - path: src/Component/Core/Util/RSAKey.php - - - - message: "#^Property Jose\\\\Component\\\\Core\\\\Util\\\\RSAKey\\:\\:\\$values type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Core/Util/RSAKey.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\Compression\\\\CompressionMethodManager\\:\\:__construct\\(\\) has parameter \\$methods with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/Compression/CompressionMethodManager.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWE\\:\\:__construct\\(\\) has parameter \\$recipients with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWE.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWE\\:\\:__construct\\(\\) has parameter \\$sharedHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWE.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWE\\:\\:__construct\\(\\) has parameter \\$sharedProtectedHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWE.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWE\\:\\:getSharedHeader\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWE.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWE\\:\\:getSharedProtectedHeader\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWE.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:addRecipient\\(\\) has parameter \\$recipientHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:checkAndSetContentEncryptionAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:checkDuplicatedHeaderParameters\\(\\) has parameter \\$header1 with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:checkDuplicatedHeaderParameters\\(\\) has parameter \\$header2 with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:determineCEK\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:encryptJWE\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getCompressionMethod\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getContentEncryptionAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKey\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKey\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyAgreementAndKeyWrappingAlgorithm\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyAgreementAndKeyWrappingAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyEncryptionAlgorithm\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyEncryptionAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyWrappingAlgorithm\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyWrappingAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getKeyEncryptionAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:processRecipient\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:processRecipient\\(\\) has parameter \\$recipient with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:withSharedHeader\\(\\) has parameter \\$sharedHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:withSharedProtectedHeader\\(\\) has parameter \\$sharedProtectedHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, \\(float\\|int\\) given\\.$#" - count: 2 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Property Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:\\$recipients type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Property Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:\\$sharedHeader type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Property Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:\\$sharedProtectedHeader type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEBuilder.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:checkCompleteHeader\\(\\) has parameter \\$completeHeaders with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEDecrypter.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:decompressIfNeeded\\(\\) has parameter \\$completeHeaders with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEDecrypter.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:decryptCEK\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEDecrypter.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:decryptPayload\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEDecrypter.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:getContentEncryptionAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEDecrypter.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:getKeyEncryptionAlgorithm\\(\\) has parameter \\$completeHeaders with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWEDecrypter.php - - - - message: "#^Parameter \\#1 \\$key of static method Jose\\\\Component\\\\Core\\\\Util\\\\KeyChecker\\:\\:checkKeyAlgorithm\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" - count: 2 - path: src/Component/Encryption/JWEDecrypter.php - - - - message: "#^Parameter \\#1 \\$key of static method Jose\\\\Component\\\\Core\\\\Util\\\\KeyChecker\\:\\:checkKeyUsage\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" - count: 1 - path: src/Component/Encryption/JWEDecrypter.php - - - - message: "#^Parameter \\#3 \\$recipientKey of method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:decryptCEK\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" - count: 1 - path: src/Component/Encryption/JWEDecrypter.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWELoaderFactory.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWELoaderFactory.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$headerCheckers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWELoaderFactory.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$keyEncryptionAlgorithms with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWELoaderFactory.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$serializers with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/JWELoaderFactory.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\Recipient\\:\\:__construct\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/Recipient.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\Recipient\\:\\:getHeader\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/Recipient.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONFlattenedSerializer\\:\\:checkData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/Serializer/JSONFlattenedSerializer.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONFlattenedSerializer\\:\\:processHeaders\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/Serializer/JSONFlattenedSerializer.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONFlattenedSerializer\\:\\:processHeaders\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/Serializer/JSONFlattenedSerializer.php - - - - message: "#^Parameter \\#1 \\$encodedString of static method ParagonIE\\\\ConstantTime\\\\Base64\\:\\:decode\\(\\) expects string, mixed given\\.$#" - count: 3 - path: src/Component/Encryption/Serializer/JSONFlattenedSerializer.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONGeneralSerializer\\:\\:checkData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processHeaders\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processHeaders\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processRecipient\\(\\) has parameter \\$recipient with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php - - - - message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processRecipient\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php - - - - message: "#^Parameter \\#1 \\$encodedString of static method ParagonIE\\\\ConstantTime\\\\Base64\\:\\:decode\\(\\) expects string, mixed given\\.$#" - count: 3 - path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\Analyzer\\\\Message\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/Analyzer/Message.php - - - - message: "#^Class Jose\\\\Component\\\\KeyManagement\\\\Analyzer\\\\MessageBag implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" - count: 1 - path: src/Component/KeyManagement/Analyzer/MessageBag.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\Analyzer\\\\MessageBag\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/Analyzer/MessageBag.php - - - - message: "#^Cannot call method get\\(\\) on mixed\\.$#" - count: 1 - path: src/Component/KeyManagement/Analyzer/MixedKeyTypes.php - - - - message: "#^Cannot call method get\\(\\) on mixed\\.$#" - count: 1 - path: src/Component/KeyManagement/Analyzer/MixedPublicAndPrivateKeys.php - - - - message: "#^Cannot call method has\\(\\) on mixed\\.$#" - count: 1 - path: src/Component/KeyManagement/Analyzer/MixedPublicAndPrivateKeys.php - - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 2 - path: src/Component/KeyManagement/Analyzer/UsageAnalyzer.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JKUFactory\\:\\:loadFromUrl\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/JKUFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromCertificate\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromCertificateFile\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromKey\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromKeyFile\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromPKCS12CertificateFile\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromSecret\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromValues\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromX509Resource\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromX5C\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromX5C\\(\\) has parameter \\$x5c with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Parameter \\#1 \\$key of static method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromKey\\(\\) expects string, mixed given\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, \\(float\\|int\\) given\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Parameter \\#3 \\$length of function mb_substr expects int\\|null, float\\|int\\ given\\.$#" - count: 1 - path: src/Component/KeyManagement/JWKFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:__construct\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/ECKey.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:getSupportedCurves\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/ECKey.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:loadJWK\\(\\) has parameter \\$jwk with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/ECKey.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:loadPEM\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/ECKey.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/ECKey.php - - - - message: "#^Property Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:\\$values type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/ECKey.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadFromKey\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadFromKeyFile\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadFromX5C\\(\\) has parameter \\$x5c with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadFromX5C\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromCertificate\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromCertificateFile\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromDER\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromPEM\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromX509Resource\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:tryToLoadECKey\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:tryToLoadOtherKeyTypes\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|null given\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/KeyConverter.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:__construct\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/RSAKey.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:createFromKeyDetails\\(\\) has parameter \\$details with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/RSAKey.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:loadJWK\\(\\) has parameter \\$jwk with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/RSAKey.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/RSAKey.php - - - - message: "#^Parameter \\#1 \\$details of static method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:createFromKeyDetails\\(\\) expects array, mixed given\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/RSAKey.php - - - - message: "#^Property Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:\\$values type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/KeyConverter/RSAKey.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\UrlKeySetFactory\\:\\:getContent\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/UrlKeySetFactory.php - - - - message: "#^Cannot cast mixed to string\\.$#" - count: 1 - path: src/Component/KeyManagement/X5UFactory.php - - - - message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\X5UFactory\\:\\:loadFromUrl\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" - count: 1 - path: src/Component/KeyManagement/X5UFactory.php - - - - message: "#^Parameter \\#1 \\$certificate of static method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromCertificate\\(\\) expects string, mixed given\\.$#" - count: 1 - path: src/Component/KeyManagement/X5UFactory.php - - - - message: "#^Call to function array_key_exists\\(\\) with 'key' and array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, header\\?\\: array\\\\} will always evaluate to true\\.$#" - count: 1 - path: src/Component/NestedToken/NestedTokenBuilder.php - - - - message: "#^Call to function array_key_exists\\(\\) with 'key' and array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, protected_header\\?\\: array\\, header\\?\\: array\\\\} will always evaluate to true\\.$#" - count: 1 - path: src/Component/NestedToken/NestedTokenBuilder.php - - - - message: "#^Call to function is_array\\(\\) with array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, header\\?\\: array\\\\} will always evaluate to true\\.$#" - count: 1 - path: src/Component/NestedToken/NestedTokenBuilder.php - - - - message: "#^Call to function is_array\\(\\) with array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, protected_header\\?\\: array\\, header\\?\\: array\\\\} will always evaluate to true\\.$#" - count: 1 - path: src/Component/NestedToken/NestedTokenBuilder.php - - - - message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWSBuilder\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" - count: 1 - path: src/Component/NestedToken/NestedTokenBuilder.php - - - - message: "#^Parameter \\#3 \\$header of method Jose\\\\Component\\\\Signature\\\\JWSBuilder\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" - count: 1 - path: src/Component/NestedToken/NestedTokenBuilder.php - - - - message: "#^Result of \\|\\| is always false\\.$#" - count: 2 - path: src/Component/NestedToken/NestedTokenBuilder.php - - - - message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" - count: 1 - path: src/Component/Signature/JWS.php - - - - message: "#^Parameter \\#4 \\$header of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" - count: 1 - path: src/Component/Signature/JWS.php - - - - message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" - count: 1 - path: src/Component/Signature/JWSBuilder.php - - - - message: "#^Parameter \\#4 \\$header of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" - count: 1 - path: src/Component/Signature/JWSBuilder.php - - - - message: "#^Parameter \\#1 \\$algorithm of method Jose\\\\Component\\\\Core\\\\AlgorithmManager\\:\\:get\\(\\) expects string, mixed given\\.$#" - count: 1 - path: src/Component/Signature/JWSVerifier.php - - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 1 - path: src/Component/Signature/JWSVerifier.php - - - - message: "#^Parameter \\#1 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\Serializer\\\\Serializer\\:\\:isPayloadEncoded\\(\\) expects array\\, array given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/CompactSerializer.php - - - - message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/CompactSerializer.php - - - - message: "#^Parameter \\#1 \\$encodedString of static method ParagonIE\\\\ConstantTime\\\\Base64\\:\\:decode\\(\\) expects string, mixed given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/JSONFlattenedSerializer.php - - - - message: "#^Parameter \\#1 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\Serializer\\\\Serializer\\:\\:isPayloadEncoded\\(\\) expects array\\, array given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/JSONFlattenedSerializer.php - - - - message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/JSONFlattenedSerializer.php - - - - message: "#^Parameter \\#4 \\$header of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/JSONFlattenedSerializer.php - - - - message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: src/Component/Signature/Serializer/JSONGeneralSerializer.php - - - - message: "#^Cannot access offset 'signature' on mixed\\.$#" - count: 2 - path: src/Component/Signature/Serializer/JSONGeneralSerializer.php - - - - message: "#^Parameter \\#1 \\$encodedString of static method ParagonIE\\\\ConstantTime\\\\Base64\\:\\:decode\\(\\) expects string, mixed given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/JSONGeneralSerializer.php - - - - message: "#^Parameter \\#1 \\$signature of method Jose\\\\Component\\\\Signature\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processHeaders\\(\\) expects array\\{protected\\?\\: string, header\\?\\: array\\\\}, mixed given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/JSONGeneralSerializer.php - - - - message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, mixed given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/JSONGeneralSerializer.php - - - - message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processIsPayloadEncoded\\(\\) expects array\\, mixed given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/JSONGeneralSerializer.php - - - - message: "#^Parameter \\#3 \\$encodedProtectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects string\\|null, mixed given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/JSONGeneralSerializer.php - - - - message: "#^Parameter \\#4 \\$header of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, mixed given\\.$#" - count: 1 - path: src/Component/Signature/Serializer/JSONGeneralSerializer.php - - - - message: "#^Binary operation \"\\^\" between string and 1 results in an error\\.$#" - count: 2 - path: src/Ecc/Curve.php - - - - message: "#^Parameter \\#3 \\$length of function mb_substr expects int\\|null, float\\|int\\<1, max\\> given\\.$#" - count: 1 - path: src/EncryptionAlgorithm/ContentEncryption/AESCBC/AESCBCHS.php - - - - message: "#^Parameter \\#3 \\$length of function mb_substr expects int\\|null, float\\|int\\ given\\.$#" - count: 1 - path: src/EncryptionAlgorithm/KeyEncryption/ECDHES/AbstractECDH.php - - - - message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, int given\\.$#" - count: 1 - path: src/EncryptionAlgorithm/KeyEncryption/PBES2/PBES2AESKW.php - - - - message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, int given\\.$#" - count: 2 - path: src/EncryptionAlgorithm/KeyEncryption/RSA/Util/RSACrypt.php - - - - message: "#^Variable static method call on Jose\\\\Component\\\\Core\\\\Util\\\\Hash\\.$#" - count: 2 - path: src/EncryptionAlgorithm/KeyEncryption/RSA/Util/RSACrypt.php - - - - message: "#^Strict comparison using \\=\\=\\= between non\\-empty\\-string and '' will always evaluate to false\\.$#" - count: 1 - path: src/SignatureAlgorithm/None/None.php - - - - message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, int given\\.$#" - count: 1 - path: src/SignatureAlgorithm/RSA/Util/RSA.php - - - - message: "#^Variable static method call on Jose\\\\Component\\\\Core\\\\Util\\\\Hash\\.$#" - count: 2 - path: src/SignatureAlgorithm/RSA/Util/RSA.php + ignoreErrors: + - + message: "#^Parameter \\#1 \\$jwk of method Jose\\\\Component\\\\KeyManagement\\\\Analyzer\\\\KeyAnalyzerManager\\:\\:analyze\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DataCollector/KeyCollector.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\JoseFrameworkExtension\\:\\:getConfiguration\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/JoseFrameworkExtension.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\JoseFrameworkExtension\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/JoseFrameworkExtension.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/AbstractSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\AbstractSource\\:\\:create\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/AbstractSource.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 2 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\CheckerSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\CheckerSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\CheckerSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/ClaimChecker.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\ClaimChecker\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/ClaimChecker.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\ClaimChecker\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/ClaimChecker.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\ClaimChecker\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/ClaimChecker.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/HeaderChecker.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\HeaderChecker\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/HeaderChecker.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\HeaderChecker\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/HeaderChecker.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Checker\\\\HeaderChecker\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Checker/HeaderChecker.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Console\\\\ConsoleSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Console/ConsoleSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Console\\\\ConsoleSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Console/ConsoleSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Console\\\\ConsoleSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Console/ConsoleSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Core\\\\CoreSource\\:\\:load\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Core/CoreSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Core\\\\CoreSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Core/CoreSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Core\\\\CoreSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Core/CoreSource.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/AbstractEncryptionSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\AbstractEncryptionSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/AbstractEncryptionSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\AbstractEncryptionSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/AbstractEncryptionSource.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\EncryptionSource\\:\\:getAlgorithmsFiles\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\EncryptionSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\EncryptionSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\EncryptionSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWEBuilder\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWEDecrypter\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWEDecrypter.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWELoader.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWELoader\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWELoader.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWELoader\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWELoader.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWELoader\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWELoader.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWESerializer.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWESerializer\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWESerializer.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWESerializer\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWESerializer.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Encryption\\\\JWESerializer\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/JWESerializer.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JKUSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JKUSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JKUSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JKUSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JKUSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JKUSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JKUSource.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSetSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSetSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSetSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource/JKU.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource/JWKSet.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource/X5U.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/CertificateFile.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/JWK.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/JWKSet.php + + - + message: "#^Parameter \\#1 \\$id of class Symfony\\\\Component\\\\DependencyInjection\\\\Reference constructor expects string, mixed given\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/JWKSet.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/KeyFile.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/P12.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/Secret.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/Values.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/X5C.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKUriSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKUriSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKUriSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKUriSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKUriSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\JWKUriSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKUriSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\KeyManagementSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/KeyManagementSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\KeyManagementSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/KeyManagementSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\KeyManagement\\\\KeyManagementSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/KeyManagementSource.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedToken\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedToken\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedToken\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenBuilder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenBuilder\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenBuilder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenBuilder\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenBuilder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenBuilder\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenBuilder.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenLoader.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenLoader\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenLoader.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenLoader\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenLoader.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\NestedToken\\\\NestedTokenLoader\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedTokenLoader.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/AbstractSignatureSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\AbstractSignatureSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/AbstractSignatureSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\AbstractSignatureSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/AbstractSignatureSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSBuilder\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSBuilder.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSLoader.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSLoader\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSLoader.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSLoader\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSLoader.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSLoader\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSLoader.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSSerializer.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSSerializer\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSSerializer.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSSerializer\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSSerializer.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSSerializer\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSSerializer.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\JWSVerifier\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/JWSVerifier.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\SignatureSource\\:\\:getAlgorithmsFiles\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\SignatureSource\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\SignatureSource\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Signature\\\\SignatureSource\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Source\\:\\:load\\(\\) has parameter \\$configs with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Source.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Source\\:\\:prepend\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Source.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\DependencyInjection\\\\Source\\\\Source\\:\\:prepend\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/DependencyInjection/Source/Source.php + + - + message: "#^Parameter \\#1 \\$json of static method Jose\\\\Component\\\\Core\\\\JWK\\:\\:createFromJson\\(\\) expects string, mixed given\\.$#" + count: 1 + path: src/Bundle/JoseFramework/EnvVarProcessor/KeyEnvVarProcessor.php + + - + message: "#^Parameter \\#1 \\$json of static method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:createFromJson\\(\\) expects string, mixed given\\.$#" + count: 1 + path: src/Bundle/JoseFramework/EnvVarProcessor/KeyEnvVarProcessor.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedFailureEvent\\:\\:__construct\\(\\) has parameter \\$claims with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/ClaimCheckedFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedFailureEvent\\:\\:__construct\\(\\) has parameter \\$mandatoryClaims with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/ClaimCheckedFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedFailureEvent\\:\\:getClaims\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/ClaimCheckedFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedFailureEvent\\:\\:getMandatoryClaims\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/ClaimCheckedFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:__construct\\(\\) has parameter \\$checkedClaims with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:__construct\\(\\) has parameter \\$claims with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:__construct\\(\\) has parameter \\$mandatoryClaims with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:getCheckedClaims\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:getClaims\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\ClaimCheckedSuccessEvent\\:\\:getMandatoryClaims\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/ClaimCheckedSuccessEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\HeaderCheckedFailureEvent\\:\\:__construct\\(\\) has parameter \\$mandatoryHeaderParameters with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/HeaderCheckedFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\HeaderCheckedFailureEvent\\:\\:getMandatoryHeaderParameters\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/HeaderCheckedFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\HeaderCheckedSuccessEvent\\:\\:__construct\\(\\) has parameter \\$mandatoryHeaderParameters with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/HeaderCheckedSuccessEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\HeaderCheckedSuccessEvent\\:\\:getMandatoryHeaderParameters\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/HeaderCheckedSuccessEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:__construct\\(\\) has parameter \\$recipients with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:__construct\\(\\) has parameter \\$sharedHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:__construct\\(\\) has parameter \\$sharedProtectedHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:getRecipients\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:getSharedHeader\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWEBuiltFailureEvent\\:\\:getSharedProtectedHeader\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/JWEBuiltFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWSBuiltFailureEvent\\:\\:__construct\\(\\) has parameter \\$signatures with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/JWSBuiltFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Event\\\\JWSBuiltFailureEvent\\:\\:getSignatures\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Event/JWSBuiltFailureEvent.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addClaimChecker\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addHeaderChecker\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEBuilder\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEBuilder\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEBuilder\\(\\) has parameter \\$keyEncryptionAlgorithm with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEBuilder\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEDecrypter\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEDecrypter\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEDecrypter\\(\\) has parameter \\$keyEncryptionAlgorithm with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWEDecrypter\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWELoader\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWESerializer\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWSBuilder\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWSLoader\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWSSerializer\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addJWSVerifier\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKey\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKey\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKeyUri\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKeyUri\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKeyset\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addKeyset\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addNestedTokenBuilder\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:addNestedTokenLoader\\(\\) has parameter \\$tags with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Helper\\\\ConfigurationHelper\\:\\:updateJoseConfiguration\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge expects array, mixed given\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Helper/ConfigurationHelper.php + + - + message: "#^Class Jose\\\\Bundle\\\\JoseFramework\\\\Routing\\\\JWKSetLoader has an uninitialized property \\$resolver\\. Give it default value or assign it in the constructor\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Routing/JWKSetLoader.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWEEncoder\\:\\:decode\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWEEncoder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWEEncoder\\:\\:encode\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWEEncoder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWEEncoder\\:\\:getRecipientIndex\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWEEncoder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWEEncoder\\:\\:supportsDecoding\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWEEncoder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWEEncoder\\:\\:supportsEncoding\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWEEncoder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWESerializer\\:\\:denormalize\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWESerializer.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWESerializer\\:\\:supportsDenormalization\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWESerializer.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSEncoder\\:\\:decode\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWSEncoder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSEncoder\\:\\:encode\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWSEncoder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSEncoder\\:\\:getSignatureIndex\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWSEncoder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSEncoder\\:\\:supportsDecoding\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWSEncoder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSEncoder\\:\\:supportsEncoding\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWSEncoder.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSSerializer\\:\\:denormalize\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWSSerializer.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Serializer\\\\JWSSerializer\\:\\:supportsDenormalization\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Serializer/JWSSerializer.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\ClaimCheckerManager\\:\\:check\\(\\) has parameter \\$claims with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/ClaimCheckerManager.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\ClaimCheckerManager\\:\\:check\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/ClaimCheckerManager.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWEDecrypterFactory\\:\\:create\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWEDecrypterFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWEDecrypterFactory\\:\\:create\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWEDecrypterFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWEDecrypterFactory\\:\\:create\\(\\) has parameter \\$keyEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWEDecrypterFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWELoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWELoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$headerCheckers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWELoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$keyEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWELoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$serializers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWELoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWSLoaderFactory\\:\\:create\\(\\) has parameter \\$algorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWSLoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWSLoaderFactory\\:\\:create\\(\\) has parameter \\$headerCheckers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWSLoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWSLoaderFactory\\:\\:create\\(\\) has parameter \\$serializers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWSLoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\JWSVerifierFactory\\:\\:create\\(\\) has parameter \\$algorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/JWSVerifierFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$jwe_serializers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$jws_serializers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$keyEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenBuilderFactory\\:\\:create\\(\\) has parameter \\$signatureAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenBuilderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$jweHeaderCheckers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$jweSerializers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$jwsHeaderCheckers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$jwsSerializers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$keyEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php + + - + message: "#^Method Jose\\\\Bundle\\\\JoseFramework\\\\Services\\\\NestedTokenLoaderFactory\\:\\:create\\(\\) has parameter \\$signatureAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Bundle/JoseFramework/Services/NestedTokenLoaderFactory.php + + - + message: "#^Invalid type object to throw\\.$#" + count: 3 + path: src/Component/Checker/AudienceChecker.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\ClaimCheckerManager\\:\\:check\\(\\) has parameter \\$claims with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/ClaimCheckerManager.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\ClaimCheckerManager\\:\\:check\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/ClaimCheckerManager.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\ClaimCheckerManager\\:\\:checkMandatoryClaims\\(\\) has parameter \\$claims with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/ClaimCheckerManager.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkCriticalHeader\\(\\) has parameter \\$checkedHeaderParameters with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/HeaderCheckerManager.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkCriticalHeader\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/HeaderCheckerManager.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkCriticalHeader\\(\\) has parameter \\$protected with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/HeaderCheckerManager.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkDuplicatedHeaderParameters\\(\\) has parameter \\$header1 with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/HeaderCheckerManager.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkDuplicatedHeaderParameters\\(\\) has parameter \\$header2 with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/HeaderCheckerManager.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkHeaders\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/HeaderCheckerManager.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkHeaders\\(\\) has parameter \\$protected with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/HeaderCheckerManager.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkMandatoryHeaderParameters\\(\\) has parameter \\$protected with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/HeaderCheckerManager.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\HeaderCheckerManager\\:\\:checkMandatoryHeaderParameters\\(\\) has parameter \\$unprotected with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/HeaderCheckerManager.php + + - + message: "#^Invalid type object to throw\\.$#" + count: 2 + path: src/Component/Checker/IssuerChecker.php + + - + message: "#^Method Jose\\\\Component\\\\Checker\\\\IssuerChecker\\:\\:__construct\\(\\) has parameter \\$issuers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Checker/IssuerChecker.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\AddKeyIntoKeysetCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/AddKeyIntoKeysetCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\AddKeyIntoKeysetCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/AddKeyIntoKeysetCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\EcKeyGeneratorCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/EcKeyGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\EcKeyGeneratorCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/EcKeyGeneratorCommand.php + + - + message: "#^Cannot cast mixed to int\\.$#" + count: 1 + path: src/Component/Console/EcKeysetGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\EcKeysetGeneratorCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/EcKeysetGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\EcKeysetGeneratorCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/EcKeysetGeneratorCommand.php + + - + message: "#^Method Jose\\\\Component\\\\Console\\\\GeneratorCommand\\:\\:getOptions\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Console/GeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\GetThumbprintCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/GetThumbprintCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\GetThumbprintCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/GetThumbprintCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\JKULoaderCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/JKULoaderCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\JKULoaderCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/JKULoaderCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\KeyAnalyzerCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/KeyAnalyzerCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\KeyAnalyzerCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/KeyAnalyzerCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\KeyFileLoaderCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/KeyFileLoaderCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\KeyFileLoaderCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/KeyFileLoaderCommand.php + + - + message: "#^Parameter \\#1 \\$jwk of method Jose\\\\Component\\\\KeyManagement\\\\Analyzer\\\\KeyAnalyzerManager\\:\\:analyze\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" + count: 1 + path: src/Component/Console/KeysetAnalyzerCommand.php + + - + message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 1 + path: src/Component/Console/KeysetAnalyzerCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\KeysetAnalyzerCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/KeysetAnalyzerCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\KeysetAnalyzerCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/KeysetAnalyzerCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\MergeKeysetCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/MergeKeysetCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\MergeKeysetCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/MergeKeysetCommand.php + + - + message: "#^Attribute class Jose\\\\Component\\\\Console\\\\AsCommand does not exist\\.$#" + count: 1 + path: src/Component/Console/NoneKeyGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\NoneKeyGeneratorCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/NoneKeyGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\NoneKeyGeneratorCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/NoneKeyGeneratorCommand.php + + - + message: "#^Cannot cast mixed to int\\.$#" + count: 1 + path: src/Component/Console/OctKeyGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\OctKeyGeneratorCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/OctKeyGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\OctKeyGeneratorCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/OctKeyGeneratorCommand.php + + - + message: "#^Cannot cast mixed to int\\.$#" + count: 2 + path: src/Component/Console/OctKeysetGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\OctKeysetGeneratorCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/OctKeysetGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\OctKeysetGeneratorCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/OctKeysetGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\OkpKeyGeneratorCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/OkpKeyGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\OkpKeyGeneratorCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/OkpKeyGeneratorCommand.php + + - + message: "#^Cannot cast mixed to int\\.$#" + count: 1 + path: src/Component/Console/OkpKeysetGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\OkpKeysetGeneratorCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/OkpKeysetGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\OkpKeysetGeneratorCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/OkpKeysetGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\OptimizeRsaKeyCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/OptimizeRsaKeyCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\OptimizeRsaKeyCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/OptimizeRsaKeyCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\P12CertificateLoaderCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/P12CertificateLoaderCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\P12CertificateLoaderCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/P12CertificateLoaderCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\PemConverterCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/PemConverterCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\PemConverterCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/PemConverterCommand.php + + - + message: "#^Attribute class Jose\\\\Component\\\\Console\\\\AsCommand does not exist\\.$#" + count: 1 + path: src/Component/Console/PublicKeyCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\PublicKeyCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/PublicKeyCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\PublicKeyCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/PublicKeyCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\PublicKeysetCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/PublicKeysetCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\PublicKeysetCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/PublicKeysetCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\RotateKeysetCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/RotateKeysetCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\RotateKeysetCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/RotateKeysetCommand.php + + - + message: "#^Cannot cast mixed to int\\.$#" + count: 1 + path: src/Component/Console/RsaKeyGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\RsaKeyGeneratorCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/RsaKeyGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\RsaKeyGeneratorCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/RsaKeyGeneratorCommand.php + + - + message: "#^Cannot cast mixed to int\\.$#" + count: 2 + path: src/Component/Console/RsaKeysetGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\RsaKeysetGeneratorCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/RsaKeysetGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\RsaKeysetGeneratorCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/RsaKeysetGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\SecretKeyGeneratorCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/SecretKeyGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\SecretKeyGeneratorCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/SecretKeyGeneratorCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\X509CertificateLoaderCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/X509CertificateLoaderCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\X509CertificateLoaderCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/X509CertificateLoaderCommand.php + + - + message: "#^Attribute class Jose\\\\Component\\\\Console\\\\AsCommand does not exist\\.$#" + count: 1 + path: src/Component/Console/X5ULoaderCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\X5ULoaderCommand\\:\\:\\$defaultDescription has no type specified\\.$#" + count: 1 + path: src/Component/Console/X5ULoaderCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Console\\\\X5ULoaderCommand\\:\\:\\$defaultName has no type specified\\.$#" + count: 1 + path: src/Component/Console/X5ULoaderCommand.php + + - + message: "#^Property Jose\\\\Component\\\\Core\\\\AlgorithmManager\\:\\:\\$algorithms type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/AlgorithmManager.php + + - + message: "#^Call to function is_string\\(\\) with string will always evaluate to true\\.$#" + count: 1 + path: src/Component/Core/AlgorithmManagerFactory.php + + - + message: "#^Property Jose\\\\Component\\\\Core\\\\AlgorithmManagerFactory\\:\\:\\$algorithms type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/AlgorithmManagerFactory.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\JWK\\:\\:__construct\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/JWK.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\JWK\\:\\:all\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/JWK.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\JWK\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/JWK.php + + - + message: "#^Property Jose\\\\Component\\\\Core\\\\JWK\\:\\:\\$values type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/JWK.php + + - + message: "#^Class Jose\\\\Component\\\\Core\\\\JWKSet implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" + count: 1 + path: src/Component/Core/JWKSet.php + + - + message: "#^Instanceof between Jose\\\\Component\\\\Core\\\\JWK and Jose\\\\Component\\\\Core\\\\JWK will always evaluate to true\\.$#" + count: 1 + path: src/Component/Core/JWKSet.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:convertKeyOpsToKeyUse\\(\\) has parameter \\$key_ops with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/JWKSet.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:createFromKeyData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/JWKSet.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:doesKeySatisfyRestrictions\\(\\) has parameter \\$restrictions with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/JWKSet.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/JWKSet.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:sortKeys\\(\\) has parameter \\$a with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/JWKSet.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:sortKeys\\(\\) has parameter \\$b with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/JWKSet.php + + - + message: "#^Only numeric types are allowed in \\+, int\\|true given on the right side\\.$#" + count: 2 + path: src/Component/Core/JWKSet.php + + - + message: "#^Parameter \\#1 \\$values of class Jose\\\\Component\\\\Core\\\\JWK constructor expects array, mixed given\\.$#" + count: 1 + path: src/Component/Core/JWKSet.php + + - + message: "#^Property Jose\\\\Component\\\\Core\\\\JWKSet\\:\\:\\$keys type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/JWKSet.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\Util\\\\ECKey\\:\\:createECKey\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/Util/ECKey.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\Util\\\\ECKey\\:\\:createECKeyUsingOpenSSL\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/Util/ECKey.php + + - + message: "#^Strict comparison using \\=\\=\\= between '30' and '81' will always evaluate to false\\.$#" + count: 1 + path: src/Component/Core/Util/ECSignature.php + + - + message: "#^Method Jose\\\\Component\\\\Core\\\\Util\\\\RSAKey\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/Util/RSAKey.php + + - + message: "#^Parameter \\#1 \\$number of static method Brick\\\\Math\\\\BigInteger\\:\\:fromBase\\(\\) expects string, mixed given\\.$#" + count: 1 + path: src/Component/Core/Util/RSAKey.php + + - + message: "#^Property Jose\\\\Component\\\\Core\\\\Util\\\\RSAKey\\:\\:\\$values type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Core/Util/RSAKey.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\Compression\\\\CompressionMethodManager\\:\\:__construct\\(\\) has parameter \\$methods with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/Compression/CompressionMethodManager.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWE\\:\\:__construct\\(\\) has parameter \\$recipients with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWE.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWE\\:\\:__construct\\(\\) has parameter \\$sharedHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWE.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWE\\:\\:__construct\\(\\) has parameter \\$sharedProtectedHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWE.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWE\\:\\:getSharedHeader\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWE.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWE\\:\\:getSharedProtectedHeader\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWE.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:addRecipient\\(\\) has parameter \\$recipientHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:checkAndSetContentEncryptionAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:checkDuplicatedHeaderParameters\\(\\) has parameter \\$header1 with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:checkDuplicatedHeaderParameters\\(\\) has parameter \\$header2 with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:determineCEK\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:encryptJWE\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getCompressionMethod\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getContentEncryptionAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKey\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKey\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyAgreementAndKeyWrappingAlgorithm\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyAgreementAndKeyWrappingAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyEncryptionAlgorithm\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyEncryptionAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyWrappingAlgorithm\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getEncryptedKeyFromKeyWrappingAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:getKeyEncryptionAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:processRecipient\\(\\) has parameter \\$additionalHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:processRecipient\\(\\) has parameter \\$recipient with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:withSharedHeader\\(\\) has parameter \\$sharedHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:withSharedProtectedHeader\\(\\) has parameter \\$sharedProtectedHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, \\(float\\|int\\) given\\.$#" + count: 2 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Property Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:\\$recipients type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Property Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:\\$sharedHeader type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Property Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:\\$sharedProtectedHeader type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEBuilder.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:checkCompleteHeader\\(\\) has parameter \\$completeHeaders with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEDecrypter.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:decompressIfNeeded\\(\\) has parameter \\$completeHeaders with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEDecrypter.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:decryptCEK\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEDecrypter.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:decryptPayload\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEDecrypter.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:getContentEncryptionAlgorithm\\(\\) has parameter \\$completeHeader with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEDecrypter.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:getKeyEncryptionAlgorithm\\(\\) has parameter \\$completeHeaders with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWEDecrypter.php + + - + message: "#^Parameter \\#1 \\$key of static method Jose\\\\Component\\\\Core\\\\Util\\\\KeyChecker\\:\\:checkKeyAlgorithm\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" + count: 2 + path: src/Component/Encryption/JWEDecrypter.php + + - + message: "#^Parameter \\#1 \\$key of static method Jose\\\\Component\\\\Core\\\\Util\\\\KeyChecker\\:\\:checkKeyUsage\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" + count: 1 + path: src/Component/Encryption/JWEDecrypter.php + + - + message: "#^Parameter \\#3 \\$recipientKey of method Jose\\\\Component\\\\Encryption\\\\JWEDecrypter\\:\\:decryptCEK\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" + count: 1 + path: src/Component/Encryption/JWEDecrypter.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$compressionMethods with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWELoaderFactory.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$contentEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWELoaderFactory.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$headerCheckers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWELoaderFactory.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$keyEncryptionAlgorithms with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWELoaderFactory.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\JWELoaderFactory\\:\\:create\\(\\) has parameter \\$serializers with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/JWELoaderFactory.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\Recipient\\:\\:__construct\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/Recipient.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\Recipient\\:\\:getHeader\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/Recipient.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONFlattenedSerializer\\:\\:checkData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/Serializer/JSONFlattenedSerializer.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONFlattenedSerializer\\:\\:processHeaders\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/Serializer/JSONFlattenedSerializer.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONFlattenedSerializer\\:\\:processHeaders\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/Serializer/JSONFlattenedSerializer.php + + - + message: "#^Parameter \\#1 \\$encodedString of static method ParagonIE\\\\ConstantTime\\\\Base64\\:\\:decode\\(\\) expects string, mixed given\\.$#" + count: 3 + path: src/Component/Encryption/Serializer/JSONFlattenedSerializer.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONGeneralSerializer\\:\\:checkData\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processHeaders\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processHeaders\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processRecipient\\(\\) has parameter \\$recipient with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php + + - + message: "#^Method Jose\\\\Component\\\\Encryption\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processRecipient\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php + + - + message: "#^Parameter \\#1 \\$encodedString of static method ParagonIE\\\\ConstantTime\\\\Base64\\:\\:decode\\(\\) expects string, mixed given\\.$#" + count: 3 + path: src/Component/Encryption/Serializer/JSONGeneralSerializer.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\Analyzer\\\\Message\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/Analyzer/Message.php + + - + message: "#^Class Jose\\\\Component\\\\KeyManagement\\\\Analyzer\\\\MessageBag implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#" + count: 1 + path: src/Component/KeyManagement/Analyzer/MessageBag.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\Analyzer\\\\MessageBag\\:\\:jsonSerialize\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/Analyzer/MessageBag.php + + - + message: "#^Cannot call method get\\(\\) on mixed\\.$#" + count: 1 + path: src/Component/KeyManagement/Analyzer/MixedKeyTypes.php + + - + message: "#^Cannot call method get\\(\\) on mixed\\.$#" + count: 1 + path: src/Component/KeyManagement/Analyzer/MixedPublicAndPrivateKeys.php + + - + message: "#^Cannot call method has\\(\\) on mixed\\.$#" + count: 1 + path: src/Component/KeyManagement/Analyzer/MixedPublicAndPrivateKeys.php + + - + message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 2 + path: src/Component/KeyManagement/Analyzer/UsageAnalyzer.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JKUFactory\\:\\:loadFromUrl\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/JKUFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromCertificate\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromCertificateFile\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromKey\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromKeyFile\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromPKCS12CertificateFile\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromSecret\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromValues\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromX509Resource\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromX5C\\(\\) has parameter \\$additional_values with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromX5C\\(\\) has parameter \\$x5c with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Parameter \\#1 \\$key of static method Jose\\\\Component\\\\KeyManagement\\\\JWKFactory\\:\\:createFromKey\\(\\) expects string, mixed given\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, \\(float\\|int\\) given\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Parameter \\#3 \\$length of function mb_substr expects int\\|null, float\\|int\\ given\\.$#" + count: 1 + path: src/Component/KeyManagement/JWKFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:__construct\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/ECKey.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:getSupportedCurves\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/ECKey.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:loadJWK\\(\\) has parameter \\$jwk with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/ECKey.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:loadPEM\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/ECKey.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/ECKey.php + + - + message: "#^Property Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\ECKey\\:\\:\\$values type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/ECKey.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadFromKey\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadFromKeyFile\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadFromX5C\\(\\) has parameter \\$x5c with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadFromX5C\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromCertificate\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromCertificateFile\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromDER\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromPEM\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromX509Resource\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:tryToLoadECKey\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:tryToLoadOtherKeyTypes\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|null given\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/KeyConverter.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:__construct\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/RSAKey.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:createFromKeyDetails\\(\\) has parameter \\$details with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/RSAKey.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:loadJWK\\(\\) has parameter \\$jwk with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/RSAKey.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/RSAKey.php + + - + message: "#^Parameter \\#1 \\$details of static method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:createFromKeyDetails\\(\\) expects array, mixed given\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/RSAKey.php + + - + message: "#^Property Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\RSAKey\\:\\:\\$values type has no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/KeyConverter/RSAKey.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\UrlKeySetFactory\\:\\:getContent\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/UrlKeySetFactory.php + + - + message: "#^Cannot cast mixed to string\\.$#" + count: 1 + path: src/Component/KeyManagement/X5UFactory.php + + - + message: "#^Method Jose\\\\Component\\\\KeyManagement\\\\X5UFactory\\:\\:loadFromUrl\\(\\) has parameter \\$header with no value type specified in iterable type array\\.$#" + count: 1 + path: src/Component/KeyManagement/X5UFactory.php + + - + message: "#^Parameter \\#1 \\$certificate of static method Jose\\\\Component\\\\KeyManagement\\\\KeyConverter\\\\KeyConverter\\:\\:loadKeyFromCertificate\\(\\) expects string, mixed given\\.$#" + count: 1 + path: src/Component/KeyManagement/X5UFactory.php + + - + message: "#^Call to function array_key_exists\\(\\) with 'key' and array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, header\\?\\: array\\\\} will always evaluate to true\\.$#" + count: 1 + path: src/Component/NestedToken/NestedTokenBuilder.php + + - + message: "#^Call to function array_key_exists\\(\\) with 'key' and array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, protected_header\\?\\: array\\, header\\?\\: array\\\\} will always evaluate to true\\.$#" + count: 1 + path: src/Component/NestedToken/NestedTokenBuilder.php + + - + message: "#^Call to function is_array\\(\\) with array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, header\\?\\: array\\\\} will always evaluate to true\\.$#" + count: 1 + path: src/Component/NestedToken/NestedTokenBuilder.php + + - + message: "#^Call to function is_array\\(\\) with array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, protected_header\\?\\: array\\, header\\?\\: array\\\\} will always evaluate to true\\.$#" + count: 1 + path: src/Component/NestedToken/NestedTokenBuilder.php + + - + message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWSBuilder\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" + count: 1 + path: src/Component/NestedToken/NestedTokenBuilder.php + + - + message: "#^Parameter \\#3 \\$header of method Jose\\\\Component\\\\Signature\\\\JWSBuilder\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" + count: 1 + path: src/Component/NestedToken/NestedTokenBuilder.php + + - + message: "#^Result of \\|\\| is always false\\.$#" + count: 2 + path: src/Component/NestedToken/NestedTokenBuilder.php + + - + message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" + count: 1 + path: src/Component/Signature/JWS.php + + - + message: "#^Parameter \\#4 \\$header of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" + count: 1 + path: src/Component/Signature/JWS.php + + - + message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" + count: 1 + path: src/Component/Signature/JWSBuilder.php + + - + message: "#^Parameter \\#4 \\$header of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" + count: 1 + path: src/Component/Signature/JWSBuilder.php + + - + message: "#^Parameter \\#1 \\$algorithm of method Jose\\\\Component\\\\Core\\\\AlgorithmManager\\:\\:get\\(\\) expects string, mixed given\\.$#" + count: 1 + path: src/Component/Signature/JWSVerifier.php + + - + message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 1 + path: src/Component/Signature/JWSVerifier.php + + - + message: "#^Parameter \\#1 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\Serializer\\\\Serializer\\:\\:isPayloadEncoded\\(\\) expects array\\, array given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/CompactSerializer.php + + - + message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/CompactSerializer.php + + - + message: "#^Parameter \\#1 \\$encodedString of static method ParagonIE\\\\ConstantTime\\\\Base64\\:\\:decode\\(\\) expects string, mixed given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONFlattenedSerializer.php + + - + message: "#^Parameter \\#1 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\Serializer\\\\Serializer\\:\\:isPayloadEncoded\\(\\) expects array\\, array given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONFlattenedSerializer.php + + - + message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONFlattenedSerializer.php + + - + message: "#^Parameter \\#4 \\$header of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONFlattenedSerializer.php + + - + message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONGeneralSerializer.php + + - + message: "#^Cannot access offset 'signature' on mixed\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONGeneralSerializer.php + + - + message: "#^Parameter \\#1 \\$encodedString of static method ParagonIE\\\\ConstantTime\\\\Base64\\:\\:decode\\(\\) expects string, mixed given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONGeneralSerializer.php + + - + message: "#^Parameter \\#1 \\$signature of method Jose\\\\Component\\\\Signature\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processHeaders\\(\\) expects array\\{protected\\?\\: string, header\\?\\: array\\\\}, mixed given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONGeneralSerializer.php + + - + message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, mixed given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONGeneralSerializer.php + + - + message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\Serializer\\\\JSONGeneralSerializer\\:\\:processIsPayloadEncoded\\(\\) expects array\\, mixed given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONGeneralSerializer.php + + - + message: "#^Parameter \\#3 \\$encodedProtectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONGeneralSerializer.php + + - + message: "#^Parameter \\#4 \\$header of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, mixed given\\.$#" + count: 1 + path: src/Component/Signature/Serializer/JSONGeneralSerializer.php + + - + message: "#^Binary operation \"\\^\" between string and 1 results in an error\\.$#" + count: 2 + path: src/Ecc/Curve.php + + - + message: "#^Parameter \\#3 \\$length of function mb_substr expects int\\|null, float\\|int\\<1, max\\> given\\.$#" + count: 1 + path: src/EncryptionAlgorithm/ContentEncryption/AESCBC/AESCBCHS.php + + - + message: "#^Parameter \\#3 \\$length of function mb_substr expects int\\|null, float\\|int\\ given\\.$#" + count: 1 + path: src/EncryptionAlgorithm/KeyEncryption/ECDHES/AbstractECDH.php + + - + message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, int given\\.$#" + count: 1 + path: src/EncryptionAlgorithm/KeyEncryption/PBES2/PBES2AESKW.php + + - + message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, int given\\.$#" + count: 2 + path: src/EncryptionAlgorithm/KeyEncryption/RSA/Util/RSACrypt.php + + - + message: "#^Variable static method call on Jose\\\\Component\\\\Core\\\\Util\\\\Hash\\.$#" + count: 2 + path: src/EncryptionAlgorithm/KeyEncryption/RSA/Util/RSACrypt.php + + - + message: "#^Strict comparison using \\=\\=\\= between non\\-empty\\-string and '' will always evaluate to false\\.$#" + count: 1 + path: src/SignatureAlgorithm/None/None.php + + - + message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, int given\\.$#" + count: 1 + path: src/SignatureAlgorithm/RSA/Util/RSA.php + + - + message: "#^Variable static method call on Jose\\\\Component\\\\Core\\\\Util\\\\Hash\\.$#" + count: 2 + path: src/SignatureAlgorithm/RSA/Util/RSA.php diff --git a/phpstan.neon b/phpstan.neon index 510aa59fb..f197b0c66 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,12 +1,12 @@ parameters: - level: max - paths: - - src - checkMissingIterableValueType: true - checkGenericClassInNonGenericObjectType: true - treatPhpDocTypesAsCertain: true - checkUninitializedProperties: true - checkDynamicProperties: true + level: max + paths: + - src + checkMissingIterableValueType: true + checkGenericClassInNonGenericObjectType: true + treatPhpDocTypesAsCertain: true + checkUninitializedProperties: true + checkDynamicProperties: true includes: - - vendor/phpstan/phpstan/conf/bleedingEdge.neon - - phpstan-baseline.neon + - vendor/phpstan/phpstan/conf/bleedingEdge.neon + - phpstan-baseline.neon diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 16fed37a6..5e5d862e9 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,22 +2,16 @@ - - - ./src - - + ./tests/ @@ -33,7 +27,9 @@ - - - + + + ./src + + diff --git a/rector.php b/rector.php index dfa7dd602..5776ef782 100644 --- a/rector.php +++ b/rector.php @@ -2,45 +2,46 @@ declare(strict_types=1); use Rector\Php80\Rector\Class_\AnnotationToAttributeRector; -use Rector\PHPUnit\Rector\Class_\AnnotationWithValueToAttributeRector; +use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\AnnotationWithValueToAttributeRector; use Rector\Config\RectorConfig; + use Rector\Core\ValueObject\PhpVersion; +use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodParameterRector; use Rector\Doctrine\Set\DoctrineSetList; +use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; +use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector; use Rector\PHPUnit\Set\PHPUnitLevelSetList; use Rector\PHPUnit\Set\PHPUnitSetList; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; use Rector\Symfony\Set\SymfonyLevelSetList; use Rector\Symfony\Set\SymfonySetList; +use Rector\Symfony\Symfony42\Rector\New_\StringToArrayArgumentProcessRector; return static function (RectorConfig $config): void { $config->import(SetList::DEAD_CODE); $config->import(LevelSetList::UP_TO_PHP_81); $config->import(SymfonyLevelSetList::UP_TO_SYMFONY_54); - $config->import(SymfonySetList::SYMFONY_CODE_QUALITY); + $config->import(SymfonySetList::SYMFONY_50_TYPES); $config->import(SymfonySetList::SYMFONY_52_VALIDATOR_ATTRIBUTES); + $config->import(SymfonySetList::SYMFONY_CODE_QUALITY); $config->import(SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION); $config->import(SymfonySetList::ANNOTATIONS_TO_ATTRIBUTES); $config->import(DoctrineSetList::DOCTRINE_CODE_QUALITY); $config->import(DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES); - $config->import(PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD); - $config->import(PHPUnitLevelSetList::UP_TO_PHPUNIT_90); $config->import(PHPUnitSetList::PHPUNIT_CODE_QUALITY); - $config->import(PHPUnitSetList::PHPUNIT_EXCEPTION); - $config->import(PHPUnitSetList::PHPUNIT_YIELD_DATA_PROVIDER); - $config->import(PHPUnitSetList::REMOVE_MOCKS); + $config->import(PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES); + $config->import(PHPUnitLevelSetList::UP_TO_PHPUNIT_100); $config->paths([ __DIR__ . '/ecs.php', __DIR__ . '/rector.php', - __DIR__ . '/monorepo-builder.php', __DIR__ . '/performance', __DIR__ . '/src', __DIR__ . '/tests', ]); $config->skip([ - AnnotationToAttributeRector::class => __DIR__ . '/tests', - AnnotationWithValueToAttributeRector::class => __DIR__ . '/tests', + PreferPHPUnitThisCallRector::class => __DIR__ . '/tests', __DIR__ . '/src/Component/Core/JWKSet.php', __DIR__ . '/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php', __DIR__ . '/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php', diff --git a/src/Bundle/JoseFramework/DataCollector/AlgorithmCollector.php b/src/Bundle/JoseFramework/DataCollector/AlgorithmCollector.php index 54aeafe13..ebb47e3b7 100644 --- a/src/Bundle/JoseFramework/DataCollector/AlgorithmCollector.php +++ b/src/Bundle/JoseFramework/DataCollector/AlgorithmCollector.php @@ -4,7 +4,6 @@ namespace Jose\Bundle\JoseFramework\DataCollector; -use function array_key_exists; use Jose\Component\Core\Algorithm; use Jose\Component\Core\AlgorithmManagerFactory; use Jose\Component\Encryption\Algorithm\ContentEncryptionAlgorithm; @@ -14,6 +13,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Throwable; +use function array_key_exists; final class AlgorithmCollector implements Collector { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/AlgorithmCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/AlgorithmCompilerPass.php index 21f75fa49..23079b712 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/AlgorithmCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/AlgorithmCompilerPass.php @@ -12,9 +12,6 @@ final class AlgorithmCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(AlgorithmManagerFactory::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/CheckerCollectorCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/CheckerCollectorCompilerPass.php index d80f56969..f5b252d63 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/CheckerCollectorCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/CheckerCollectorCompilerPass.php @@ -12,9 +12,6 @@ final class CheckerCollectorCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(CheckerCollector::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/ClaimCheckerCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/ClaimCheckerCompilerPass.php index 9717e07ef..176c28af6 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/ClaimCheckerCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/ClaimCheckerCompilerPass.php @@ -12,9 +12,6 @@ final class ClaimCheckerCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(ClaimCheckerManagerFactory::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/CompressionMethodCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/CompressionMethodCompilerPass.php index a37987a9f..dfcbf369f 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/CompressionMethodCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/CompressionMethodCompilerPass.php @@ -12,9 +12,6 @@ final class CompressionMethodCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(CompressionMethodManagerFactory::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/DataCollectorCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/DataCollectorCompilerPass.php index aa34e3a67..a2660d70b 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/DataCollectorCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/DataCollectorCompilerPass.php @@ -11,9 +11,6 @@ final class DataCollectorCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(JoseCollector::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/EncryptionSerializerCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/EncryptionSerializerCompilerPass.php index 821f3b059..bed7d5f86 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/EncryptionSerializerCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/EncryptionSerializerCompilerPass.php @@ -11,9 +11,6 @@ final class EncryptionSerializerCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(JWESerializerManagerFactory::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/EventDispatcherAliasCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/EventDispatcherAliasCompilerPass.php index eb9d61a93..647c5ea33 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/EventDispatcherAliasCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/EventDispatcherAliasCompilerPass.php @@ -10,9 +10,6 @@ final class EventDispatcherAliasCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition('event_dispatcher') || $container->hasAlias(EventDispatcherInterface::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/HeaderCheckerCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/HeaderCheckerCompilerPass.php index d96884eee..8e67c341f 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/HeaderCheckerCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/HeaderCheckerCompilerPass.php @@ -13,9 +13,6 @@ final class HeaderCheckerCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(HeaderCheckerManagerFactory::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/JWECollectorCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/JWECollectorCompilerPass.php index 85d59e4df..6296489ba 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/JWECollectorCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/JWECollectorCompilerPass.php @@ -12,9 +12,6 @@ final class JWECollectorCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(JWECollector::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/JWSCollectorCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/JWSCollectorCompilerPass.php index b096cc1e4..8689c7094 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/JWSCollectorCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/JWSCollectorCompilerPass.php @@ -12,9 +12,6 @@ final class JWSCollectorCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(JWSCollector::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeyAnalyzerCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeyAnalyzerCompilerPass.php index ffd445748..a0228635e 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeyAnalyzerCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeyAnalyzerCompilerPass.php @@ -11,9 +11,6 @@ final class KeyAnalyzerCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(KeyAnalyzerManager::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeyCollectorCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeyCollectorCompilerPass.php index 393bc5472..95a4b33f8 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeyCollectorCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeyCollectorCompilerPass.php @@ -12,9 +12,6 @@ final class KeyCollectorCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(KeyCollector::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeySetControllerCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeySetControllerCompilerPass.php index c924a0354..3beaf4d99 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeySetControllerCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeySetControllerCompilerPass.php @@ -11,9 +11,6 @@ final class KeySetControllerCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(JWKSetLoader::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeysetAnalyzerCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeysetAnalyzerCompilerPass.php index 2ca43d6fa..41a096522 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeysetAnalyzerCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/KeysetAnalyzerCompilerPass.php @@ -11,9 +11,6 @@ final class KeysetAnalyzerCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(KeysetAnalyzerManager::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Compiler/SignatureSerializerCompilerPass.php b/src/Bundle/JoseFramework/DependencyInjection/Compiler/SignatureSerializerCompilerPass.php index 4f72ecdf7..255686f08 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Compiler/SignatureSerializerCompilerPass.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Compiler/SignatureSerializerCompilerPass.php @@ -11,9 +11,6 @@ final class SignatureSerializerCompilerPass implements CompilerPassInterface { - /** - * {@inheritdoc} - */ public function process(ContainerBuilder $container): void { if (! $container->hasDefinition(JWSSerializerManagerFactory::class)) { diff --git a/src/Bundle/JoseFramework/DependencyInjection/JoseFrameworkExtension.php b/src/Bundle/JoseFramework/DependencyInjection/JoseFrameworkExtension.php index 76ae713d9..d27456666 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/JoseFrameworkExtension.php +++ b/src/Bundle/JoseFramework/DependencyInjection/JoseFrameworkExtension.php @@ -4,12 +4,12 @@ namespace Jose\Bundle\JoseFramework\DependencyInjection; -use function count; use Jose\Bundle\JoseFramework\DependencyInjection\Source\Source; use Symfony\Component\Config\Definition\Processor; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use function count; final class JoseFrameworkExtension extends Extension implements PrependExtensionInterface { @@ -28,7 +28,6 @@ public function getAlias(): string } /** - * {@inheritdoc} * @param array $configs */ public function load(array $configs, ContainerBuilder $container): void @@ -41,17 +40,11 @@ public function load(array $configs, ContainerBuilder $container): void } } - /** - * {@inheritdoc} - */ public function getConfiguration(array $configs, ContainerBuilder $container): Configuration { return new Configuration($this->getAlias(), $this->sources); } - /** - * {@inheritdoc} - */ public function prepend(ContainerBuilder $container): void { $configs = $container->getExtensionConfig($this->getAlias()); diff --git a/src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php b/src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php index a2736007c..fe0eb0fe6 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Source/Checker/CheckerSource.php @@ -4,8 +4,6 @@ namespace Jose\Bundle\JoseFramework\DependencyInjection\Source\Checker; -use function array_key_exists; -use function count; use Jose\Bundle\JoseFramework\DependencyInjection\Compiler\ClaimCheckerCompilerPass; use Jose\Bundle\JoseFramework\DependencyInjection\Compiler\HeaderCheckerCompilerPass; use Jose\Bundle\JoseFramework\DependencyInjection\Source\Source; @@ -18,6 +16,8 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use function array_key_exists; +use function count; class CheckerSource implements SourceWithCompilerPasses { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php b/src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php index 0cf06b113..e5d541702 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Source/Encryption/EncryptionSource.php @@ -4,9 +4,6 @@ namespace Jose\Bundle\JoseFramework\DependencyInjection\Source\Encryption; -use function array_key_exists; -use function count; -use function in_array; use Jose\Bundle\JoseFramework\DependencyInjection\Compiler\CompressionMethodCompilerPass; use Jose\Bundle\JoseFramework\DependencyInjection\Compiler\EncryptionSerializerCompilerPass; use Jose\Bundle\JoseFramework\DependencyInjection\Source\Source; @@ -29,6 +26,9 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use function array_key_exists; +use function count; +use function in_array; class EncryptionSource implements SourceWithCompilerPasses { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php b/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php index 142acbb4c..1d74b5d4b 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSetSource.php @@ -4,8 +4,6 @@ namespace Jose\Bundle\JoseFramework\DependencyInjection\Source\KeyManagement; -use function array_key_exists; -use function count; use InvalidArgumentException; use Jose\Bundle\JoseFramework\DependencyInjection\Source\KeyManagement\JWKSetSource\JWKSetSource as JWKSetSourceInterface; use Jose\Bundle\JoseFramework\DependencyInjection\Source\Source; @@ -14,6 +12,8 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use function array_key_exists; +use function count; class JWKSetSource implements Source { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php b/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php index 94fb3191e..ba30b9ef4 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource.php @@ -4,8 +4,6 @@ namespace Jose\Bundle\JoseFramework\DependencyInjection\Source\KeyManagement; -use function array_key_exists; -use function count; use InvalidArgumentException; use Jose\Bundle\JoseFramework\DependencyInjection\Source\KeyManagement\JWKSource\JWKSource as JWKSourceInterface; use Jose\Bundle\JoseFramework\DependencyInjection\Source\Source; @@ -14,6 +12,8 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use function array_key_exists; +use function count; class JWKSource implements Source { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/JWKSet.php b/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/JWKSet.php index 97142000c..4d2a8843b 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/JWKSet.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/JWKSource/JWKSet.php @@ -4,8 +4,6 @@ namespace Jose\Bundle\JoseFramework\DependencyInjection\Source\KeyManagement\JWKSource; -use function is_int; -use function is_string; use Jose\Bundle\JoseFramework\DependencyInjection\Source\AbstractSource; use Jose\Component\Core\JWK; use Jose\Component\KeyManagement\JWKFactory; @@ -13,6 +11,8 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Reference; +use function is_int; +use function is_string; class JWKSet extends AbstractSource implements JWKSource { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/KeyManagementSource.php b/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/KeyManagementSource.php index 85f2403c9..27c1b04a6 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/KeyManagementSource.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Source/KeyManagement/KeyManagementSource.php @@ -4,7 +4,6 @@ namespace Jose\Bundle\JoseFramework\DependencyInjection\Source\KeyManagement; -use function count; use Jose\Bundle\JoseFramework\DependencyInjection\Compiler\KeyAnalyzerCompilerPass; use Jose\Bundle\JoseFramework\DependencyInjection\Compiler\KeysetAnalyzerCompilerPass; use Jose\Bundle\JoseFramework\DependencyInjection\Compiler\KeySetControllerCompilerPass; @@ -18,6 +17,7 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use function count; class KeyManagementSource implements SourceWithCompilerPasses { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php b/src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php index 832aeb80b..aca0f7bf5 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Source/NestedToken/NestedToken.php @@ -4,8 +4,6 @@ namespace Jose\Bundle\JoseFramework\DependencyInjection\Source\NestedToken; -use function array_key_exists; -use function count; use Jose\Bundle\JoseFramework\DependencyInjection\Source\Source; use Jose\Component\NestedToken\NestedTokenBuilder as JoseNestedTokenBuilder; use Jose\Component\NestedToken\NestedTokenLoader as JoseNestedTokenLoader; @@ -13,6 +11,8 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use function array_key_exists; +use function count; class NestedToken implements Source { diff --git a/src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php b/src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php index 2822b4ca5..c8162ba64 100644 --- a/src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php +++ b/src/Bundle/JoseFramework/DependencyInjection/Source/Signature/SignatureSource.php @@ -4,9 +4,6 @@ namespace Jose\Bundle\JoseFramework\DependencyInjection\Source\Signature; -use function array_key_exists; -use function count; -use function extension_loaded; use Jose\Bundle\JoseFramework\DependencyInjection\Compiler\SignatureSerializerCompilerPass; use Jose\Bundle\JoseFramework\DependencyInjection\Source\Source; use Jose\Bundle\JoseFramework\DependencyInjection\Source\SourceWithCompilerPasses; @@ -23,6 +20,9 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\PhpFileLoader; +use function array_key_exists; +use function count; +use function extension_loaded; class SignatureSource implements SourceWithCompilerPasses { diff --git a/src/Bundle/JoseFramework/EnvVarProcessor/KeyEnvVarProcessor.php b/src/Bundle/JoseFramework/EnvVarProcessor/KeyEnvVarProcessor.php index 475a805da..6cb50ff24 100644 --- a/src/Bundle/JoseFramework/EnvVarProcessor/KeyEnvVarProcessor.php +++ b/src/Bundle/JoseFramework/EnvVarProcessor/KeyEnvVarProcessor.php @@ -12,9 +12,6 @@ final class KeyEnvVarProcessor implements EnvVarProcessorInterface { - /** - * {@inheritdoc} - */ public function getEnv(string $prefix, string $name, Closure $getEnv): mixed { $env = $getEnv($name); diff --git a/src/Bundle/JoseFramework/Helper/ConfigurationHelper.php b/src/Bundle/JoseFramework/Helper/ConfigurationHelper.php index 9f2708615..61873e264 100644 --- a/src/Bundle/JoseFramework/Helper/ConfigurationHelper.php +++ b/src/Bundle/JoseFramework/Helper/ConfigurationHelper.php @@ -4,8 +4,8 @@ namespace Jose\Bundle\JoseFramework\Helper; -use function is_array; use Symfony\Component\DependencyInjection\ContainerBuilder; +use function is_array; class ConfigurationHelper { diff --git a/src/Bundle/JoseFramework/Routing/JWKSetLoader.php b/src/Bundle/JoseFramework/Routing/JWKSetLoader.php index ad2c9fffd..68ee2ea19 100644 --- a/src/Bundle/JoseFramework/Routing/JWKSetLoader.php +++ b/src/Bundle/JoseFramework/Routing/JWKSetLoader.php @@ -29,17 +29,11 @@ public function add(string $pattern, string $name): void $this->routes->add(sprintf('jwkset_%s', $name), $route); } - /** - * {@inheritdoc} - */ public function load(mixed $resource, string $type = null): RouteCollection { return $this->routes; } - /** - * {@inheritdoc} - */ public function supports(mixed $resource, string $type = null): bool { return $type === 'jwkset'; diff --git a/src/Bundle/JoseFramework/Serializer/JWEEncoder.php b/src/Bundle/JoseFramework/Serializer/JWEEncoder.php index e13f02fc2..642a757fa 100644 --- a/src/Bundle/JoseFramework/Serializer/JWEEncoder.php +++ b/src/Bundle/JoseFramework/Serializer/JWEEncoder.php @@ -5,18 +5,18 @@ namespace Jose\Bundle\JoseFramework\Serializer; use Exception; -use function in_array; -use function is_int; use Jose\Component\Encryption\JWE; use Jose\Component\Encryption\Serializer\JWESerializerManager; use Jose\Component\Encryption\Serializer\JWESerializerManagerFactory; use LogicException; -use function mb_strtolower; use Symfony\Component\Serializer\Encoder\DecoderInterface; use Symfony\Component\Serializer\Encoder\EncoderInterface; use Symfony\Component\Serializer\Encoder\NormalizationAwareInterface; use Symfony\Component\Serializer\Exception\NotEncodableValueException; use Throwable; +use function in_array; +use function is_int; +use function mb_strtolower; final class JWEEncoder implements EncoderInterface, DecoderInterface, NormalizationAwareInterface { diff --git a/src/Bundle/JoseFramework/Serializer/JWESerializer.php b/src/Bundle/JoseFramework/Serializer/JWESerializer.php index b6e249fa1..90fef42fb 100644 --- a/src/Bundle/JoseFramework/Serializer/JWESerializer.php +++ b/src/Bundle/JoseFramework/Serializer/JWESerializer.php @@ -4,13 +4,13 @@ namespace Jose\Bundle\JoseFramework\Serializer; -use function in_array; use Jose\Component\Encryption\JWE; use Jose\Component\Encryption\Serializer\JWESerializerManager; use Jose\Component\Encryption\Serializer\JWESerializerManagerFactory; use LogicException; -use function mb_strtolower; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use function in_array; +use function mb_strtolower; final class JWESerializer implements DenormalizerInterface { @@ -33,6 +33,17 @@ public function supportsDenormalization(mixed $data, string $type, string $forma && $this->formatSupported($format); } + public function getSupportedTypes(?string $format): array + { + if (! class_exists(JWESerializerManager::class) || ! $this->formatSupported($format)) { + return []; + } + + return [ + JWE::class => true, + ]; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): JWE { if ($data instanceof JWE === false) { diff --git a/src/Bundle/JoseFramework/Serializer/JWSEncoder.php b/src/Bundle/JoseFramework/Serializer/JWSEncoder.php index 1e10cd51b..5c3dfbbf1 100644 --- a/src/Bundle/JoseFramework/Serializer/JWSEncoder.php +++ b/src/Bundle/JoseFramework/Serializer/JWSEncoder.php @@ -5,17 +5,17 @@ namespace Jose\Bundle\JoseFramework\Serializer; use Exception; -use function in_array; -use function is_int; use Jose\Component\Signature\JWS; use Jose\Component\Signature\Serializer\JWSSerializerManager; use Jose\Component\Signature\Serializer\JWSSerializerManagerFactory; use LogicException; -use function mb_strtolower; use Symfony\Component\Serializer\Encoder\DecoderInterface; use Symfony\Component\Serializer\Encoder\EncoderInterface; use Symfony\Component\Serializer\Encoder\NormalizationAwareInterface; use Symfony\Component\Serializer\Exception\NotEncodableValueException; +use function in_array; +use function is_int; +use function mb_strtolower; final class JWSEncoder implements EncoderInterface, DecoderInterface, NormalizationAwareInterface { diff --git a/src/Bundle/JoseFramework/Serializer/JWSSerializer.php b/src/Bundle/JoseFramework/Serializer/JWSSerializer.php index aac2f6e63..9dc6af3b4 100644 --- a/src/Bundle/JoseFramework/Serializer/JWSSerializer.php +++ b/src/Bundle/JoseFramework/Serializer/JWSSerializer.php @@ -4,13 +4,13 @@ namespace Jose\Bundle\JoseFramework\Serializer; -use function in_array; use Jose\Component\Signature\JWS; use Jose\Component\Signature\Serializer\JWSSerializerManager; use Jose\Component\Signature\Serializer\JWSSerializerManagerFactory; use LogicException; -use function mb_strtolower; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use function in_array; +use function mb_strtolower; final class JWSSerializer implements DenormalizerInterface { @@ -33,6 +33,17 @@ public function supportsDenormalization(mixed $data, string $type, string $forma && $this->formatSupported($format); } + public function getSupportedTypes(?string $format): array + { + if (! class_exists(JWSSerializerManager::class) || ! $this->formatSupported($format)) { + return []; + } + + return [ + JWS::class => true, + ]; + } + public function denormalize(mixed $data, string $type, string $format = null, array $context = []): JWS { if ($data instanceof JWS === false) { diff --git a/src/Bundle/JoseFramework/composer.json b/src/Bundle/JoseFramework/composer.json index d430cb9b7..54077f1b5 100644 --- a/src/Bundle/JoseFramework/composer.json +++ b/src/Bundle/JoseFramework/composer.json @@ -40,10 +40,10 @@ "require": { "php": ">=8.1", "psr/event-dispatcher": "^1.0", - "symfony/config": "^5.4|^6.0", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", "web-token/jwt-core": "^3.2" }, "suggest": { diff --git a/src/Component/Checker/AlgorithmChecker.php b/src/Component/Checker/AlgorithmChecker.php index bed911947..c2d7d0319 100644 --- a/src/Component/Checker/AlgorithmChecker.php +++ b/src/Component/Checker/AlgorithmChecker.php @@ -24,9 +24,6 @@ public function __construct( ) { } - /** - * {@inheritdoc} - */ public function checkHeader(mixed $value): void { if (! is_string($value)) { diff --git a/src/Component/Checker/AudienceChecker.php b/src/Component/Checker/AudienceChecker.php index 2994869f5..995a94c9d 100644 --- a/src/Component/Checker/AudienceChecker.php +++ b/src/Component/Checker/AudienceChecker.php @@ -22,17 +22,11 @@ public function __construct( ) { } - /** - * {@inheritdoc} - */ public function checkClaim(mixed $value): void { $this->checkValue($value, InvalidClaimException::class); } - /** - * {@inheritdoc} - */ public function checkHeader(mixed $value): void { $this->checkValue($value, InvalidHeaderException::class); diff --git a/src/Component/Checker/ExpirationTimeChecker.php b/src/Component/Checker/ExpirationTimeChecker.php index 7d43bbed6..d4bdad3c7 100644 --- a/src/Component/Checker/ExpirationTimeChecker.php +++ b/src/Component/Checker/ExpirationTimeChecker.php @@ -4,9 +4,9 @@ namespace Jose\Component\Checker; +use Psr\Clock\ClockInterface; use function is_float; use function is_int; -use Psr\Clock\ClockInterface; /** * This class is a claim checker. When the "exp" is present, it will compare the value with the current timestamp. @@ -33,9 +33,6 @@ public function __construct( $this->clock = $clock; } - /** - * {@inheritdoc} - */ public function checkClaim(mixed $value): void { if (! is_float($value) && ! is_int($value)) { diff --git a/src/Component/Checker/HeaderCheckerManager.php b/src/Component/Checker/HeaderCheckerManager.php index 4f1c9bdb1..124bfe920 100644 --- a/src/Component/Checker/HeaderCheckerManager.php +++ b/src/Component/Checker/HeaderCheckerManager.php @@ -4,11 +4,11 @@ namespace Jose\Component\Checker; +use InvalidArgumentException; +use Jose\Component\Core\JWT; use function array_key_exists; use function count; -use InvalidArgumentException; use function is_array; -use Jose\Component\Core\JWT; class HeaderCheckerManager { diff --git a/src/Component/Checker/IssuedAtChecker.php b/src/Component/Checker/IssuedAtChecker.php index b71c7d0b4..2952a440b 100644 --- a/src/Component/Checker/IssuedAtChecker.php +++ b/src/Component/Checker/IssuedAtChecker.php @@ -4,9 +4,9 @@ namespace Jose\Component\Checker; +use Psr\Clock\ClockInterface; use function is_float; use function is_int; -use Psr\Clock\ClockInterface; /** * This class is a claim checker. When the "iat" is present, it will compare the value with the current timestamp. @@ -33,9 +33,6 @@ public function __construct( $this->clock = $clock; } - /** - * {@inheritdoc} - */ public function checkClaim(mixed $value): void { if (! is_float($value) && ! is_int($value)) { diff --git a/src/Component/Checker/NotBeforeChecker.php b/src/Component/Checker/NotBeforeChecker.php index 95599f4ac..9f14d0e13 100644 --- a/src/Component/Checker/NotBeforeChecker.php +++ b/src/Component/Checker/NotBeforeChecker.php @@ -4,9 +4,9 @@ namespace Jose\Component\Checker; +use Psr\Clock\ClockInterface; use function is_float; use function is_int; -use Psr\Clock\ClockInterface; /** * This class is a claim checker. When the "nbf" is present, it will compare the value with the current timestamp. @@ -33,9 +33,6 @@ public function __construct( $this->clock = $clock; } - /** - * {@inheritdoc} - */ public function checkClaim(mixed $value): void { if (! is_float($value) && ! is_int($value)) { diff --git a/src/Component/Checker/UnencodedPayloadChecker.php b/src/Component/Checker/UnencodedPayloadChecker.php index 0a94c37c3..91f79a224 100644 --- a/src/Component/Checker/UnencodedPayloadChecker.php +++ b/src/Component/Checker/UnencodedPayloadChecker.php @@ -15,9 +15,6 @@ final class UnencodedPayloadChecker implements HeaderChecker { private const HEADER_NAME = 'b64'; - /** - * {@inheritdoc} - */ public function checkHeader(mixed $value): void { if (! is_bool($value)) { diff --git a/src/Component/Console/AddKeyIntoKeysetCommand.php b/src/Component/Console/AddKeyIntoKeysetCommand.php index 2604b4bca..0748bc685 100644 --- a/src/Component/Console/AddKeyIntoKeysetCommand.php +++ b/src/Component/Console/AddKeyIntoKeysetCommand.php @@ -5,15 +5,17 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWK; use Jose\Component\Core\JWKSet; use Jose\Component\Core\Util\JsonConverter; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_array; +use function is_string; +#[AsCommand(name: 'keyset:add:key', description: 'Add a key into a key set.',)] final class AddKeyIntoKeysetCommand extends ObjectOutputCommand { protected static $defaultName = 'keyset:add:key'; diff --git a/src/Component/Console/EcKeyGeneratorCommand.php b/src/Component/Console/EcKeyGeneratorCommand.php index 71eab8306..42ff88a74 100644 --- a/src/Component/Console/EcKeyGeneratorCommand.php +++ b/src/Component/Console/EcKeyGeneratorCommand.php @@ -5,12 +5,14 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_string; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_string; +#[AsCommand(name: 'key:generate:ec', description: 'Generate an EC key (JWK format)',)] final class EcKeyGeneratorCommand extends GeneratorCommand { protected static $defaultName = 'key:generate:ec'; diff --git a/src/Component/Console/EcKeysetGeneratorCommand.php b/src/Component/Console/EcKeysetGeneratorCommand.php index 0bb058f70..5dfab7c32 100644 --- a/src/Component/Console/EcKeysetGeneratorCommand.php +++ b/src/Component/Console/EcKeysetGeneratorCommand.php @@ -5,13 +5,15 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\JWKSet; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_string; +#[AsCommand(name: 'keyset:generate:ec', description: 'Generate an EC key set (JWKSet format)',)] final class EcKeysetGeneratorCommand extends GeneratorCommand { protected static $defaultName = 'keyset:generate:ec'; diff --git a/src/Component/Console/GeneratorCommand.php b/src/Component/Console/GeneratorCommand.php index 83fd3a02b..8f4f58cb4 100644 --- a/src/Component/Console/GeneratorCommand.php +++ b/src/Component/Console/GeneratorCommand.php @@ -5,11 +5,11 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_bool; use Jose\Component\KeyManagement\JWKFactory; use ParagonIE\ConstantTime\Base64UrlSafe; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; +use function is_bool; abstract class GeneratorCommand extends ObjectOutputCommand { diff --git a/src/Component/Console/GetThumbprintCommand.php b/src/Component/Console/GetThumbprintCommand.php index a8d8eb648..31e0cdf53 100644 --- a/src/Component/Console/GetThumbprintCommand.php +++ b/src/Component/Console/GetThumbprintCommand.php @@ -5,15 +5,17 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\JsonConverter; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use function is_array; +use function is_string; +#[AsCommand(name: 'key:thumbprint', description: 'Get the thumbprint of a JWK key.',)] final class GetThumbprintCommand extends ObjectOutputCommand { protected static $defaultName = 'key:thumbprint'; diff --git a/src/Component/Console/JKULoaderCommand.php b/src/Component/Console/JKULoaderCommand.php index a2303db2e..94d2f2ef9 100644 --- a/src/Component/Console/JKULoaderCommand.php +++ b/src/Component/Console/JKULoaderCommand.php @@ -5,12 +5,14 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_string; use Jose\Component\KeyManagement\JKUFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_string; +#[AsCommand(name: 'keyset:load:jku', description: 'Loads a key set from an url.',)] final class JKULoaderCommand extends ObjectOutputCommand { protected static $defaultName = 'keyset:load:jku'; diff --git a/src/Component/Console/KeyAnalyzerCommand.php b/src/Component/Console/KeyAnalyzerCommand.php index 9c4bed0a9..368fdfa65 100644 --- a/src/Component/Console/KeyAnalyzerCommand.php +++ b/src/Component/Console/KeyAnalyzerCommand.php @@ -5,17 +5,19 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\JsonConverter; use Jose\Component\KeyManagement\Analyzer\KeyAnalyzerManager; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Formatter\OutputFormatterStyle; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_array; +use function is_string; +#[AsCommand(name: 'key:analyze', description: 'JWK quality analyzer.',)] final class KeyAnalyzerCommand extends Command { protected static $defaultName = 'key:analyze'; diff --git a/src/Component/Console/KeyFileLoaderCommand.php b/src/Component/Console/KeyFileLoaderCommand.php index 8c1a23bab..6ed746762 100644 --- a/src/Component/Console/KeyFileLoaderCommand.php +++ b/src/Component/Console/KeyFileLoaderCommand.php @@ -5,13 +5,15 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_string; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use function is_string; +#[AsCommand(name: 'key:load:key', description: 'Loads a key from a key file (JWK format)',)] final class KeyFileLoaderCommand extends GeneratorCommand { protected static $defaultName = 'key:load:key'; diff --git a/src/Component/Console/KeysetAnalyzerCommand.php b/src/Component/Console/KeysetAnalyzerCommand.php index d33e8ce46..826afa0c3 100644 --- a/src/Component/Console/KeysetAnalyzerCommand.php +++ b/src/Component/Console/KeysetAnalyzerCommand.php @@ -5,19 +5,21 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWKSet; use Jose\Component\Core\Util\JsonConverter; use Jose\Component\KeyManagement\Analyzer\KeyAnalyzerManager; use Jose\Component\KeyManagement\Analyzer\KeysetAnalyzerManager; use Jose\Component\KeyManagement\Analyzer\MessageBag; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Formatter\OutputFormatterStyle; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_array; +use function is_string; +#[AsCommand(name: 'keyset:analyze', description: 'JWKSet quality analyzer.',)] final class KeysetAnalyzerCommand extends Command { protected static $defaultName = 'keyset:analyze'; diff --git a/src/Component/Console/MergeKeysetCommand.php b/src/Component/Console/MergeKeysetCommand.php index 4e692703d..a558ba694 100644 --- a/src/Component/Console/MergeKeysetCommand.php +++ b/src/Component/Console/MergeKeysetCommand.php @@ -5,13 +5,15 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_array; use Jose\Component\Core\JWKSet; use Jose\Component\Core\Util\JsonConverter; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_array; +#[AsCommand(name: 'keyset:merge', description: 'Merge several key sets into one.',)] final class MergeKeysetCommand extends ObjectOutputCommand { protected static $defaultName = 'keyset:merge'; diff --git a/src/Component/Console/NoneKeyGeneratorCommand.php b/src/Component/Console/NoneKeyGeneratorCommand.php index 0b00c776f..86dd6cf91 100644 --- a/src/Component/Console/NoneKeyGeneratorCommand.php +++ b/src/Component/Console/NoneKeyGeneratorCommand.php @@ -8,6 +8,10 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand( + name: 'key:generate:none', + description: 'Generate a none key (JWK format). This key type is only supposed to be used with the "none" algorithm.', +)] final class NoneKeyGeneratorCommand extends GeneratorCommand { protected static $defaultName = 'key:generate:none'; diff --git a/src/Component/Console/OctKeyGeneratorCommand.php b/src/Component/Console/OctKeyGeneratorCommand.php index 499bb561b..2601ebf9b 100644 --- a/src/Component/Console/OctKeyGeneratorCommand.php +++ b/src/Component/Console/OctKeyGeneratorCommand.php @@ -6,10 +6,12 @@ use InvalidArgumentException; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand(name: 'key:generate:oct', description: 'Generate an octet key (JWK format)',)] final class OctKeyGeneratorCommand extends GeneratorCommand { protected static $defaultName = 'key:generate:oct'; diff --git a/src/Component/Console/OctKeysetGeneratorCommand.php b/src/Component/Console/OctKeysetGeneratorCommand.php index 61156528c..e7dd92fae 100644 --- a/src/Component/Console/OctKeysetGeneratorCommand.php +++ b/src/Component/Console/OctKeysetGeneratorCommand.php @@ -7,10 +7,12 @@ use InvalidArgumentException; use Jose\Component\Core\JWKSet; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand(name: 'keyset:generate:oct', description: 'Generate a key set with octet keys (JWK format)',)] final class OctKeysetGeneratorCommand extends GeneratorCommand { protected static $defaultName = 'keyset:generate:oct'; diff --git a/src/Component/Console/OkpKeyGeneratorCommand.php b/src/Component/Console/OkpKeyGeneratorCommand.php index 2dc947ba1..195efb7df 100644 --- a/src/Component/Console/OkpKeyGeneratorCommand.php +++ b/src/Component/Console/OkpKeyGeneratorCommand.php @@ -5,12 +5,14 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_string; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_string; +#[AsCommand(name: 'key:generate:okp', description: 'Generate an Octet Key Pair key (JWK format)',)] final class OkpKeyGeneratorCommand extends GeneratorCommand { protected static $defaultName = 'key:generate:okp'; diff --git a/src/Component/Console/OkpKeysetGeneratorCommand.php b/src/Component/Console/OkpKeysetGeneratorCommand.php index 4d78fe246..a98dfd382 100644 --- a/src/Component/Console/OkpKeysetGeneratorCommand.php +++ b/src/Component/Console/OkpKeysetGeneratorCommand.php @@ -5,13 +5,18 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\JWKSet; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_string; +#[AsCommand( + name: 'keyset:generate:okp', + description: 'Generate a key set with Octet Key Pairs keys (JWKSet format)', +)] final class OkpKeysetGeneratorCommand extends GeneratorCommand { protected static $defaultName = 'keyset:generate:okp'; diff --git a/src/Component/Console/OptimizeRsaKeyCommand.php b/src/Component/Console/OptimizeRsaKeyCommand.php index bd2a9da62..693bc41d2 100644 --- a/src/Component/Console/OptimizeRsaKeyCommand.php +++ b/src/Component/Console/OptimizeRsaKeyCommand.php @@ -5,15 +5,17 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\JsonConverter; use Jose\Component\KeyManagement\KeyConverter\RSAKey; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_array; +use function is_string; +#[AsCommand(name: 'key:optimize', description: 'Optimize a RSA key by calculating additional primes (CRT).',)] final class OptimizeRsaKeyCommand extends ObjectOutputCommand { protected static $defaultName = 'key:optimize'; diff --git a/src/Component/Console/P12CertificateLoaderCommand.php b/src/Component/Console/P12CertificateLoaderCommand.php index 065c3a4a5..92cfccddb 100644 --- a/src/Component/Console/P12CertificateLoaderCommand.php +++ b/src/Component/Console/P12CertificateLoaderCommand.php @@ -5,13 +5,15 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_string; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use function is_string; +#[AsCommand(name: 'key:load:p12', description: 'Load a key from a P12 certificate file.',)] final class P12CertificateLoaderCommand extends GeneratorCommand { protected static $defaultName = 'key:load:p12'; diff --git a/src/Component/Console/PemConverterCommand.php b/src/Component/Console/PemConverterCommand.php index f73b5071e..1fcb957bd 100644 --- a/src/Component/Console/PemConverterCommand.php +++ b/src/Component/Console/PemConverterCommand.php @@ -5,16 +5,18 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\ECKey; use Jose\Component\Core\Util\JsonConverter; use Jose\Component\Core\Util\RSAKey; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_array; +use function is_string; +#[AsCommand(name: 'key:convert:pkcs1', description: 'Converts a RSA or EC key into PKCS#1 key.',)] final class PemConverterCommand extends ObjectOutputCommand { protected static $defaultName = 'key:convert:pkcs1'; diff --git a/src/Component/Console/PublicKeyCommand.php b/src/Component/Console/PublicKeyCommand.php index 8d593ddc8..81bd93fb9 100644 --- a/src/Component/Console/PublicKeyCommand.php +++ b/src/Component/Console/PublicKeyCommand.php @@ -5,14 +5,18 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\JsonConverter; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_array; +use function is_string; +#[AsCommand( + name: 'key:convert:public', + description: 'Convert a private key into public key. Symmetric keys (shared keys) are not changed.', +)] final class PublicKeyCommand extends ObjectOutputCommand { protected static $defaultName = 'key:convert:public'; diff --git a/src/Component/Console/PublicKeysetCommand.php b/src/Component/Console/PublicKeysetCommand.php index 1b2a537ab..474ebb0ac 100644 --- a/src/Component/Console/PublicKeysetCommand.php +++ b/src/Component/Console/PublicKeysetCommand.php @@ -5,14 +5,19 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWKSet; use Jose\Component\Core\Util\JsonConverter; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_array; +use function is_string; +#[AsCommand( + name: 'keyset:convert:public', + description: 'Convert private keys in a key set into public keys. Symmetric keys (shared keys) are not changed.', +)] final class PublicKeysetCommand extends ObjectOutputCommand { protected static $defaultName = 'keyset:convert:public'; diff --git a/src/Component/Console/RotateKeysetCommand.php b/src/Component/Console/RotateKeysetCommand.php index d5e9c4f44..d2451f6a8 100644 --- a/src/Component/Console/RotateKeysetCommand.php +++ b/src/Component/Console/RotateKeysetCommand.php @@ -4,17 +4,19 @@ namespace Jose\Component\Console; -use function count; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWK; use Jose\Component\Core\JWKSet; use Jose\Component\Core\Util\JsonConverter; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function count; +use function is_array; +use function is_string; +#[AsCommand(name: 'keyset:rotate', description: 'Rotate a key set.',)] final class RotateKeysetCommand extends ObjectOutputCommand { protected static $defaultName = 'keyset:rotate'; diff --git a/src/Component/Console/RsaKeyGeneratorCommand.php b/src/Component/Console/RsaKeyGeneratorCommand.php index 2dcebdced..409158c47 100644 --- a/src/Component/Console/RsaKeyGeneratorCommand.php +++ b/src/Component/Console/RsaKeyGeneratorCommand.php @@ -6,10 +6,12 @@ use InvalidArgumentException; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand(name: 'key:generate:rsa', description: 'Generate a RSA key (JWK format)',)] final class RsaKeyGeneratorCommand extends GeneratorCommand { protected static $defaultName = 'key:generate:rsa'; diff --git a/src/Component/Console/RsaKeysetGeneratorCommand.php b/src/Component/Console/RsaKeysetGeneratorCommand.php index 612bfcb54..adf309e0e 100644 --- a/src/Component/Console/RsaKeysetGeneratorCommand.php +++ b/src/Component/Console/RsaKeysetGeneratorCommand.php @@ -7,10 +7,12 @@ use InvalidArgumentException; use Jose\Component\Core\JWKSet; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand(name: 'keyset:generate:rsa', description: 'Generate a key set with RSA keys (JWK format)',)] final class RsaKeysetGeneratorCommand extends GeneratorCommand { protected static $defaultName = 'keyset:generate:rsa'; diff --git a/src/Component/Console/SecretKeyGeneratorCommand.php b/src/Component/Console/SecretKeyGeneratorCommand.php index 3f50630eb..9db7a74a4 100644 --- a/src/Component/Console/SecretKeyGeneratorCommand.php +++ b/src/Component/Console/SecretKeyGeneratorCommand.php @@ -5,14 +5,19 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_bool; -use function is_string; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use function is_bool; +use function is_string; +#[AsCommand( + name: 'key:generate:from_secret', + description: 'Generate an octet key (JWK format) using an existing secret', +)] final class SecretKeyGeneratorCommand extends GeneratorCommand { protected static $defaultName = 'key:generate:from_secret'; diff --git a/src/Component/Console/X509CertificateLoaderCommand.php b/src/Component/Console/X509CertificateLoaderCommand.php index afeaad56e..d26e2d2ff 100644 --- a/src/Component/Console/X509CertificateLoaderCommand.php +++ b/src/Component/Console/X509CertificateLoaderCommand.php @@ -5,12 +5,14 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_string; use Jose\Component\KeyManagement\JWKFactory; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_string; +#[AsCommand(name: 'key:load:x509', description: 'Load a key from a X.509 certificate file.',)] final class X509CertificateLoaderCommand extends GeneratorCommand { protected static $defaultName = 'key:load:x509'; diff --git a/src/Component/Console/X5ULoaderCommand.php b/src/Component/Console/X5ULoaderCommand.php index 2c6897606..2592c5ba2 100644 --- a/src/Component/Console/X5ULoaderCommand.php +++ b/src/Component/Console/X5ULoaderCommand.php @@ -5,12 +5,13 @@ namespace Jose\Component\Console; use InvalidArgumentException; -use function is_string; use Jose\Component\KeyManagement\X5UFactory; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use function is_string; +#[AsCommand(name: 'keyset:load:x5u', description: 'Loads a key set from an url.',)] final class X5ULoaderCommand extends ObjectOutputCommand { protected static $defaultName = 'keyset:load:x5u'; diff --git a/src/Component/Console/composer.json b/src/Component/Console/composer.json index 07811090d..b85aba0d7 100644 --- a/src/Component/Console/composer.json +++ b/src/Component/Console/composer.json @@ -39,7 +39,7 @@ }, "require": { "php": ">=8.1", - "symfony/console": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0|^7.0", "web-token/jwt-key-mgmt": "^3.2" } } diff --git a/src/Component/Core/AlgorithmManager.php b/src/Component/Core/AlgorithmManager.php index 1b353e256..97bb9a7db 100644 --- a/src/Component/Core/AlgorithmManager.php +++ b/src/Component/Core/AlgorithmManager.php @@ -4,8 +4,8 @@ namespace Jose\Component\Core; -use function array_key_exists; use InvalidArgumentException; +use function array_key_exists; class AlgorithmManager { diff --git a/src/Component/Core/JWK.php b/src/Component/Core/JWK.php index 61b01ab0a..9685becf5 100644 --- a/src/Component/Core/JWK.php +++ b/src/Component/Core/JWK.php @@ -4,15 +4,15 @@ namespace Jose\Component\Core; +use InvalidArgumentException; +use JsonSerializable; +use ParagonIE\ConstantTime\Base64UrlSafe; use function array_key_exists; use function in_array; -use InvalidArgumentException; use function is_array; use const JSON_THROW_ON_ERROR; use const JSON_UNESCAPED_SLASHES; use const JSON_UNESCAPED_UNICODE; -use JsonSerializable; -use ParagonIE\ConstantTime\Base64UrlSafe; /** * @see \Jose\Tests\Component\Core\JWKTest diff --git a/src/Component/Core/JWKSet.php b/src/Component/Core/JWKSet.php index b9d3472c7..87e8ca022 100644 --- a/src/Component/Core/JWKSet.php +++ b/src/Component/Core/JWKSet.php @@ -4,18 +4,18 @@ namespace Jose\Component\Core; -use function array_key_exists; use ArrayIterator; -use function count; -use const COUNT_NORMAL; use Countable; -use function in_array; use InvalidArgumentException; -use function is_array; use IteratorAggregate; -use const JSON_THROW_ON_ERROR; use JsonSerializable; use Traversable; +use function array_key_exists; +use function count; +use function in_array; +use function is_array; +use const COUNT_NORMAL; +use const JSON_THROW_ON_ERROR; class JWKSet implements Countable, IteratorAggregate, JsonSerializable { diff --git a/src/Component/Core/Util/BigInteger.php b/src/Component/Core/Util/BigInteger.php index 43ce62ed4..5bbea7c2a 100644 --- a/src/Component/Core/Util/BigInteger.php +++ b/src/Component/Core/Util/BigInteger.php @@ -5,8 +5,8 @@ namespace Jose\Component\Core\Util; use Brick\Math\BigInteger as BrickBigInteger; -use function chr; use InvalidArgumentException; +use function chr; /** * @internal diff --git a/src/Component/Core/Util/ECKey.php b/src/Component/Core/Util/ECKey.php index 9b83d1dd4..38b8351dc 100644 --- a/src/Component/Core/Util/ECKey.php +++ b/src/Component/Core/Util/ECKey.php @@ -4,15 +4,15 @@ namespace Jose\Component\Core\Util; -use function extension_loaded; use InvalidArgumentException; +use Jose\Component\Core\JWK; +use ParagonIE\ConstantTime\Base64UrlSafe; +use RuntimeException; +use function extension_loaded; use function is_array; use function is_string; -use Jose\Component\Core\JWK; use const OPENSSL_KEYTYPE_EC; -use ParagonIE\ConstantTime\Base64UrlSafe; use const PHP_EOL; -use RuntimeException; use const STR_PAD_LEFT; /** diff --git a/src/Component/Core/Util/JsonConverter.php b/src/Component/Core/Util/JsonConverter.php index a401ebac3..aeecede66 100644 --- a/src/Component/Core/Util/JsonConverter.php +++ b/src/Component/Core/Util/JsonConverter.php @@ -4,11 +4,11 @@ namespace Jose\Component\Core\Util; +use RuntimeException; +use Throwable; use const JSON_THROW_ON_ERROR; use const JSON_UNESCAPED_SLASHES; use const JSON_UNESCAPED_UNICODE; -use RuntimeException; -use Throwable; final class JsonConverter { diff --git a/src/Component/Core/Util/KeyChecker.php b/src/Component/Core/Util/KeyChecker.php index 5bacd6a2c..8e902e650 100644 --- a/src/Component/Core/Util/KeyChecker.php +++ b/src/Component/Core/Util/KeyChecker.php @@ -4,11 +4,11 @@ namespace Jose\Component\Core\Util; -use function in_array; use InvalidArgumentException; +use Jose\Component\Core\JWK; +use function in_array; use function is_array; use function is_string; -use Jose\Component\Core\JWK; /** * @internal diff --git a/src/Component/Core/Util/RSAKey.php b/src/Component/Core/Util/RSAKey.php index 395c64811..cbbd8a80b 100644 --- a/src/Component/Core/Util/RSAKey.php +++ b/src/Component/Core/Util/RSAKey.php @@ -4,10 +4,7 @@ namespace Jose\Component\Core\Util; -use function array_key_exists; -use function count; use InvalidArgumentException; -use function is_array; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; @@ -19,6 +16,9 @@ use SpomkyLabs\Pki\CryptoTypes\AlgorithmIdentifier\Asymmetric\RSAEncryptionAlgorithmIdentifier; use SpomkyLabs\Pki\CryptoTypes\Asymmetric\RSA\RSAPrivateKey; use SpomkyLabs\Pki\CryptoTypes\Asymmetric\RSA\RSAPublicKey; +use function array_key_exists; +use function count; +use function is_array; /** * @internal diff --git a/src/Component/Core/composer.json b/src/Component/Core/composer.json index 7e5cfa509..a60a14432 100644 --- a/src/Component/Core/composer.json +++ b/src/Component/Core/composer.json @@ -41,7 +41,7 @@ "php": ">=8.1", "ext-json": "*", "ext-mbstring": "*", - "brick/math": "^0.9|^0.10|^0.11", + "brick/math": "^0.9|^0.10|^0.11|^0.12", "paragonie/constant_time_encoding": "^2.4", "spomky-labs/pki-framework": "^1.0" }, diff --git a/src/Component/Encryption/Compression/CompressionMethodManager.php b/src/Component/Encryption/Compression/CompressionMethodManager.php index a73b7589b..8a51e6a6b 100644 --- a/src/Component/Encryption/Compression/CompressionMethodManager.php +++ b/src/Component/Encryption/Compression/CompressionMethodManager.php @@ -4,8 +4,8 @@ namespace Jose\Component\Encryption\Compression; -use function array_key_exists; use InvalidArgumentException; +use function array_key_exists; class CompressionMethodManager { diff --git a/src/Component/Encryption/Compression/Deflate.php b/src/Component/Encryption/Compression/Deflate.php index 963c9b0fb..3f8796851 100644 --- a/src/Component/Encryption/Compression/Deflate.php +++ b/src/Component/Encryption/Compression/Deflate.php @@ -5,8 +5,8 @@ namespace Jose\Component\Encryption\Compression; use InvalidArgumentException; -use function is_string; use Throwable; +use function is_string; final class Deflate implements CompressionMethod { diff --git a/src/Component/Encryption/JWE.php b/src/Component/Encryption/JWE.php index ef1ced795..52a8665fd 100644 --- a/src/Component/Encryption/JWE.php +++ b/src/Component/Encryption/JWE.php @@ -4,10 +4,10 @@ namespace Jose\Component\Encryption; -use function array_key_exists; -use function count; use InvalidArgumentException; use Jose\Component\Core\JWT; +use function array_key_exists; +use function count; class JWE implements JWT { diff --git a/src/Component/Encryption/JWEBuilder.php b/src/Component/Encryption/JWEBuilder.php index 609cf94b2..efde68e76 100644 --- a/src/Component/Encryption/JWEBuilder.php +++ b/src/Component/Encryption/JWEBuilder.php @@ -4,10 +4,7 @@ namespace Jose\Component\Encryption; -use function array_key_exists; -use function count; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\AlgorithmManager; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\JsonConverter; @@ -24,6 +21,9 @@ use LogicException; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; +use function array_key_exists; +use function count; +use function is_string; class JWEBuilder { @@ -315,9 +315,6 @@ private function encryptJWE(string $cek, string $encodedSharedProtectedHeader): return [$ciphertext, $iv, $tag]; } - /** - * @return string - */ private function preparePayload(): ?string { $prepared = $this->payload; @@ -437,11 +434,11 @@ private function determineCEK(array &$additionalHeader): string } switch ($this->keyManagementMode) { - case KeyEncryption::MODE_ENCRYPT: - case KeyEncryption::MODE_WRAP: + case KeyEncryption::MODE_ENCRYPT : + case KeyEncryption::MODE_WRAP : return $this->createCEK($this->contentEncryptionAlgorithm->getCEKSize()); - case KeyEncryption::MODE_AGREEMENT: + case KeyEncryption::MODE_AGREEMENT : if (count($this->recipients) !== 1) { throw new LogicException( 'Unable to encrypt for multiple recipients using key agreement algorithms.' @@ -468,7 +465,7 @@ private function determineCEK(array &$additionalHeader): string $additionalHeader ); - case KeyEncryption::MODE_DIRECT: + case KeyEncryption::MODE_DIRECT : if (count($this->recipients) !== 1) { throw new LogicException( 'Unable to encrypt for multiple recipients using key agreement algorithms.' @@ -486,7 +483,7 @@ private function determineCEK(array &$additionalHeader): string return Base64UrlSafe::decode($k); - default: + default : throw new InvalidArgumentException(sprintf( 'Unsupported key management mode "%s".', $this->keyManagementMode diff --git a/src/Component/Encryption/JWEDecrypter.php b/src/Component/Encryption/JWEDecrypter.php index 8ba11c23d..5dd5e4b7f 100644 --- a/src/Component/Encryption/JWEDecrypter.php +++ b/src/Component/Encryption/JWEDecrypter.php @@ -4,9 +4,7 @@ namespace Jose\Component\Encryption; -use function array_key_exists; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\Algorithm; use Jose\Component\Core\AlgorithmManager; use Jose\Component\Core\JWK; @@ -21,6 +19,8 @@ use Jose\Component\Encryption\Algorithm\KeyEncryptionAlgorithm; use Jose\Component\Encryption\Compression\CompressionMethodManager; use Throwable; +use function array_key_exists; +use function is_string; class JWEDecrypter { diff --git a/src/Component/Encryption/Recipient.php b/src/Component/Encryption/Recipient.php index 6e06b7279..37502e130 100644 --- a/src/Component/Encryption/Recipient.php +++ b/src/Component/Encryption/Recipient.php @@ -4,8 +4,8 @@ namespace Jose\Component\Encryption; -use function array_key_exists; use InvalidArgumentException; +use function array_key_exists; /** * @internal diff --git a/src/Component/Encryption/Serializer/CompactSerializer.php b/src/Component/Encryption/Serializer/CompactSerializer.php index 9e1bf9833..6c7c13781 100644 --- a/src/Component/Encryption/Serializer/CompactSerializer.php +++ b/src/Component/Encryption/Serializer/CompactSerializer.php @@ -4,15 +4,15 @@ namespace Jose\Component\Encryption\Serializer; -use function count; use InvalidArgumentException; -use function is_array; use Jose\Component\Core\Util\JsonConverter; use Jose\Component\Encryption\JWE; use Jose\Component\Encryption\Recipient; use LogicException; use ParagonIE\ConstantTime\Base64UrlSafe; use Throwable; +use function count; +use function is_array; final class CompactSerializer implements JWESerializer { diff --git a/src/Component/Encryption/Serializer/JSONFlattenedSerializer.php b/src/Component/Encryption/Serializer/JSONFlattenedSerializer.php index 353692acb..565c3ccb4 100644 --- a/src/Component/Encryption/Serializer/JSONFlattenedSerializer.php +++ b/src/Component/Encryption/Serializer/JSONFlattenedSerializer.php @@ -4,14 +4,14 @@ namespace Jose\Component\Encryption\Serializer; -use function array_key_exists; -use function count; use InvalidArgumentException; -use function is_array; use Jose\Component\Core\Util\JsonConverter; use Jose\Component\Encryption\JWE; use Jose\Component\Encryption\Recipient; use ParagonIE\ConstantTime\Base64UrlSafe; +use function array_key_exists; +use function count; +use function is_array; final class JSONFlattenedSerializer implements JWESerializer { diff --git a/src/Component/Encryption/Serializer/JSONGeneralSerializer.php b/src/Component/Encryption/Serializer/JSONGeneralSerializer.php index 0449a72c2..9767e1df8 100644 --- a/src/Component/Encryption/Serializer/JSONGeneralSerializer.php +++ b/src/Component/Encryption/Serializer/JSONGeneralSerializer.php @@ -4,15 +4,15 @@ namespace Jose\Component\Encryption\Serializer; -use function array_key_exists; -use function count; use InvalidArgumentException; -use function is_array; use Jose\Component\Core\Util\JsonConverter; use Jose\Component\Encryption\JWE; use Jose\Component\Encryption\Recipient; use LogicException; use ParagonIE\ConstantTime\Base64UrlSafe; +use function array_key_exists; +use function count; +use function is_array; final class JSONGeneralSerializer implements JWESerializer { diff --git a/src/Component/KeyManagement/Analyzer/ESKeyAnalyzer.php b/src/Component/KeyManagement/Analyzer/ESKeyAnalyzer.php index 4044a093d..d73f45a47 100644 --- a/src/Component/KeyManagement/Analyzer/ESKeyAnalyzer.php +++ b/src/Component/KeyManagement/Analyzer/ESKeyAnalyzer.php @@ -5,12 +5,12 @@ namespace Jose\Component\KeyManagement\Analyzer; use Brick\Math\BigInteger; -use function is_string; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\Ecc\Curve; use Jose\Component\Core\Util\Ecc\NistCurve; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; +use function is_string; abstract class ESKeyAnalyzer implements KeyAnalyzer { diff --git a/src/Component/KeyManagement/Analyzer/HSKeyAnalyzer.php b/src/Component/KeyManagement/Analyzer/HSKeyAnalyzer.php index 1116fc15f..8de27ab5f 100644 --- a/src/Component/KeyManagement/Analyzer/HSKeyAnalyzer.php +++ b/src/Component/KeyManagement/Analyzer/HSKeyAnalyzer.php @@ -4,9 +4,9 @@ namespace Jose\Component\KeyManagement\Analyzer; -use function is_string; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; +use function is_string; abstract class HSKeyAnalyzer implements KeyAnalyzer { diff --git a/src/Component/KeyManagement/Analyzer/MessageBag.php b/src/Component/KeyManagement/Analyzer/MessageBag.php index 3a5b8c86f..453fcd285 100644 --- a/src/Component/KeyManagement/Analyzer/MessageBag.php +++ b/src/Component/KeyManagement/Analyzer/MessageBag.php @@ -5,11 +5,11 @@ namespace Jose\Component\KeyManagement\Analyzer; use ArrayIterator; -use function count; use Countable; use IteratorAggregate; use JsonSerializable; use Traversable; +use function count; class MessageBag implements JsonSerializable, IteratorAggregate, Countable { @@ -36,25 +36,16 @@ public function all(): array return $this->messages; } - /** - * {@inheritdoc} - */ public function jsonSerialize(): array { return array_values($this->messages); } - /** - * {@inheritdoc} - */ public function count(): int { return count($this->messages); } - /** - * {@inheritdoc} - */ public function getIterator(): Traversable { return new ArrayIterator($this->messages); diff --git a/src/Component/KeyManagement/Analyzer/OctAnalyzer.php b/src/Component/KeyManagement/Analyzer/OctAnalyzer.php index 9f866341e..e96adf2ac 100644 --- a/src/Component/KeyManagement/Analyzer/OctAnalyzer.php +++ b/src/Component/KeyManagement/Analyzer/OctAnalyzer.php @@ -4,9 +4,9 @@ namespace Jose\Component\KeyManagement\Analyzer; -use function is_string; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; +use function is_string; final class OctAnalyzer implements KeyAnalyzer { diff --git a/src/Component/KeyManagement/Analyzer/RsaAnalyzer.php b/src/Component/KeyManagement/Analyzer/RsaAnalyzer.php index 34c3a3969..ddbdc5679 100644 --- a/src/Component/KeyManagement/Analyzer/RsaAnalyzer.php +++ b/src/Component/KeyManagement/Analyzer/RsaAnalyzer.php @@ -5,10 +5,10 @@ namespace Jose\Component\KeyManagement\Analyzer; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; +use function is_array; +use function is_string; final class RsaAnalyzer implements KeyAnalyzer { diff --git a/src/Component/KeyManagement/Analyzer/UsageAnalyzer.php b/src/Component/KeyManagement/Analyzer/UsageAnalyzer.php index 323d93b0c..84678873d 100644 --- a/src/Component/KeyManagement/Analyzer/UsageAnalyzer.php +++ b/src/Component/KeyManagement/Analyzer/UsageAnalyzer.php @@ -4,8 +4,8 @@ namespace Jose\Component\KeyManagement\Analyzer; -use function in_array; use Jose\Component\Core\JWK; +use function in_array; final class UsageAnalyzer implements KeyAnalyzer { diff --git a/src/Component/KeyManagement/Analyzer/ZxcvbnKeyAnalyzer.php b/src/Component/KeyManagement/Analyzer/ZxcvbnKeyAnalyzer.php index fbdfa9b13..525e8e903 100644 --- a/src/Component/KeyManagement/Analyzer/ZxcvbnKeyAnalyzer.php +++ b/src/Component/KeyManagement/Analyzer/ZxcvbnKeyAnalyzer.php @@ -4,11 +4,11 @@ namespace Jose\Component\KeyManagement\Analyzer; -use function is_string; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; use Throwable; use ZxcvbnPhp\Zxcvbn; +use function is_string; final class ZxcvbnKeyAnalyzer implements KeyAnalyzer { diff --git a/src/Component/KeyManagement/JKUFactory.php b/src/Component/KeyManagement/JKUFactory.php index 28f7564e9..745232045 100644 --- a/src/Component/KeyManagement/JKUFactory.php +++ b/src/Component/KeyManagement/JKUFactory.php @@ -4,10 +4,10 @@ namespace Jose\Component\KeyManagement; -use function is_array; use Jose\Component\Core\JWKSet; use Jose\Component\Core\Util\JsonConverter; use RuntimeException; +use function is_array; class JKUFactory extends UrlKeySetFactory { diff --git a/src/Component/KeyManagement/JWKFactory.php b/src/Component/KeyManagement/JWKFactory.php index fe3108103..284ecdd76 100644 --- a/src/Component/KeyManagement/JWKFactory.php +++ b/src/Component/KeyManagement/JWKFactory.php @@ -4,22 +4,22 @@ namespace Jose\Component\KeyManagement; -use function array_key_exists; -use function extension_loaded; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWK; use Jose\Component\Core\JWKSet; use Jose\Component\Core\Util\ECKey; use Jose\Component\KeyManagement\KeyConverter\KeyConverter; use Jose\Component\KeyManagement\KeyConverter\RSAKey; -use const JSON_THROW_ON_ERROR; -use const OPENSSL_KEYTYPE_RSA; use OpenSSLCertificate; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; use Throwable; +use function array_key_exists; +use function extension_loaded; +use function is_array; +use function is_string; +use const JSON_THROW_ON_ERROR; +use const OPENSSL_KEYTYPE_RSA; /** * @see \Jose\Tests\Component\KeyManagement\JWKFactoryTest diff --git a/src/Component/KeyManagement/KeyConverter/ECKey.php b/src/Component/KeyManagement/KeyConverter/ECKey.php index cac0832c9..8ee1bfad4 100644 --- a/src/Component/KeyManagement/KeyConverter/ECKey.php +++ b/src/Component/KeyManagement/KeyConverter/ECKey.php @@ -4,14 +4,14 @@ namespace Jose\Component\KeyManagement\KeyConverter; -use function array_key_exists; use InvalidArgumentException; -use function is_string; use ParagonIE\ConstantTime\Base64UrlSafe; use SpomkyLabs\Pki\CryptoEncoding\PEM; use SpomkyLabs\Pki\CryptoTypes\Asymmetric\EC\ECPrivateKey; use SpomkyLabs\Pki\CryptoTypes\Asymmetric\EC\ECPublicKey; use Throwable; +use function array_key_exists; +use function is_string; /** * @internal diff --git a/src/Component/KeyManagement/KeyConverter/KeyConverter.php b/src/Component/KeyManagement/KeyConverter/KeyConverter.php index 2de389c3d..9acd843c1 100644 --- a/src/Component/KeyManagement/KeyConverter/KeyConverter.php +++ b/src/Component/KeyManagement/KeyConverter/KeyConverter.php @@ -4,25 +4,25 @@ namespace Jose\Component\KeyManagement\KeyConverter; +use InvalidArgumentException; +use OpenSSLCertificate; +use ParagonIE\ConstantTime\Base64UrlSafe; +use RuntimeException; +use SpomkyLabs\Pki\CryptoEncoding\PEM; +use SpomkyLabs\Pki\CryptoTypes\Asymmetric\PrivateKey; +use SpomkyLabs\Pki\CryptoTypes\Asymmetric\PublicKey; +use Throwable; use function array_key_exists; use function count; use function extension_loaded; use function in_array; -use InvalidArgumentException; use function is_array; use function is_string; use const OPENSSL_KEYTYPE_EC; use const OPENSSL_KEYTYPE_RSA; use const OPENSSL_RAW_DATA; -use OpenSSLCertificate; -use ParagonIE\ConstantTime\Base64UrlSafe; use const PHP_EOL; use const PREG_PATTERN_ORDER; -use RuntimeException; -use SpomkyLabs\Pki\CryptoEncoding\PEM; -use SpomkyLabs\Pki\CryptoTypes\Asymmetric\PrivateKey; -use SpomkyLabs\Pki\CryptoTypes\Asymmetric\PublicKey; -use Throwable; /** * @internal diff --git a/src/Component/KeyManagement/KeyConverter/RSAKey.php b/src/Component/KeyManagement/KeyConverter/RSAKey.php index 3f4fa462a..fc40809bd 100644 --- a/src/Component/KeyManagement/KeyConverter/RSAKey.php +++ b/src/Component/KeyManagement/KeyConverter/RSAKey.php @@ -4,15 +4,15 @@ namespace Jose\Component\KeyManagement\KeyConverter; -use function array_key_exists; -use function extension_loaded; -use function in_array; use InvalidArgumentException; -use function is_array; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\BigInteger; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; +use function array_key_exists; +use function extension_loaded; +use function in_array; +use function is_array; /** * @internal diff --git a/src/Component/KeyManagement/X5UFactory.php b/src/Component/KeyManagement/X5UFactory.php index 95437aa39..1eaf9bf52 100644 --- a/src/Component/KeyManagement/X5UFactory.php +++ b/src/Component/KeyManagement/X5UFactory.php @@ -4,14 +4,14 @@ namespace Jose\Component\KeyManagement; -use function is_array; -use function is_string; use Jose\Component\Core\JWK; use Jose\Component\Core\JWKSet; use Jose\Component\Core\Util\JsonConverter; use Jose\Component\KeyManagement\KeyConverter\KeyConverter; -use const PHP_EOL; use RuntimeException; +use function is_array; +use function is_string; +use const PHP_EOL; class X5UFactory extends UrlKeySetFactory { diff --git a/src/Component/NestedToken/NestedTokenBuilder.php b/src/Component/NestedToken/NestedTokenBuilder.php index c245497e6..a187d0407 100644 --- a/src/Component/NestedToken/NestedTokenBuilder.php +++ b/src/Component/NestedToken/NestedTokenBuilder.php @@ -4,14 +4,14 @@ namespace Jose\Component\NestedToken; -use function array_key_exists; use InvalidArgumentException; -use function is_array; use Jose\Component\Core\JWK; use Jose\Component\Encryption\JWEBuilder; use Jose\Component\Encryption\Serializer\JWESerializerManager; use Jose\Component\Signature\JWSBuilder; use Jose\Component\Signature\Serializer\JWSSerializerManager; +use function array_key_exists; +use function is_array; class NestedTokenBuilder { diff --git a/src/Component/NestedToken/NestedTokenLoader.php b/src/Component/NestedToken/NestedTokenLoader.php index b6764be83..fbb2c3d45 100644 --- a/src/Component/NestedToken/NestedTokenLoader.php +++ b/src/Component/NestedToken/NestedTokenLoader.php @@ -5,12 +5,12 @@ namespace Jose\Component\NestedToken; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\JWKSet; use Jose\Component\Encryption\JWE; use Jose\Component\Encryption\JWELoader; use Jose\Component\Signature\JWS; use Jose\Component\Signature\JWSLoader; +use function is_string; class NestedTokenLoader { diff --git a/src/Component/Signature/JWS.php b/src/Component/Signature/JWS.php index 7a6f131ff..0da0e127f 100644 --- a/src/Component/Signature/JWS.php +++ b/src/Component/Signature/JWS.php @@ -4,9 +4,9 @@ namespace Jose\Component\Signature; -use function count; use InvalidArgumentException; use Jose\Component\Core\JWT; +use function count; class JWS implements JWT { diff --git a/src/Component/Signature/JWSBuilder.php b/src/Component/Signature/JWSBuilder.php index 5c1c1d789..7adbdf385 100644 --- a/src/Component/Signature/JWSBuilder.php +++ b/src/Component/Signature/JWSBuilder.php @@ -4,11 +4,7 @@ namespace Jose\Component\Signature; -use function array_key_exists; -use function count; -use function in_array; use InvalidArgumentException; -use function is_array; use Jose\Component\Core\Algorithm; use Jose\Component\Core\AlgorithmManager; use Jose\Component\Core\JWK; @@ -19,6 +15,10 @@ use LogicException; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; +use function array_key_exists; +use function count; +use function in_array; +use function is_array; class JWSBuilder { diff --git a/src/Component/Signature/Serializer/CompactSerializer.php b/src/Component/Signature/Serializer/CompactSerializer.php index f91c3fa36..bc9ca752d 100644 --- a/src/Component/Signature/Serializer/CompactSerializer.php +++ b/src/Component/Signature/Serializer/CompactSerializer.php @@ -4,14 +4,14 @@ namespace Jose\Component\Signature\Serializer; -use function count; use InvalidArgumentException; -use function is_array; use Jose\Component\Core\Util\JsonConverter; use Jose\Component\Signature\JWS; use LogicException; use ParagonIE\ConstantTime\Base64UrlSafe; use Throwable; +use function count; +use function is_array; final class CompactSerializer extends Serializer { diff --git a/src/Component/Signature/Serializer/JSONFlattenedSerializer.php b/src/Component/Signature/Serializer/JSONFlattenedSerializer.php index dcdb96391..687583f8e 100644 --- a/src/Component/Signature/Serializer/JSONFlattenedSerializer.php +++ b/src/Component/Signature/Serializer/JSONFlattenedSerializer.php @@ -4,12 +4,12 @@ namespace Jose\Component\Signature\Serializer; -use function count; use InvalidArgumentException; -use function is_array; use Jose\Component\Core\Util\JsonConverter; use Jose\Component\Signature\JWS; use ParagonIE\ConstantTime\Base64UrlSafe; +use function count; +use function is_array; final class JSONFlattenedSerializer extends Serializer { diff --git a/src/Component/Signature/Serializer/JSONGeneralSerializer.php b/src/Component/Signature/Serializer/JSONGeneralSerializer.php index db4d25cd8..a7eb9016f 100644 --- a/src/Component/Signature/Serializer/JSONGeneralSerializer.php +++ b/src/Component/Signature/Serializer/JSONGeneralSerializer.php @@ -4,15 +4,15 @@ namespace Jose\Component\Signature\Serializer; -use function array_key_exists; -use function count; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\Util\JsonConverter; use Jose\Component\Signature\JWS; use LogicException; use ParagonIE\ConstantTime\Base64UrlSafe; +use function array_key_exists; +use function count; +use function is_array; +use function is_string; final class JSONGeneralSerializer extends Serializer { diff --git a/src/Component/Signature/Signature.php b/src/Component/Signature/Signature.php index bbe8548c4..a9975e33b 100644 --- a/src/Component/Signature/Signature.php +++ b/src/Component/Signature/Signature.php @@ -4,8 +4,8 @@ namespace Jose\Component\Signature; -use function array_key_exists; use InvalidArgumentException; +use function array_key_exists; class Signature { diff --git a/src/Ecc/Curve.php b/src/Ecc/Curve.php index 3e6b75cb3..59be935bf 100644 --- a/src/Ecc/Curve.php +++ b/src/Ecc/Curve.php @@ -6,8 +6,8 @@ use Brick\Math\BigInteger; use RuntimeException; -use const STR_PAD_LEFT; use Stringable; +use const STR_PAD_LEFT; /** * @internal diff --git a/src/Ecc/composer.json b/src/Ecc/composer.json index eca633810..d6e36e603 100644 --- a/src/Ecc/composer.json +++ b/src/Ecc/composer.json @@ -39,7 +39,7 @@ }, "require": { "php": ">=8.1", - "brick/math": "^0.9|^0.10|^0.11" + "brick/math": "^0.9|^0.10|^0.11|^0.12" }, "suggest": { "ext-gmp": "GMP or BCMath is highly recommended to improve the library performance", diff --git a/src/EncryptionAlgorithm/ContentEncryption/AESCBC/AESCBCHS.php b/src/EncryptionAlgorithm/ContentEncryption/AESCBC/AESCBCHS.php index 1e57d97f1..04847c6b4 100644 --- a/src/EncryptionAlgorithm/ContentEncryption/AESCBC/AESCBCHS.php +++ b/src/EncryptionAlgorithm/ContentEncryption/AESCBC/AESCBCHS.php @@ -5,9 +5,9 @@ namespace Jose\Component\Encryption\Algorithm\ContentEncryption; use Jose\Component\Encryption\Algorithm\ContentEncryptionAlgorithm; -use const OPENSSL_RAW_DATA; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; +use const OPENSSL_RAW_DATA; abstract class AESCBCHS implements ContentEncryptionAlgorithm { diff --git a/src/EncryptionAlgorithm/ContentEncryption/AESGCM/AESGCM.php b/src/EncryptionAlgorithm/ContentEncryption/AESGCM/AESGCM.php index 9437f9760..c6becc5a3 100644 --- a/src/EncryptionAlgorithm/ContentEncryption/AESGCM/AESGCM.php +++ b/src/EncryptionAlgorithm/ContentEncryption/AESGCM/AESGCM.php @@ -5,9 +5,9 @@ namespace Jose\Component\Encryption\Algorithm\ContentEncryption; use Jose\Component\Encryption\Algorithm\ContentEncryptionAlgorithm; -use const OPENSSL_RAW_DATA; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; +use const OPENSSL_RAW_DATA; abstract class AESGCM implements ContentEncryptionAlgorithm { diff --git a/src/EncryptionAlgorithm/Experimental/ContentEncryption/AESCCM.php b/src/EncryptionAlgorithm/Experimental/ContentEncryption/AESCCM.php index 78e7cdab6..4c96ea07a 100644 --- a/src/EncryptionAlgorithm/Experimental/ContentEncryption/AESCCM.php +++ b/src/EncryptionAlgorithm/Experimental/ContentEncryption/AESCCM.php @@ -5,8 +5,8 @@ namespace Jose\Component\Encryption\Algorithm\ContentEncryption; use Jose\Component\Encryption\Algorithm\ContentEncryptionAlgorithm; -use const OPENSSL_RAW_DATA; use RuntimeException; +use const OPENSSL_RAW_DATA; abstract class AESCCM implements ContentEncryptionAlgorithm { diff --git a/src/EncryptionAlgorithm/Experimental/KeyEncryption/AESCTR.php b/src/EncryptionAlgorithm/Experimental/KeyEncryption/AESCTR.php index 35d062cb3..f93729227 100644 --- a/src/EncryptionAlgorithm/Experimental/KeyEncryption/AESCTR.php +++ b/src/EncryptionAlgorithm/Experimental/KeyEncryption/AESCTR.php @@ -4,13 +4,13 @@ namespace Jose\Component\Encryption\Algorithm\KeyEncryption; -use function in_array; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\JWK; -use const OPENSSL_RAW_DATA; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; +use function in_array; +use function is_string; +use const OPENSSL_RAW_DATA; abstract class AESCTR implements KeyEncryption { diff --git a/src/EncryptionAlgorithm/Experimental/KeyEncryption/Chacha20Poly1305.php b/src/EncryptionAlgorithm/Experimental/KeyEncryption/Chacha20Poly1305.php index f7d5e3db7..90390629d 100644 --- a/src/EncryptionAlgorithm/Experimental/KeyEncryption/Chacha20Poly1305.php +++ b/src/EncryptionAlgorithm/Experimental/KeyEncryption/Chacha20Poly1305.php @@ -4,14 +4,14 @@ namespace Jose\Component\Encryption\Algorithm\KeyEncryption; -use function in_array; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\JWK; use LogicException; -use const OPENSSL_RAW_DATA; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; +use function in_array; +use function is_string; +use const OPENSSL_RAW_DATA; final class Chacha20Poly1305 implements KeyEncryption { diff --git a/src/EncryptionAlgorithm/KeyEncryption/AESGCMKW/AESGCMKW.php b/src/EncryptionAlgorithm/KeyEncryption/AESGCMKW/AESGCMKW.php index cf17be409..6236cdbff 100644 --- a/src/EncryptionAlgorithm/KeyEncryption/AESGCMKW/AESGCMKW.php +++ b/src/EncryptionAlgorithm/KeyEncryption/AESGCMKW/AESGCMKW.php @@ -4,13 +4,13 @@ namespace Jose\Component\Encryption\Algorithm\KeyEncryption; -use function in_array; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\JWK; -use const OPENSSL_RAW_DATA; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; +use function in_array; +use function is_string; +use const OPENSSL_RAW_DATA; abstract class AESGCMKW implements KeyWrapping { diff --git a/src/EncryptionAlgorithm/KeyEncryption/AESKW/AESKW.php b/src/EncryptionAlgorithm/KeyEncryption/AESKW/AESKW.php index f72b67627..800ccfc62 100644 --- a/src/EncryptionAlgorithm/KeyEncryption/AESKW/AESKW.php +++ b/src/EncryptionAlgorithm/KeyEncryption/AESKW/AESKW.php @@ -5,11 +5,11 @@ namespace Jose\Component\Encryption\Algorithm\KeyEncryption; use AESKW\Wrapper as WrapperInterface; -use function in_array; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; +use function in_array; +use function is_string; abstract class AESKW implements KeyWrapping { diff --git a/src/EncryptionAlgorithm/KeyEncryption/Direct/Dir.php b/src/EncryptionAlgorithm/KeyEncryption/Direct/Dir.php index 6409bb003..9f1cef058 100644 --- a/src/EncryptionAlgorithm/KeyEncryption/Direct/Dir.php +++ b/src/EncryptionAlgorithm/KeyEncryption/Direct/Dir.php @@ -4,11 +4,11 @@ namespace Jose\Component\Encryption\Algorithm\KeyEncryption; -use function in_array; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; +use function in_array; +use function is_string; final class Dir implements DirectEncryption { diff --git a/src/EncryptionAlgorithm/KeyEncryption/ECDHES/AbstractECDH.php b/src/EncryptionAlgorithm/KeyEncryption/ECDHES/AbstractECDH.php index 124644c4a..ff1cb8179 100644 --- a/src/EncryptionAlgorithm/KeyEncryption/ECDHES/AbstractECDH.php +++ b/src/EncryptionAlgorithm/KeyEncryption/ECDHES/AbstractECDH.php @@ -4,14 +4,8 @@ namespace Jose\Component\Encryption\Algorithm\KeyEncryption; -use function array_key_exists; use Brick\Math\BigInteger; -use function extension_loaded; -use function function_exists; -use function in_array; use InvalidArgumentException; -use function is_array; -use function is_string; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\Ecc\Curve; use Jose\Component\Core\Util\Ecc\EcDH; @@ -22,6 +16,12 @@ use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; use Throwable; +use function array_key_exists; +use function extension_loaded; +use function function_exists; +use function in_array; +use function is_array; +use function is_string; abstract class AbstractECDH implements KeyAgreement { @@ -79,9 +79,9 @@ protected function calculateAgreementKey(JWK $private_key, JWK $public_key): str throw new InvalidArgumentException('Invalid key parameter "crv"'); } switch ($crv) { - case 'P-256': - case 'P-384': - case 'P-521': + case 'P-256' : + case 'P-384' : + case 'P-521' : $curve = $this->getCurve($crv); if (function_exists('openssl_pkey_derive')) { try { @@ -120,7 +120,7 @@ protected function calculateAgreementKey(JWK $private_key, JWK $public_key): str return $this->convertDecToBin(EcDH::computeSharedKey($curve, $pub_key, $priv_key)); - case 'X25519': + case 'X25519' : $x = $public_key->get('x'); if (! is_string($x)) { throw new InvalidArgumentException('Invalid key parameter "x"'); @@ -134,7 +134,7 @@ protected function calculateAgreementKey(JWK $private_key, JWK $public_key): str return sodium_crypto_scalarmult($sKey, $recipientPublickey); - default: + default : throw new InvalidArgumentException(sprintf('The curve "%s" is not supported', $crv)); } } @@ -156,20 +156,20 @@ protected function getKeysFromPublicKey( throw new InvalidArgumentException('Invalid key parameter "crv"'); } switch ($crv) { - case 'P-256': - case 'P-384': - case 'P-521': + case 'P-256' : + case 'P-384' : + case 'P-521' : $private_key = $senderKey ?? ECKey::createECKey($crv); break; - case 'X25519': + case 'X25519' : $this->checkSodiumExtensionIsAvailable(); $private_key = $senderKey ?? $this->createOKPKey('X25519'); break; - default: + default : throw new InvalidArgumentException(sprintf('The curve "%s" is not supported', $crv)); } $epk = $private_key->toPublic() @@ -228,19 +228,19 @@ private function checkKey(JWK $key, bool $is_private): void throw new InvalidArgumentException('Invalid key parameter "crv"'); } switch ($crv) { - case 'P-256': - case 'P-384': - case 'P-521': + case 'P-256' : + case 'P-384' : + case 'P-521' : if (! $key->has('y')) { throw new InvalidArgumentException('The key parameter "y" is missing.'); } break; - case 'X25519': + case 'X25519' : break; - default: + default : throw new InvalidArgumentException(sprintf('The curve "%s" is not supported', $crv)); } if ($is_private === true && ! $key->has('d')) { @@ -295,14 +295,14 @@ private function createOKPKey(string $curve): JWK $this->checkSodiumExtensionIsAvailable(); switch ($curve) { - case 'X25519': + case 'X25519' : $keyPair = sodium_crypto_box_keypair(); $d = sodium_crypto_box_secretkey($keyPair); $x = sodium_crypto_box_publickey($keyPair); break; - case 'Ed25519': + case 'Ed25519' : $keyPair = sodium_crypto_sign_keypair(); $secret = sodium_crypto_sign_secretkey($keyPair); $secretLength = mb_strlen($secret, '8bit'); @@ -311,7 +311,7 @@ private function createOKPKey(string $curve): JWK break; - default: + default : throw new InvalidArgumentException(sprintf('Unsupported "%s" curve', $curve)); } diff --git a/src/EncryptionAlgorithm/KeyEncryption/PBES2/PBES2AESKW.php b/src/EncryptionAlgorithm/KeyEncryption/PBES2/PBES2AESKW.php index 1891bbb01..61f8a442a 100644 --- a/src/EncryptionAlgorithm/KeyEncryption/PBES2/PBES2AESKW.php +++ b/src/EncryptionAlgorithm/KeyEncryption/PBES2/PBES2AESKW.php @@ -7,12 +7,12 @@ use AESKW\A128KW; use AESKW\A192KW; use AESKW\A256KW; -use function in_array; use InvalidArgumentException; -use function is_int; -use function is_string; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; +use function in_array; +use function is_int; +use function is_string; abstract class PBES2AESKW implements KeyWrapping { diff --git a/src/EncryptionAlgorithm/KeyEncryption/RSA/RSA.php b/src/EncryptionAlgorithm/KeyEncryption/RSA/RSA.php index 57c48f436..1d5de916a 100644 --- a/src/EncryptionAlgorithm/KeyEncryption/RSA/RSA.php +++ b/src/EncryptionAlgorithm/KeyEncryption/RSA/RSA.php @@ -4,11 +4,11 @@ namespace Jose\Component\Encryption\Algorithm\KeyEncryption; -use function in_array; use InvalidArgumentException; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\RSAKey; use Jose\Component\Encryption\Algorithm\KeyEncryption\Util\RSACrypt; +use function in_array; abstract class RSA implements KeyEncryption { diff --git a/src/EncryptionAlgorithm/KeyEncryption/RSA/Util/RSACrypt.php b/src/EncryptionAlgorithm/KeyEncryption/RSA/Util/RSACrypt.php index c4a6bac09..e53f85aa1 100644 --- a/src/EncryptionAlgorithm/KeyEncryption/RSA/Util/RSACrypt.php +++ b/src/EncryptionAlgorithm/KeyEncryption/RSA/Util/RSACrypt.php @@ -4,15 +4,15 @@ namespace Jose\Component\Encryption\Algorithm\KeyEncryption\Util; -use function chr; -use function count; use InvalidArgumentException; use Jose\Component\Core\Util\BigInteger; use Jose\Component\Core\Util\Hash; use Jose\Component\Core\Util\RSAKey; use LogicException; -use function ord; use RuntimeException; +use function chr; +use function count; +use function ord; use const STR_PAD_LEFT; /** diff --git a/src/EncryptionAlgorithm/KeyEncryption/RSA/composer.json b/src/EncryptionAlgorithm/KeyEncryption/RSA/composer.json index 3c5b78bf0..15efb1fe4 100644 --- a/src/EncryptionAlgorithm/KeyEncryption/RSA/composer.json +++ b/src/EncryptionAlgorithm/KeyEncryption/RSA/composer.json @@ -39,7 +39,7 @@ }, "require": { "php": ">=8.1", - "brick/math": "^0.9|^0.10|^0.11", + "brick/math": "^0.9|^0.10|^0.11|^0.12", "ext-openssl": "*", "symfony/polyfill-mbstring": "^1.12", "web-token/jwt-encryption": "^3.2" diff --git a/src/SignatureAlgorithm/ECDSA/ECDSA.php b/src/SignatureAlgorithm/ECDSA/ECDSA.php index e40c0a072..9f9c118a1 100644 --- a/src/SignatureAlgorithm/ECDSA/ECDSA.php +++ b/src/SignatureAlgorithm/ECDSA/ECDSA.php @@ -4,14 +4,14 @@ namespace Jose\Component\Signature\Algorithm; -use function defined; -use function in_array; use InvalidArgumentException; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\ECKey; use Jose\Component\Core\Util\ECSignature; use LogicException; use Throwable; +use function defined; +use function in_array; abstract class ECDSA implements SignatureAlgorithm { diff --git a/src/SignatureAlgorithm/EdDSA/EdDSA.php b/src/SignatureAlgorithm/EdDSA/EdDSA.php index dcc57c57e..1e7e344ea 100644 --- a/src/SignatureAlgorithm/EdDSA/EdDSA.php +++ b/src/SignatureAlgorithm/EdDSA/EdDSA.php @@ -4,13 +4,13 @@ namespace Jose\Component\Signature\Algorithm; -use function extension_loaded; -use function in_array; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; use RuntimeException; +use function extension_loaded; +use function in_array; +use function is_string; final class EdDSA implements SignatureAlgorithm { diff --git a/src/SignatureAlgorithm/Experimental/Blake2b.php b/src/SignatureAlgorithm/Experimental/Blake2b.php index 92e6ddb8c..3fc235e08 100644 --- a/src/SignatureAlgorithm/Experimental/Blake2b.php +++ b/src/SignatureAlgorithm/Experimental/Blake2b.php @@ -4,11 +4,11 @@ namespace Jose\Component\Signature\Algorithm; -use function in_array; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; +use function in_array; +use function is_string; /** * @see \Jose\Tests\Component\Signature\Algorithm\Blake2bTest diff --git a/src/SignatureAlgorithm/HMAC/HMAC.php b/src/SignatureAlgorithm/HMAC/HMAC.php index bd1923787..09d020a8b 100644 --- a/src/SignatureAlgorithm/HMAC/HMAC.php +++ b/src/SignatureAlgorithm/HMAC/HMAC.php @@ -4,11 +4,11 @@ namespace Jose\Component\Signature\Algorithm; -use function in_array; use InvalidArgumentException; -use function is_string; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; +use function in_array; +use function is_string; abstract class HMAC implements MacAlgorithm { diff --git a/src/SignatureAlgorithm/None/None.php b/src/SignatureAlgorithm/None/None.php index 41c100b5e..be9e48731 100644 --- a/src/SignatureAlgorithm/None/None.php +++ b/src/SignatureAlgorithm/None/None.php @@ -4,9 +4,9 @@ namespace Jose\Component\Signature\Algorithm; -use function in_array; use InvalidArgumentException; use Jose\Component\Core\JWK; +use function in_array; final class None implements SignatureAlgorithm { diff --git a/src/SignatureAlgorithm/RSA/RSAPKCS1.php b/src/SignatureAlgorithm/RSA/RSAPKCS1.php index 573b1ee1f..4da00b2ac 100644 --- a/src/SignatureAlgorithm/RSA/RSAPKCS1.php +++ b/src/SignatureAlgorithm/RSA/RSAPKCS1.php @@ -4,11 +4,11 @@ namespace Jose\Component\Signature\Algorithm; -use function in_array; use InvalidArgumentException; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\RSAKey; use RuntimeException; +use function in_array; abstract class RSAPKCS1 implements SignatureAlgorithm { diff --git a/src/SignatureAlgorithm/RSA/RSAPSS.php b/src/SignatureAlgorithm/RSA/RSAPSS.php index 19f36abd6..46dafec01 100644 --- a/src/SignatureAlgorithm/RSA/RSAPSS.php +++ b/src/SignatureAlgorithm/RSA/RSAPSS.php @@ -4,11 +4,11 @@ namespace Jose\Component\Signature\Algorithm; -use function in_array; use InvalidArgumentException; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\RSAKey; use Jose\Component\Signature\Algorithm\Util\RSA as JoseRSA; +use function in_array; abstract class RSAPSS implements SignatureAlgorithm { diff --git a/src/SignatureAlgorithm/RSA/Util/RSA.php b/src/SignatureAlgorithm/RSA/Util/RSA.php index 901badcf4..d628ea7c3 100644 --- a/src/SignatureAlgorithm/RSA/Util/RSA.php +++ b/src/SignatureAlgorithm/RSA/Util/RSA.php @@ -4,13 +4,13 @@ namespace Jose\Component\Signature\Algorithm\Util; -use function chr; use InvalidArgumentException; use Jose\Component\Core\Util\BigInteger; use Jose\Component\Core\Util\Hash; use Jose\Component\Core\Util\RSAKey; -use function ord; use RuntimeException; +use function chr; +use function ord; use const STR_PAD_LEFT; /** diff --git a/src/SignatureAlgorithm/RSA/composer.json b/src/SignatureAlgorithm/RSA/composer.json index 2a8f3afc9..4f58c51c3 100644 --- a/src/SignatureAlgorithm/RSA/composer.json +++ b/src/SignatureAlgorithm/RSA/composer.json @@ -39,7 +39,7 @@ }, "require": { "php": ">=8.1", - "brick/math": "^0.9|^0.10|^0.11", + "brick/math": "^0.9|^0.10|^0.11|^0.12", "ext-openssl": "*", "web-token/jwt-signature": "^3.2" }, diff --git a/tests/Bundle/JoseFramework/Functional/Checker/ClaimCheckerTest.php b/tests/Bundle/JoseFramework/Functional/Checker/ClaimCheckerTest.php index fae0f4da7..f4d294e3b 100644 --- a/tests/Bundle/JoseFramework/Functional/Checker/ClaimCheckerTest.php +++ b/tests/Bundle/JoseFramework/Functional/Checker/ClaimCheckerTest.php @@ -6,6 +6,7 @@ use Jose\Bundle\JoseFramework\Services\ClaimCheckerManagerFactory as ClaimCheckerManagerFactoryService; use Jose\Component\Checker\ClaimCheckerManagerFactory; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -21,9 +22,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function theClaimCheckerManagerFactoryIsAvailable(): void { static::ensureKernelShutdown(); @@ -33,9 +32,7 @@ public static function theClaimCheckerManagerFactoryIsAvailable(): void static::assertTrue($container->has(ClaimCheckerManagerFactoryService::class)); } - /** - * @test - */ + #[Test] public static function theClaimCheckerManagerFactoryCanCreateAClaimCheckerManager(): void { static::ensureKernelShutdown(); @@ -49,9 +46,7 @@ public static function theClaimCheckerManagerFactoryCanCreateAClaimCheckerManage $claimCheckerManagerFactory->create($aliases); } - /** - * @test - */ + #[Test] public static function aClaimCheckerCanBeDefinedUsingTheConfigurationFile(): void { static::ensureKernelShutdown(); @@ -61,9 +56,7 @@ public static function aClaimCheckerCanBeDefinedUsingTheConfigurationFile(): voi static::assertTrue($container->has('jose.claim_checker.checker1')); } - /** - * @test - */ + #[Test] public static function aClaimCheckerCanBeDefinedFromAnotherBundleUsingTheHelper(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Checker/ConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/Checker/ConfigurationTest.php index 27fdfb5b4..7bba39229 100644 --- a/tests/Bundle/JoseFramework/Functional/Checker/ConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/Checker/ConfigurationTest.php @@ -9,6 +9,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\Core\CoreSource; use Jose\Component\Checker\ClaimCheckerManagerFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -25,17 +26,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -45,9 +42,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -57,9 +52,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoHeaderOrClaimCheckerIsSet(): void { $this->assertConfigurationIsValid([ @@ -72,9 +65,7 @@ public function theConfigurationIsValidIfNoHeaderOrClaimCheckerIsSet(): void ]); } - /** - * @test - */ + #[Test] public function theHeadersForAHeaderCheckerShouldBeSet(): void { $this->assertConfigurationIsInvalid( @@ -93,9 +84,7 @@ public function theHeadersForAHeaderCheckerShouldBeSet(): void ); } - /** - * @test - */ + #[Test] public function aHeaderCheckerMayContainNoChecker(): void { $this->assertConfigurationIsValid( @@ -114,9 +103,7 @@ public function aHeaderCheckerMayContainNoChecker(): void ); } - /** - * @test - */ + #[Test] public function theClaimsForAClaimCheckerShouldBeSet(): void { $this->assertConfigurationIsInvalid( @@ -135,9 +122,7 @@ public function theClaimsForAClaimCheckerShouldBeSet(): void ); } - /** - * @test - */ + #[Test] public function aClaimCheckerMayContainNoChecker(): void { $this->assertConfigurationIsValid( diff --git a/tests/Bundle/JoseFramework/Functional/Checker/HeaderCheckerTest.php b/tests/Bundle/JoseFramework/Functional/Checker/HeaderCheckerTest.php index ea98c2d37..2ad961d73 100644 --- a/tests/Bundle/JoseFramework/Functional/Checker/HeaderCheckerTest.php +++ b/tests/Bundle/JoseFramework/Functional/Checker/HeaderCheckerTest.php @@ -6,6 +6,7 @@ use Jose\Bundle\JoseFramework\Services\HeaderCheckerManagerFactory as HeaderCheckerManagerFactoryService; use Jose\Component\Checker\HeaderCheckerManagerFactory; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -21,9 +22,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function theHeaderCheckerManagerFactoryIsAvailable(): void { static::ensureKernelShutdown(); @@ -33,9 +32,7 @@ public static function theHeaderCheckerManagerFactoryIsAvailable(): void static::assertTrue($container->has(HeaderCheckerManagerFactoryService::class)); } - /** - * @test - */ + #[Test] public static function theHeaderCheckerManagerFactoryCanCreateAHeaderCheckerManager(): void { static::ensureKernelShutdown(); @@ -49,9 +46,7 @@ public static function theHeaderCheckerManagerFactoryCanCreateAHeaderCheckerMana $headerCheckerManagerFactory->create($aliases); } - /** - * @test - */ + #[Test] public static function aHeaderCheckerCanBeDefinedUsingTheConfigurationFile(): void { static::ensureKernelShutdown(); @@ -61,9 +56,7 @@ public static function aHeaderCheckerCanBeDefinedUsingTheConfigurationFile(): vo static::assertTrue($container->has('jose.header_checker.checker1')); } - /** - * @test - */ + #[Test] public static function aHeaderCheckerCanBeDefinedFromAnotherBundleUsingTheHelper(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Console/ConsoleTest.php b/tests/Bundle/JoseFramework/Functional/Console/ConsoleTest.php index a4e12efbc..5f10a4850 100644 --- a/tests/Bundle/JoseFramework/Functional/Console/ConsoleTest.php +++ b/tests/Bundle/JoseFramework/Functional/Console/ConsoleTest.php @@ -5,6 +5,7 @@ namespace Jose\Tests\Bundle\JoseFramework\Functional\Console; use Jose\Component\Console\EcKeyGeneratorCommand; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; @@ -20,9 +21,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function allCommandsAreAvailable(): void { $expectedCommands = [ @@ -50,6 +49,8 @@ public static function allCommandsAreAvailable(): void self::bootKernel(); $application = new Application(self::$kernel); - static::assertEmpty(array_diff($expectedCommands, array_keys($application->all()))); + foreach ($expectedCommands as $expectedCommand) { + static::assertArrayHasKey($expectedCommand, $application->all()); + } } } diff --git a/tests/Bundle/JoseFramework/Functional/Encryption/JWEBuilderTest.php b/tests/Bundle/JoseFramework/Functional/Encryption/JWEBuilderTest.php index 5813a6e71..9e8cf6786 100644 --- a/tests/Bundle/JoseFramework/Functional/Encryption/JWEBuilderTest.php +++ b/tests/Bundle/JoseFramework/Functional/Encryption/JWEBuilderTest.php @@ -7,6 +7,7 @@ use Jose\Bundle\JoseFramework\Services\JWEBuilder; use Jose\Bundle\JoseFramework\Services\JWEBuilderFactory as JWEBuilderFactoryService; use Jose\Component\Encryption\JWEBuilderFactory; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -22,9 +23,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function theJWEBuilderFactoryIsAvailable(): void { static::ensureKernelShutdown(); @@ -34,9 +33,7 @@ public static function theJWEBuilderFactoryIsAvailable(): void static::assertTrue($container->has(JWEBuilderFactoryService::class)); } - /** - * @test - */ + #[Test] public static function theJWEBuilderFactoryCanCreateAJWEBuilder(): void { static::ensureKernelShutdown(); @@ -50,9 +47,7 @@ public static function theJWEBuilderFactoryCanCreateAJWEBuilder(): void $jweFactory->create(['RSA1_5'], ['A256GCM'], ['DEF']); } - /** - * @test - */ + #[Test] public static function aJWEBuilderCanBeDefinedUsingTheConfigurationFile(): void { static::ensureKernelShutdown(); @@ -65,9 +60,7 @@ public static function aJWEBuilderCanBeDefinedUsingTheConfigurationFile(): void static::assertInstanceOf(JWEBuilder::class, $jwe); } - /** - * @test - */ + #[Test] public static function aJWEBuilderCanBeDefinedFromAnotherBundleUsingTheHelper(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Encryption/JWEComputationTest.php b/tests/Bundle/JoseFramework/Functional/Encryption/JWEComputationTest.php index 7884eabb6..45e931d75 100644 --- a/tests/Bundle/JoseFramework/Functional/Encryption/JWEComputationTest.php +++ b/tests/Bundle/JoseFramework/Functional/Encryption/JWEComputationTest.php @@ -9,6 +9,7 @@ use Jose\Component\Encryption\JWEBuilderFactory; use Jose\Component\Encryption\JWEDecrypter; use Jose\Component\Encryption\Serializer\CompactSerializer; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -24,9 +25,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function iCanCreateAndLoadAToken(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Encryption/JWEDecrypterTest.php b/tests/Bundle/JoseFramework/Functional/Encryption/JWEDecrypterTest.php index b1040efd4..651a70c46 100644 --- a/tests/Bundle/JoseFramework/Functional/Encryption/JWEDecrypterTest.php +++ b/tests/Bundle/JoseFramework/Functional/Encryption/JWEDecrypterTest.php @@ -7,6 +7,7 @@ use Jose\Bundle\JoseFramework\Services\JWEDecrypterFactory as JWEDecrypterFactoryService; use Jose\Component\Encryption\JWEBuilderFactory; use Jose\Component\Encryption\JWEDecrypter; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -22,9 +23,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function theJWEDecrypterFactoryIsAvailable(): void { static::ensureKernelShutdown(); @@ -34,9 +33,7 @@ public static function theJWEDecrypterFactoryIsAvailable(): void static::assertTrue($container->has(JWEDecrypterFactoryService::class)); } - /** - * @test - */ + #[Test] public static function theWEDecrypterFactoryCanCreateAJWEDecrypter(): void { static::ensureKernelShutdown(); @@ -50,9 +47,7 @@ public static function theWEDecrypterFactoryCanCreateAJWEDecrypter(): void $jweFactory->create(['RSA1_5'], ['A256GCM'], ['DEF']); } - /** - * @test - */ + #[Test] public static function aJWEDecrypterCanBeDefinedUsingTheConfigurationFile(): void { static::ensureKernelShutdown(); @@ -65,9 +60,7 @@ public static function aJWEDecrypterCanBeDefinedUsingTheConfigurationFile(): voi static::assertInstanceOf(JWEDecrypter::class, $jwe); } - /** - * @test - */ + #[Test] public static function aJWEDecrypterCanBeDefinedFromAnotherBundleUsingTheHelper(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Encryption/JWELoaderTest.php b/tests/Bundle/JoseFramework/Functional/Encryption/JWELoaderTest.php index dd06777e4..a2f51b62d 100644 --- a/tests/Bundle/JoseFramework/Functional/Encryption/JWELoaderTest.php +++ b/tests/Bundle/JoseFramework/Functional/Encryption/JWELoaderTest.php @@ -7,6 +7,7 @@ use Jose\Bundle\JoseFramework\Services\JWELoaderFactory as JWELoaderFactoryAlias; use Jose\Component\Encryption\JWEBuilderFactory; use Jose\Component\Encryption\JWELoader; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -22,9 +23,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function theJWELoaderFactoryIsAvailable(): void { static::ensureKernelShutdown(); @@ -34,9 +33,7 @@ public static function theJWELoaderFactoryIsAvailable(): void static::assertTrue($container->has(JWELoaderFactoryAlias::class)); } - /** - * @test - */ + #[Test] public static function theWELoaderFactoryCanCreateAJWELoader(): void { static::ensureKernelShutdown(); @@ -55,9 +52,7 @@ public static function theWELoaderFactoryCanCreateAJWELoader(): void static::assertSame(['DEF'], $jwe->getJweDecrypter()->getCompressionMethodManager()->list()); } - /** - * @test - */ + #[Test] public static function aJWELoaderCanBeDefinedUsingTheConfigurationFile(): void { static::ensureKernelShutdown(); @@ -70,9 +65,7 @@ public static function aJWELoaderCanBeDefinedUsingTheConfigurationFile(): void static::assertInstanceOf(JWELoader::class, $jwe); } - /** - * @test - */ + #[Test] public static function aJWELoaderCanBeDefinedFromAnotherBundleUsingTheHelper(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Encryption/JWESerializerTest.php b/tests/Bundle/JoseFramework/Functional/Encryption/JWESerializerTest.php index 38d7a54dc..bd46051bf 100644 --- a/tests/Bundle/JoseFramework/Functional/Encryption/JWESerializerTest.php +++ b/tests/Bundle/JoseFramework/Functional/Encryption/JWESerializerTest.php @@ -6,6 +6,7 @@ use Jose\Component\Encryption\JWEBuilderFactory; use Jose\Component\Encryption\Serializer\JWESerializerManager; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -21,9 +22,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function jWESerializerManagerFromConfigurationIsAvailable(): void { static::ensureKernelShutdown(); @@ -36,9 +35,7 @@ public static function jWESerializerManagerFromConfigurationIsAvailable(): void static::assertInstanceOf(JWESerializerManager::class, $jwe); } - /** - * @test - */ + #[Test] public static function jWESerializerManagerFromExternalBundleExtensionIsAvailable(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Encryption/JweBuilderConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/Encryption/JweBuilderConfigurationTest.php index 0390546b6..87cd29245 100644 --- a/tests/Bundle/JoseFramework/Functional/Encryption/JweBuilderConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/Encryption/JweBuilderConfigurationTest.php @@ -9,6 +9,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\Encryption\EncryptionSource; use Jose\Component\Encryption\JWEBuilderFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -25,17 +26,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -45,9 +42,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -57,9 +52,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfBuilderIsSet(): void { $this->assertConfigurationIsValid([ @@ -71,9 +64,7 @@ public function theConfigurationIsInvalidIfBuilderIsSet(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNotKeyEncryptionAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -90,9 +81,7 @@ public function theConfigurationIsInvalidIfNotKeyEncryptionAlgorithmIsSet(): voi ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfTheKeyEncryptionAlgorithmIsEmpty(): void { $this->assertConfigurationIsInvalid( @@ -111,9 +100,7 @@ public function theConfigurationIsInvalidIfTheKeyEncryptionAlgorithmIsEmpty(): v ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNotContentEncryptionAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -132,9 +119,7 @@ public function theConfigurationIsInvalidIfNotContentEncryptionAlgorithmIsSet(): ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfTheContentEncryptionAlgorithmIsEmpty(): void { $this->assertConfigurationIsInvalid( diff --git a/tests/Bundle/JoseFramework/Functional/Encryption/JweDecrypterConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/Encryption/JweDecrypterConfigurationTest.php index 4790d5662..8d5d1dd61 100644 --- a/tests/Bundle/JoseFramework/Functional/Encryption/JweDecrypterConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/Encryption/JweDecrypterConfigurationTest.php @@ -9,6 +9,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\Encryption\EncryptionSource; use Jose\Component\Encryption\JWEBuilderFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -25,17 +26,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -45,9 +42,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -57,9 +52,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfBuilderIsSet(): void { $this->assertConfigurationIsValid([ @@ -71,9 +64,7 @@ public function theConfigurationIsInvalidIfBuilderIsSet(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNotKeyEncryptionAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -90,9 +81,7 @@ public function theConfigurationIsInvalidIfNotKeyEncryptionAlgorithmIsSet(): voi ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfTheKeyEncryptionAlgorithmIsEmpty(): void { $this->assertConfigurationIsInvalid( @@ -111,9 +100,7 @@ public function theConfigurationIsInvalidIfTheKeyEncryptionAlgorithmIsEmpty(): v ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNotContentEncryptionAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -132,9 +119,7 @@ public function theConfigurationIsInvalidIfNotContentEncryptionAlgorithmIsSet(): ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfTheContentEncryptionAlgorithmIsEmpty(): void { $this->assertConfigurationIsInvalid( diff --git a/tests/Bundle/JoseFramework/Functional/Encryption/SerializerConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/Encryption/SerializerConfigurationTest.php index a0a199e7b..ccec92519 100644 --- a/tests/Bundle/JoseFramework/Functional/Encryption/SerializerConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/Encryption/SerializerConfigurationTest.php @@ -9,6 +9,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\Encryption\EncryptionSource; use Jose\Component\Encryption\JWEBuilderFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -25,17 +26,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -45,9 +42,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -57,9 +52,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoSerializerIsSet(): void { $this->assertConfigurationIsValid([ @@ -71,9 +64,7 @@ public function theConfigurationIsValidIfNoSerializerIsSet(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoSerializerParameterIsSet(): void { $this->assertConfigurationIsInvalid( @@ -90,9 +81,7 @@ public function theConfigurationIsInvalidIfNoSerializerParameterIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfTheSerializerListIsEmpty(): void { $this->assertConfigurationIsInvalid( diff --git a/tests/Bundle/JoseFramework/Functional/KeyManagement/JKUAndX5UFactoriesTest.php b/tests/Bundle/JoseFramework/Functional/KeyManagement/JKUAndX5UFactoriesTest.php index 5f825c81b..5818529f4 100644 --- a/tests/Bundle/JoseFramework/Functional/KeyManagement/JKUAndX5UFactoriesTest.php +++ b/tests/Bundle/JoseFramework/Functional/KeyManagement/JKUAndX5UFactoriesTest.php @@ -6,6 +6,7 @@ use Jose\Component\KeyManagement\JKUFactory; use Jose\Component\KeyManagement\X5UFactory; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -21,9 +22,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function theJKUFactoryServiceIsAvailable(): void { static::ensureKernelShutdown(); @@ -34,9 +33,7 @@ public static function theJKUFactoryServiceIsAvailable(): void static::assertTrue($container->has(JKUFactory::class)); } - /** - * @test - */ + #[Test] public static function theX5UFactoryServiceIsAvailable(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKLoaderTest.php b/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKLoaderTest.php index 561afe283..88774a89b 100644 --- a/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKLoaderTest.php +++ b/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKLoaderTest.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Component\KeyManagement\JWKFactory; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -22,9 +23,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function aJWKCanBeDefinedInTheConfiguration(): void { static::ensureKernelShutdown(); @@ -36,9 +35,7 @@ public static function aJWKCanBeDefinedInTheConfiguration(): void static::assertInstanceOf(JWK::class, $container->get('jose.key.jwk1')); } - /** - * @test - */ + #[Test] public static function aJWKCanBeDefinedFromAnotherBundle(): void { static::ensureKernelShutdown(); @@ -50,9 +47,7 @@ public static function aJWKCanBeDefinedFromAnotherBundle(): void static::assertInstanceOf(JWK::class, $container->get('jose.key.jwk2')); } - /** - * @test - */ + #[Test] public static function aX509InFileCanBeDefinedInTheConfiguration(): void { static::ensureKernelShutdown(); @@ -64,9 +59,7 @@ public static function aX509InFileCanBeDefinedInTheConfiguration(): void static::assertInstanceOf(JWK::class, $container->get('jose.key.certificate1')); } - /** - * @test - */ + #[Test] public static function aDirectX509InputCanBeDefinedInTheConfiguration(): void { static::ensureKernelShutdown(); @@ -78,9 +71,7 @@ public static function aDirectX509InputCanBeDefinedInTheConfiguration(): void static::assertInstanceOf(JWK::class, $container->get('jose.key.x5c1')); } - /** - * @test - */ + #[Test] public static function anEncryptedKeyFileCanBeLoadedInTheConfiguration(): void { static::ensureKernelShutdown(); @@ -92,9 +83,7 @@ public static function anEncryptedKeyFileCanBeLoadedInTheConfiguration(): void static::assertInstanceOf(JWK::class, $container->get('jose.key.file1')); } - /** - * @test - */ + #[Test] public static function aJWKCanBeLoadedFromAJwkSetInTheConfiguration(): void { static::ensureKernelShutdown(); @@ -106,9 +95,7 @@ public static function aJWKCanBeLoadedFromAJwkSetInTheConfiguration(): void static::assertInstanceOf(JWK::class, $container->get('jose.key.jwkset1')); } - /** - * @test - */ + #[Test] public static function aJWKCanBeLoadedFromASecretInTheConfiguration(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKSetLoaderTest.php b/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKSetLoaderTest.php index c92146c0d..4147e07d1 100644 --- a/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKSetLoaderTest.php +++ b/tests/Bundle/JoseFramework/Functional/KeyManagement/JWKSetLoaderTest.php @@ -8,6 +8,7 @@ use Jose\Component\KeyManagement\JWKFactory; use Jose\Tests\Bundle\JoseFramework\TestBundle\Service\MockClientCallback; use Nyholm\Psr7\Factory\Psr17Factory; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\HttpFoundation\Response; @@ -26,9 +27,7 @@ protected function setUp(): void static::$messageFactory = new Psr17Factory(); } - /** - * @test - */ + #[Test] public static function aJWKSetCanBeDefinedInTheConfiguration(): void { static::ensureKernelShutdown(); @@ -39,9 +38,7 @@ public static function aJWKSetCanBeDefinedInTheConfiguration(): void static::assertInstanceOf(JWKSet::class, $container->get('jose.key_set.jwkset1')); } - /** - * @test - */ + #[Test] public static function aJWKSetCanBeSharedInTheConfiguration(): void { static::ensureKernelShutdown(); @@ -59,9 +56,7 @@ public static function aJWKSetCanBeSharedInTheConfiguration(): void static::assertSame('application/jwk-set+json; charset=UTF-8', $response->headers->get('Content-Type')); } - /** - * @test - */ + #[Test] public static function aJWKSetCanBeDefinedFromAnotherBundle(): void { static::ensureKernelShutdown(); @@ -72,9 +67,7 @@ public static function aJWKSetCanBeDefinedFromAnotherBundle(): void static::assertInstanceOf(JWKSet::class, $container->get('jose.key_set.jwkset2')); } - /** - * @test - */ + #[Test] public static function aJWKSetCanBeSharedFromAnotherBundle(): void { static::ensureKernelShutdown(); @@ -92,9 +85,7 @@ public static function aJWKSetCanBeSharedFromAnotherBundle(): void static::assertSame('application/jwk-set+json; charset=UTF-8', $response->headers->get('Content-Type')); } - /** - * @test - */ + #[Test] public static function aJWKSetCanBeRetrieveFromADistantJkuThroughConfiguration(): void { static::ensureKernelShutdown(); @@ -116,9 +107,7 @@ public static function aJWKSetCanBeRetrieveFromADistantJkuThroughConfiguration() static::assertInstanceOf(JWKSet::class, $container->get('jose.key_set.jku1')); } - /** - * @test - */ + #[Test] public static function aJWKSetCanBeRetrieveFromADistantX5uThroughConfiguration(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/KeyManagement/JwkUriConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/KeyManagement/JwkUriConfigurationTest.php index 63413b993..3cc608f37 100644 --- a/tests/Bundle/JoseFramework/Functional/KeyManagement/JwkUriConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/KeyManagement/JwkUriConfigurationTest.php @@ -9,6 +9,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\KeyManagement\KeyManagementSource; use Jose\Component\KeyManagement\JWKFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -25,17 +26,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -45,9 +42,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -57,9 +52,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoKeySetIdIsSet(): void { $this->assertConfigurationIsInvalid( @@ -74,9 +67,7 @@ public function theConfigurationIsInvalidIfNoKeySetIdIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoPathIsSet(): void { $this->assertConfigurationIsInvalid( diff --git a/tests/Bundle/JoseFramework/Functional/KeyManagement/KeyConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/KeyManagement/KeyConfigurationTest.php index 364c42792..1a3b69257 100644 --- a/tests/Bundle/JoseFramework/Functional/KeyManagement/KeyConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/KeyManagement/KeyConfigurationTest.php @@ -9,6 +9,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\KeyManagement\KeyManagementSource; use Jose\Component\KeyManagement\JWKFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -25,17 +26,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -45,9 +42,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -57,9 +52,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoKeyTypeIsSet(): void { $this->assertConfigurationIsInvalid( @@ -74,9 +67,7 @@ public function theConfigurationIsInvalidIfNoKeyTypeIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfAnUnsupportedKeyTypeIsSet(): void { $this->assertConfigurationIsInvalid( @@ -93,9 +84,7 @@ public function theConfigurationIsInvalidIfAnUnsupportedKeyTypeIsSet(): void ); } - /** - * @test - */ + #[Test] public function theCertificateConfigurationIsInvalidIfRequiredParametersAreNotSet(): void { $this->assertConfigurationIsInvalid( @@ -112,9 +101,7 @@ public function theCertificateConfigurationIsInvalidIfRequiredParametersAreNotSe ); } - /** - * @test - */ + #[Test] public function theJwkConfigurationIsInvalidIfRequiredParametersAreNotSet(): void { $this->assertConfigurationIsInvalid( @@ -131,9 +118,7 @@ public function theJwkConfigurationIsInvalidIfRequiredParametersAreNotSet(): voi ); } - /** - * @test - */ + #[Test] public function theJwkSetConfigurationIsInvalidIfRequiredParametersAreNotSet(): void { $this->assertConfigurationIsInvalid( @@ -150,9 +135,7 @@ public function theJwkSetConfigurationIsInvalidIfRequiredParametersAreNotSet(): ); } - /** - * @test - */ + #[Test] public function theJwkSetConfigurationIsInvalidIfRequiredParametersAreNotSet2(): void { $this->assertConfigurationIsInvalid( @@ -171,9 +154,7 @@ public function theJwkSetConfigurationIsInvalidIfRequiredParametersAreNotSet2(): ); } - /** - * @test - */ + #[Test] public function theKeyFileConfigurationIsInvalidIfRequiredParametersAreNotSet(): void { $this->assertConfigurationIsInvalid( @@ -190,9 +171,7 @@ public function theKeyFileConfigurationIsInvalidIfRequiredParametersAreNotSet(): ); } - /** - * @test - */ + #[Test] public function theValuesConfigurationIsInvalidIfRequiredParametersAreNotSet(): void { $this->assertConfigurationIsInvalid( @@ -209,9 +188,7 @@ public function theValuesConfigurationIsInvalidIfRequiredParametersAreNotSet(): ); } - /** - * @test - */ + #[Test] public function theX5CConfigurationIsInvalidIfRequiredParametersAreNotSet(): void { $this->assertConfigurationIsInvalid( diff --git a/tests/Bundle/JoseFramework/Functional/KeyManagement/KeySetConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/KeyManagement/KeySetConfigurationTest.php index 9d9eb9f76..167c92e45 100644 --- a/tests/Bundle/JoseFramework/Functional/KeyManagement/KeySetConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/KeyManagement/KeySetConfigurationTest.php @@ -9,6 +9,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\KeyManagement\KeyManagementSource; use Jose\Component\KeyManagement\JWKFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -25,17 +26,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -45,9 +42,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -57,9 +52,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoKeySetTypeIsSet(): void { $this->assertConfigurationIsInvalid( @@ -74,9 +67,7 @@ public function theConfigurationIsInvalidIfNoKeySetTypeIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfAnUnsupportedKeySetTypeIsSet(): void { $this->assertConfigurationIsInvalid( @@ -93,9 +84,7 @@ public function theConfigurationIsInvalidIfAnUnsupportedKeySetTypeIsSet(): void ); } - /** - * @test - */ + #[Test] public function theJkuConfigurationIsInvalidIfRequiredParametersAreNotSet(): void { $this->assertConfigurationIsInvalid( @@ -112,9 +101,7 @@ public function theJkuConfigurationIsInvalidIfRequiredParametersAreNotSet(): voi ); } - /** - * @test - */ + #[Test] public function theJwkSetConfigurationIsInvalidIfRequiredParametersAreNotSet(): void { $this->assertConfigurationIsInvalid( @@ -131,9 +118,7 @@ public function theJwkSetConfigurationIsInvalidIfRequiredParametersAreNotSet(): ); } - /** - * @test - */ + #[Test] public function theX5UConfigurationIsInvalidIfRequiredParametersAreNotSet(): void { $this->assertConfigurationIsInvalid( diff --git a/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenBuilderConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenBuilderConfigurationTest.php index 9628c7110..e89bb31c7 100644 --- a/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenBuilderConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenBuilderConfigurationTest.php @@ -12,6 +12,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\Signature\SignatureSource; use Jose\Bundle\JoseFramework\Services\NestedTokenLoaderFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -28,17 +29,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -48,9 +45,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -60,9 +55,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoBuilderIsSet(): void { $this->assertConfigurationIsValid([ @@ -74,9 +67,7 @@ public function theConfigurationIsValidIfNoBuilderIsSet(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoSignatureAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -93,9 +84,7 @@ public function theConfigurationIsInvalidIfNoSignatureAlgorithmIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoKeyEncryptionAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -114,9 +103,7 @@ public function theConfigurationIsInvalidIfNoKeyEncryptionAlgorithmIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoContentEncryptionAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -136,9 +123,7 @@ public function theConfigurationIsInvalidIfNoContentEncryptionAlgorithmIsSet(): ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoJwsSerializerIsSet(): void { $this->assertConfigurationIsInvalid( @@ -159,9 +144,7 @@ public function theConfigurationIsInvalidIfNoJwsSerializerIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoJweSerializerIsSet(): void { $this->assertConfigurationIsInvalid( @@ -183,9 +166,7 @@ public function theConfigurationIsInvalidIfNoJweSerializerIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsValid(): void { $this->assertConfigurationIsValid( diff --git a/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenBuilderTest.php b/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenBuilderTest.php index 006e40140..c3cc6e597 100644 --- a/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenBuilderTest.php +++ b/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenBuilderTest.php @@ -8,6 +8,7 @@ use Jose\Bundle\JoseFramework\Services\NestedTokenLoaderFactory; use Jose\Component\Core\JWK; use Jose\Component\NestedToken\NestedTokenBuilder; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; /** @@ -22,9 +23,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function theNestedTokenBuilderFactoryIsAvailable(): void { static::ensureKernelShutdown(); @@ -34,9 +33,7 @@ public static function theNestedTokenBuilderFactoryIsAvailable(): void static::assertTrue($container->has(NestedTokenBuilderFactory::class)); } - /** - * @test - */ + #[Test] public static function theNestedTokenBuilderFromTheConfigurationIsAvailable(): void { static::ensureKernelShutdown(); @@ -46,9 +43,7 @@ public static function theNestedTokenBuilderFromTheConfigurationIsAvailable(): v static::assertTrue($container->has('jose.nested_token_builder.nested_token_builder_1')); } - /** - * @test - */ + #[Test] public static function theNestedTokenBuilderFromTheConfigurationHelperIsAvailable(): void { static::ensureKernelShutdown(); @@ -58,9 +53,7 @@ public static function theNestedTokenBuilderFromTheConfigurationHelperIsAvailabl static::assertTrue($container->has('jose.nested_token_builder.nested_token_builder_2')); } - /** - * @test - */ + #[Test] public static function aNestedTokenCanBeSignedAndEncryptedUsingTheServiceCreatedFromTheConfiguration(): void { static::ensureKernelShutdown(); @@ -123,9 +116,7 @@ public static function aNestedTokenCanBeSignedAndEncryptedUsingTheServiceCreated ); } - /** - * @test - */ + #[Test] public static function aNestedTokenCanBeSignedAndEncryptedUsingTheServiceCreatedFromTheConfigurationHelper(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenLoaderConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenLoaderConfigurationTest.php index f18281bf9..303e1fa18 100644 --- a/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenLoaderConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenLoaderConfigurationTest.php @@ -12,6 +12,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\Signature\SignatureSource; use Jose\Component\Encryption\JWELoaderFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -28,17 +29,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -48,9 +45,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -60,9 +55,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoLoaderIsSet(): void { $this->assertConfigurationIsValid([ @@ -74,9 +67,7 @@ public function theConfigurationIsValidIfNoLoaderIsSet(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoSignatureAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -93,9 +84,7 @@ public function theConfigurationIsInvalidIfNoSignatureAlgorithmIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoKeyEncryptionAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -114,9 +103,7 @@ public function theConfigurationIsInvalidIfNoKeyEncryptionAlgorithmIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoContentEncryptionAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -136,9 +123,7 @@ public function theConfigurationIsInvalidIfNoContentEncryptionAlgorithmIsSet(): ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoJwsSerializerIsSet(): void { $this->assertConfigurationIsInvalid( @@ -159,9 +144,7 @@ public function theConfigurationIsInvalidIfNoJwsSerializerIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoJweSerializerIsSet(): void { $this->assertConfigurationIsInvalid( @@ -183,9 +166,7 @@ public function theConfigurationIsInvalidIfNoJweSerializerIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsValid(): void { $this->assertConfigurationIsValid( diff --git a/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenLoaderTest.php b/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenLoaderTest.php index 993ea364a..0cf33af60 100644 --- a/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenLoaderTest.php +++ b/tests/Bundle/JoseFramework/Functional/NestedToken/NestedTokenLoaderTest.php @@ -8,6 +8,7 @@ use Jose\Component\Core\JWK; use Jose\Component\Core\JWKSet; use Jose\Component\NestedToken\NestedTokenLoader; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; /** @@ -22,9 +23,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function theNestedTokenLoaderFactoryIsAvailable(): void { static::ensureKernelShutdown(); @@ -34,9 +33,7 @@ public static function theNestedTokenLoaderFactoryIsAvailable(): void static::assertTrue($container->has(NestedTokenLoaderFactory::class)); } - /** - * @test - */ + #[Test] public static function theNestedTokenLoaderFromTheConfigurationIsAvailable(): void { static::ensureKernelShutdown(); @@ -46,9 +43,7 @@ public static function theNestedTokenLoaderFromTheConfigurationIsAvailable(): vo static::assertTrue($container->has('jose.nested_token_loader.nested_token_loader_1')); } - /** - * @test - */ + #[Test] public static function theNestedTokenLoaderFromTheConfigurationHelperIsAvailable(): void { static::ensureKernelShutdown(); @@ -58,9 +53,7 @@ public static function theNestedTokenLoaderFromTheConfigurationHelperIsAvailable static::assertTrue($container->has('jose.nested_token_loader.nested_token_loader_2')); } - /** - * @test - */ + #[Test] public static function aNestedTokenCanBeDecryptedAndVerifiedUsingTheServiceCreatedFromTheConfiguration(): void { static::ensureKernelShutdown(); @@ -110,9 +103,7 @@ public static function aNestedTokenCanBeDecryptedAndVerifiedUsingTheServiceCreat static::assertSame(0, $signature); } - /** - * @test - */ + #[Test] public static function aNestedTokenCanBeDecryptedAndVerifiedUsingTheServiceCreatedFromTheConfigurationHelper(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Serializer/JWEEncoderTest.php b/tests/Bundle/JoseFramework/Functional/Serializer/JWEEncoderTest.php index a70d44809..1354f2c9d 100644 --- a/tests/Bundle/JoseFramework/Functional/Serializer/JWEEncoderTest.php +++ b/tests/Bundle/JoseFramework/Functional/Serializer/JWEEncoderTest.php @@ -13,6 +13,8 @@ use Jose\Component\Encryption\Serializer\CompactSerializer; use Jose\Component\Encryption\Serializer\JWESerializerManager; use Jose\Component\Encryption\Serializer\JWESerializerManagerFactory; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Serializer\Encoder\DecoderInterface; use Symfony\Component\Serializer\Encoder\EncoderInterface; @@ -33,10 +35,8 @@ protected function setUp(): void } } - /** - * @test - * @dataProvider jweFormatDataProvider - */ + #[DataProvider('jweFormatDataProvider')] + #[Test] public function theJWEEncoderSupportsAllFormatsByDefault(string $format, string $serializerId): void { $container = static::getContainer(); @@ -47,10 +47,8 @@ public function theJWEEncoderSupportsAllFormatsByDefault(string $format, string static::assertTrue($serializer->supportsDecoding($format)); } - /** - * @test - * @dataProvider jweFormatDataProvider - */ + #[DataProvider('jweFormatDataProvider')] + #[Test] public function aJWECanBeEncodedInAllFormats(string $format, string $serializerId): void { $container = static::getContainer(); @@ -64,10 +62,8 @@ public function aJWECanBeEncodedInAllFormats(string $format, string $serializerI static::assertSame(0, $this->loadJWE($jweString, $jwk)); } - /** - * @test - * @dataProvider jweFormatDataProvider - */ + #[DataProvider('jweFormatDataProvider')] + #[Test] public function aJWECanBeEncodedWithSpecificRecipient(string $format, string $serializerId): void { $container = static::getContainer(); @@ -92,10 +88,8 @@ public function aJWECanBeEncodedWithSpecificRecipient(string $format, string $se static::assertSame($format === 'jwe_json_general' ? 1 : 0, $this->loadJWE($jweString, $jwk2)); } - /** - * @test - * @dataProvider encoderServiceDataProvider - */ + #[DataProvider('encoderServiceDataProvider')] + #[Test] public function theJWEEncoderThrowsOnNonExistingRecipient(string $serializerId): void { $container = static::getContainer(); @@ -110,9 +104,7 @@ public function theJWEEncoderThrowsOnNonExistingRecipient(string $serializerId): ]); } - /** - * @test - */ + #[Test] public function aJWECanBeEncodedWithCustomSerializerManager(): void { $container = static::getContainer(); @@ -136,9 +128,7 @@ public function aJWECanBeEncodedWithCustomSerializerManager(): void static::assertSame(0, $this->loadJWE($jweString, $jwk)); } - /** - * @test - */ + #[Test] public function theJWEEncoderShouldThrowOnUnsupportedFormatWhenEncoding(): void { $container = static::getContainer(); @@ -154,10 +144,8 @@ public function theJWEEncoderShouldThrowOnUnsupportedFormatWhenEncoding(): void $serializer->encode($jwe, 'jwe_json_flattened'); } - /** - * @test - * @dataProvider jweFormatDataProvider - */ + #[DataProvider('jweFormatDataProvider')] + #[Test] public function aJWECanBeDecodedInAllFormats(string $format, string $serializerId): void { $container = static::getContainer(); @@ -170,9 +158,7 @@ public function aJWECanBeDecodedInAllFormats(string $format, string $serializerI static::assertInstanceOf(JWE::class, $jwe); } - /** - * @test - */ + #[Test] public function theJWEEncoderShouldThrowOnUnsupportedFormatWhenDecoding(): void { $container = static::getContainer(); diff --git a/tests/Bundle/JoseFramework/Functional/Serializer/JWESerializerTest.php b/tests/Bundle/JoseFramework/Functional/Serializer/JWESerializerTest.php index c8a3c8a4f..833a5c973 100644 --- a/tests/Bundle/JoseFramework/Functional/Serializer/JWESerializerTest.php +++ b/tests/Bundle/JoseFramework/Functional/Serializer/JWESerializerTest.php @@ -11,6 +11,8 @@ use Jose\Component\Encryption\JWEBuilderFactory as BaseJWEBuilderFactory; use Jose\Component\Encryption\Serializer\JWESerializerManager; use Jose\Component\Encryption\Serializer\JWESerializerManagerFactory; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; @@ -31,10 +33,8 @@ protected function setUp(): void } } - /** - * @test - * @dataProvider jweFormatDataProvider - */ + #[DataProvider('jweFormatDataProvider')] + #[Test] public function theJWESerializerSupportsAllFormatsByDefault(string $format, string $serializerId): void { $container = static::getContainer(); @@ -43,9 +43,7 @@ public function theJWESerializerSupportsAllFormatsByDefault(string $format, stri static::assertTrue($serializer->supportsDenormalization(null, JWE::class, $format)); } - /** - * @test - */ + #[Test] public static function aJWECannotBeNormalized(): void { $container = static::getContainer(); @@ -57,10 +55,8 @@ public static function aJWECannotBeNormalized(): void static::assertFalse(method_exists($serializer, 'supportsNormalization')); } - /** - * @test - * @dataProvider jweFormatDataProvider - */ + #[DataProvider('jweFormatDataProvider')] + #[Test] public function theJWEDenormalizerPassesThrough(string $format, string $serializerId): void { $container = static::getContainer(); @@ -73,12 +69,10 @@ public function theJWEDenormalizerPassesThrough(string $format, string $serializ static::assertSame($jwe, $serializer->denormalize($jwe, JWE::class, $format)); } - public function serializerServiceDataProvider(): array + public function serializerServiceDataProvider(): iterable { - return [ - 'indirect serializer' => ['serializer'], - 'direct serializer' => [JWESerializer::class], - ]; + yield 'indirect serializer' => ['serializer']; + yield 'direct serializer' => [JWESerializer::class]; } public static function jweFormatDataProvider(): iterable diff --git a/tests/Bundle/JoseFramework/Functional/Serializer/JWSEncoderTest.php b/tests/Bundle/JoseFramework/Functional/Serializer/JWSEncoderTest.php index 2cdfdb71b..f939224ce 100644 --- a/tests/Bundle/JoseFramework/Functional/Serializer/JWSEncoderTest.php +++ b/tests/Bundle/JoseFramework/Functional/Serializer/JWSEncoderTest.php @@ -12,6 +12,8 @@ use Jose\Component\Signature\Serializer\CompactSerializer; use Jose\Component\Signature\Serializer\JWSSerializerManager; use Jose\Component\Signature\Serializer\JWSSerializerManagerFactory; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Serializer\Encoder\DecoderInterface; use Symfony\Component\Serializer\Encoder\EncoderInterface; @@ -32,10 +34,8 @@ protected function setUp(): void } } - /** - * @test - * @dataProvider jwsFormatDataProvider - */ + #[DataProvider('jwsFormatDataProvider')] + #[Test] public function theJWSSerializerSupportsAllFormatsByDefault(string $format, string $serializerId): void { $container = static::getContainer(); @@ -46,10 +46,8 @@ public function theJWSSerializerSupportsAllFormatsByDefault(string $format, stri static::assertTrue($serializer->supportsDecoding($format)); } - /** - * @test - * @dataProvider jwsFormatDataProvider - */ + #[DataProvider('jwsFormatDataProvider')] + #[Test] public function aJWSCanBeEncodedInAllFormats(string $format, string $serializerId): void { $container = static::getContainer(); @@ -67,10 +65,8 @@ public function aJWSCanBeEncodedInAllFormats(string $format, string $serializerI static::assertSame($expected[$format], $jwsString); } - /** - * @test - * @dataProvider jwsFormatDataProvider - */ + #[DataProvider('jwsFormatDataProvider')] + #[Test] public function aJWSCanBeEncodedWithSpecificSignature(string $format, string $serializerId): void { $container = static::getContainer(); @@ -102,9 +98,7 @@ public function aJWSCanBeEncodedWithSpecificSignature(string $format, string $se static::assertSame($expected[$format], $jwsString); } - /** - * @test - */ + #[Test] public static function aJWSCanBeEncodedWithCustomSerializerManager(): void { $container = static::getContainer(); @@ -129,9 +123,7 @@ public static function aJWSCanBeEncodedWithCustomSerializerManager(): void ); } - /** - * @test - */ + #[Test] public function theJWSSerializerShouldThrowOnUnsupportedFormatWhenEncoding(): void { $container = static::getContainer(); @@ -147,10 +139,8 @@ public function theJWSSerializerShouldThrowOnUnsupportedFormatWhenEncoding(): vo $serializer->encode($jws, 'jws_json_flattened'); } - /** - * @test - * @dataProvider jwsFormatDataProvider - */ + #[DataProvider('jwsFormatDataProvider')] + #[Test] public function aJWSCanBeDecodedInAllFormats(string $format, string $serializerId): void { $container = static::getContainer(); @@ -164,9 +154,7 @@ public function aJWSCanBeDecodedInAllFormats(string $format, string $serializerI static::assertEqualsCanonicalizing($jwsData['jws'], $jws); } - /** - * @test - */ + #[Test] public function theJWSSerializerShouldThrowOnUnsupportedFormatWhenDecoding(): void { $container = static::getContainer(); @@ -182,12 +170,10 @@ public function theJWSSerializerShouldThrowOnUnsupportedFormatWhenDecoding(): vo $serializer->decode($jwsString, 'jws_json_flattened'); } - public function serializerServiceDataProvider(): array + public function serializerServiceDataProvider(): iterable { - return [ - 'indirect serializer' => ['serializer'], - 'direct serializer' => [JWSEncoder::class], - ]; + yield 'indirect serializer' => ['serializer']; + yield 'direct serializer' => [JWSEncoder::class]; } public static function jwsFormatDataProvider(): iterable diff --git a/tests/Bundle/JoseFramework/Functional/Serializer/JWSSerializerTest.php b/tests/Bundle/JoseFramework/Functional/Serializer/JWSSerializerTest.php index c160698e0..4ef00a410 100644 --- a/tests/Bundle/JoseFramework/Functional/Serializer/JWSSerializerTest.php +++ b/tests/Bundle/JoseFramework/Functional/Serializer/JWSSerializerTest.php @@ -11,6 +11,8 @@ use Jose\Component\Signature\JWSBuilderFactory as BaseJWSBuilderFactory; use Jose\Component\Signature\Serializer\JWSSerializerManager; use Jose\Component\Signature\Serializer\JWSSerializerManagerFactory; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; @@ -31,10 +33,8 @@ protected function setUp(): void } } - /** - * @test - * @dataProvider jwsFormatDataProvider - */ + #[DataProvider('jwsFormatDataProvider')] + #[Test] public function theJWSSerializerSupportsAllFormatsByDefault(string $format, string $serializerId): void { $container = static::getContainer(); @@ -43,9 +43,7 @@ public function theJWSSerializerSupportsAllFormatsByDefault(string $format, stri static::assertTrue($serializer->supportsDenormalization(null, JWS::class, $format)); } - /** - * @test - */ + #[Test] public static function aJWSCannotBeNormalized(): void { $container = static::getContainer(); @@ -57,10 +55,8 @@ public static function aJWSCannotBeNormalized(): void static::assertFalse(method_exists($serializer, 'supportsNormalization')); } - /** - * @test - * @dataProvider jwsFormatDataProvider - */ + #[DataProvider('jwsFormatDataProvider')] + #[Test] public function theJWSDenormalizerPassesThrough(string $format, string $serializerId): void { $container = static::getContainer(); @@ -73,12 +69,10 @@ public function theJWSDenormalizerPassesThrough(string $format, string $serializ static::assertSame($jws, $serializer->denormalize($jws, JWS::class, $format)); } - public function serializerServiceDataProvider(): array + public function serializerServiceDataProvider(): iterable { - return [ - 'indirect serializer' => ['serializer'], - 'direct serializer' => [JWSSerializer::class], - ]; + yield 'indirect serializer' => ['serializer']; + yield 'direct serializer' => [JWSSerializer::class]; } public static function jwsFormatDataProvider(): iterable diff --git a/tests/Bundle/JoseFramework/Functional/Signature/JWSBuilderTest.php b/tests/Bundle/JoseFramework/Functional/Signature/JWSBuilderTest.php index 91bd63c70..d95d26750 100644 --- a/tests/Bundle/JoseFramework/Functional/Signature/JWSBuilderTest.php +++ b/tests/Bundle/JoseFramework/Functional/Signature/JWSBuilderTest.php @@ -7,6 +7,7 @@ use Jose\Bundle\JoseFramework\Services\JWSBuilder; use Jose\Bundle\JoseFramework\Services\JWSBuilderFactory as JWSBuilderFactoryService; use Jose\Component\Signature\JWSBuilderFactory; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -22,9 +23,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function jWSBuilderFactoryIsAvailable(): void { static::ensureKernelShutdown(); @@ -34,9 +33,7 @@ public static function jWSBuilderFactoryIsAvailable(): void static::assertTrue($container->has(JWSBuilderFactoryService::class)); } - /** - * @test - */ + #[Test] public static function jWSBuilderFactoryCanCreateAJWSBuilder(): void { static::ensureKernelShutdown(); @@ -52,9 +49,7 @@ public static function jWSBuilderFactoryCanCreateAJWSBuilder(): void static::assertInstanceOf(JWSBuilder::class, $jws); } - /** - * @test - */ + #[Test] public static function jWSBuilderFromConfigurationIsAvailable(): void { static::ensureKernelShutdown(); @@ -67,9 +62,7 @@ public static function jWSBuilderFromConfigurationIsAvailable(): void static::assertInstanceOf(JWSBuilder::class, $jws); } - /** - * @test - */ + #[Test] public static function jWSBuilderFromExternalBundleExtensionIsAvailable(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Signature/JWSComputationTest.php b/tests/Bundle/JoseFramework/Functional/Signature/JWSComputationTest.php index 89fb0ceb6..6eb985b81 100644 --- a/tests/Bundle/JoseFramework/Functional/Signature/JWSComputationTest.php +++ b/tests/Bundle/JoseFramework/Functional/Signature/JWSComputationTest.php @@ -9,6 +9,7 @@ use Jose\Component\Signature\JWSBuilderFactory; use Jose\Component\Signature\JWSVerifier; use Jose\Component\Signature\Serializer\CompactSerializer; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -24,9 +25,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function createAndLoadAToken(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Signature/JWSLoaderTest.php b/tests/Bundle/JoseFramework/Functional/Signature/JWSLoaderTest.php index 2d75c36ec..96d10546b 100644 --- a/tests/Bundle/JoseFramework/Functional/Signature/JWSLoaderTest.php +++ b/tests/Bundle/JoseFramework/Functional/Signature/JWSLoaderTest.php @@ -7,6 +7,7 @@ use Jose\Bundle\JoseFramework\Services\JWSLoaderFactory as JWSLoaderFactoryService; use Jose\Component\Signature\JWSLoader; use Jose\Component\Signature\JWSLoaderFactory; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -22,9 +23,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function theJWSLoaderFactoryIsAvailable(): void { static::ensureKernelShutdown(); @@ -34,9 +33,7 @@ public static function theJWSLoaderFactoryIsAvailable(): void static::assertTrue($container->has(JWSLoaderFactoryService::class)); } - /** - * @test - */ + #[Test] public static function theWELoaderFactoryCanCreateAJWSLoader(): void { static::ensureKernelShutdown(); @@ -53,9 +50,7 @@ public static function theWELoaderFactoryCanCreateAJWSLoader(): void static::assertSame(['RS512'], $jws->getJwsVerifier()->getSignatureAlgorithmManager()->list()); } - /** - * @test - */ + #[Test] public static function aJWSLoaderCanBeDefinedUsingTheConfigurationFile(): void { static::ensureKernelShutdown(); @@ -68,9 +63,7 @@ public static function aJWSLoaderCanBeDefinedUsingTheConfigurationFile(): void static::assertInstanceOf(JWSLoader::class, $jws); } - /** - * @test - */ + #[Test] public static function aJWSLoaderCanBeDefinedFromAnotherBundleUsingTheHelper(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Signature/JWSSerializerTest.php b/tests/Bundle/JoseFramework/Functional/Signature/JWSSerializerTest.php index e7a10c615..53982cd6c 100644 --- a/tests/Bundle/JoseFramework/Functional/Signature/JWSSerializerTest.php +++ b/tests/Bundle/JoseFramework/Functional/Signature/JWSSerializerTest.php @@ -6,6 +6,7 @@ use Jose\Component\Signature\JWSBuilderFactory; use Jose\Component\Signature\Serializer\JWSSerializerManager; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -21,9 +22,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function jWSSerializerManagerFromConfigurationIsAvailable(): void { static::ensureKernelShutdown(); @@ -36,9 +35,7 @@ public static function jWSSerializerManagerFromConfigurationIsAvailable(): void static::assertInstanceOf(JWSSerializerManager::class, $jws); } - /** - * @test - */ + #[Test] public static function jWSSerializerManagerFromExternalBundleExtensionIsAvailable(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Signature/JWSVerifierTest.php b/tests/Bundle/JoseFramework/Functional/Signature/JWSVerifierTest.php index 80989d55c..49070543a 100644 --- a/tests/Bundle/JoseFramework/Functional/Signature/JWSVerifierTest.php +++ b/tests/Bundle/JoseFramework/Functional/Signature/JWSVerifierTest.php @@ -7,6 +7,7 @@ use Jose\Bundle\JoseFramework\Services\JWSVerifierFactory as JWSVerifierFactoryService; use Jose\Component\Signature\JWSBuilderFactory; use Jose\Component\Signature\JWSVerifier; +use PHPUnit\Framework\Attributes\Test; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -22,9 +23,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public static function jWSVerifierFactoryIsAvailable(): void { static::ensureKernelShutdown(); @@ -34,9 +33,7 @@ public static function jWSVerifierFactoryIsAvailable(): void static::assertTrue($container->has(JWSVerifierFactoryService::class)); } - /** - * @test - */ + #[Test] public static function jWSVerifierFactoryCanCreateAJWSVerifier(): void { static::ensureKernelShutdown(); @@ -50,9 +47,7 @@ public static function jWSVerifierFactoryCanCreateAJWSVerifier(): void $jwsFactory->create(['none']); } - /** - * @test - */ + #[Test] public static function jWSVerifierFromConfigurationIsAvailable(): void { static::ensureKernelShutdown(); @@ -65,9 +60,7 @@ public static function jWSVerifierFromConfigurationIsAvailable(): void static::assertInstanceOf(JWSVerifier::class, $jws); } - /** - * @test - */ + #[Test] public static function jWSVerifierFromExternalBundleExtensionIsAvailable(): void { static::ensureKernelShutdown(); diff --git a/tests/Bundle/JoseFramework/Functional/Signature/JwsBuilderConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/Signature/JwsBuilderConfigurationTest.php index 58e8f2505..c4d801b0c 100644 --- a/tests/Bundle/JoseFramework/Functional/Signature/JwsBuilderConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/Signature/JwsBuilderConfigurationTest.php @@ -9,6 +9,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\Signature\SignatureSource; use Jose\Component\Signature\JWSBuilderFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -25,17 +26,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -45,9 +42,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -57,9 +52,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfBuilderIsSet(): void { $this->assertConfigurationIsValid([ @@ -71,9 +64,7 @@ public function theConfigurationIsInvalidIfBuilderIsSet(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNotSignatureAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -90,9 +81,7 @@ public function theConfigurationIsInvalidIfNotSignatureAlgorithmIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfTheSignatureAlgorithmIsEmpty(): void { $this->assertConfigurationIsInvalid( diff --git a/tests/Bundle/JoseFramework/Functional/Signature/JwsVerifierConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/Signature/JwsVerifierConfigurationTest.php index d29b9feac..a130265b4 100644 --- a/tests/Bundle/JoseFramework/Functional/Signature/JwsVerifierConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/Signature/JwsVerifierConfigurationTest.php @@ -9,6 +9,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\Signature\SignatureSource; use Jose\Component\Signature\JWSBuilderFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -25,17 +26,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -45,9 +42,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -57,9 +52,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfBuilderIsSet(): void { $this->assertConfigurationIsValid([ @@ -71,9 +64,7 @@ public function theConfigurationIsInvalidIfBuilderIsSet(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNotSignatureAlgorithmIsSet(): void { $this->assertConfigurationIsInvalid( @@ -90,9 +81,7 @@ public function theConfigurationIsInvalidIfNotSignatureAlgorithmIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfTheSignatureAlgorithmIsEmpty(): void { $this->assertConfigurationIsInvalid( diff --git a/tests/Bundle/JoseFramework/Functional/Signature/SerializerConfigurationTest.php b/tests/Bundle/JoseFramework/Functional/Signature/SerializerConfigurationTest.php index 78fa65930..aa72a3bbd 100644 --- a/tests/Bundle/JoseFramework/Functional/Signature/SerializerConfigurationTest.php +++ b/tests/Bundle/JoseFramework/Functional/Signature/SerializerConfigurationTest.php @@ -9,6 +9,7 @@ use Jose\Bundle\JoseFramework\DependencyInjection\Source\Signature\SignatureSource; use Jose\Component\Signature\JWSBuilderFactory; use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -25,17 +26,13 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoConfigurationIsSet(): void { $this->assertConfigurationIsValid([]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsFalse(): void { $this->assertConfigurationIsValid([ @@ -45,9 +42,7 @@ public function theConfigurationIsValidIfConfigurationIsFalse(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfConfigurationIsEmpty(): void { $this->assertConfigurationIsValid([ @@ -57,9 +52,7 @@ public function theConfigurationIsValidIfConfigurationIsEmpty(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsValidIfNoSerializerIsSet(): void { $this->assertConfigurationIsValid([ @@ -71,9 +64,7 @@ public function theConfigurationIsValidIfNoSerializerIsSet(): void ]); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfNoSerializerParameterIsSet(): void { $this->assertConfigurationIsInvalid( @@ -90,9 +81,7 @@ public function theConfigurationIsInvalidIfNoSerializerParameterIsSet(): void ); } - /** - * @test - */ + #[Test] public function theConfigurationIsInvalidIfTheSerializerListIsEmpty(): void { $this->assertConfigurationIsInvalid( diff --git a/tests/Bundle/JoseFramework/TestBundle/Checker/CustomChecker.php b/tests/Bundle/JoseFramework/TestBundle/Checker/CustomChecker.php index 7c7fb79dc..c38483788 100644 --- a/tests/Bundle/JoseFramework/TestBundle/Checker/CustomChecker.php +++ b/tests/Bundle/JoseFramework/TestBundle/Checker/CustomChecker.php @@ -10,9 +10,6 @@ class CustomChecker implements ClaimChecker, HeaderChecker { - /** - * {@inheritdoc} - */ public function checkClaim($value): void { if ($value === true) { @@ -25,9 +22,6 @@ public function supportedClaim(): string return 'custom'; } - /** - * {@inheritdoc} - */ public function checkHeader($value): void { if ($value === true) { diff --git a/tests/Component/Checker/AlgorithmHeaderCheckerTest.php b/tests/Component/Checker/AlgorithmHeaderCheckerTest.php index 906da50aa..b5e5d8b53 100644 --- a/tests/Component/Checker/AlgorithmHeaderCheckerTest.php +++ b/tests/Component/Checker/AlgorithmHeaderCheckerTest.php @@ -6,6 +6,7 @@ use Jose\Component\Checker\AlgorithmChecker; use Jose\Component\Checker\InvalidHeaderException; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -13,9 +14,7 @@ */ final class AlgorithmHeaderCheckerTest extends TestCase { - /** - * @test - */ + #[Test] public function anAlgorithmMustBeAString(): void { $this->expectException(InvalidHeaderException::class); @@ -25,9 +24,7 @@ public function anAlgorithmMustBeAString(): void $checker->checkHeader(1); } - /** - * @test - */ + #[Test] public function theAlgorithmHeaderIsNotAllowed(): void { $this->expectException(InvalidHeaderException::class); @@ -37,9 +34,7 @@ public function theAlgorithmHeaderIsNotAllowed(): void $checker->checkHeader('bar'); } - /** - * @test - */ + #[Test] public function theAlgorithmHeaderIsSupported(): void { $checker = new AlgorithmChecker(['foo']); diff --git a/tests/Component/Checker/AudienceClaimCheckerTest.php b/tests/Component/Checker/AudienceClaimCheckerTest.php index 03e14809c..9dfbd8574 100644 --- a/tests/Component/Checker/AudienceClaimCheckerTest.php +++ b/tests/Component/Checker/AudienceClaimCheckerTest.php @@ -6,6 +6,7 @@ use Jose\Component\Checker\AudienceChecker; use Jose\Component\Checker\InvalidClaimException; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -13,9 +14,7 @@ */ final class AudienceClaimCheckerTest extends TestCase { - /** - * @test - */ + #[Test] public function anAudienceClaimMustBeAStringOrAnArrayOfStrings(): void { $this->expectException(InvalidClaimException::class); @@ -25,9 +24,7 @@ public function anAudienceClaimMustBeAStringOrAnArrayOfStrings(): void $checker->checkClaim(1); } - /** - * @test - */ + #[Test] public function theAudienceClaimIsNotKnown(): void { $this->expectException(InvalidClaimException::class); @@ -37,9 +34,7 @@ public function theAudienceClaimIsNotKnown(): void $checker->checkClaim('bar'); } - /** - * @test - */ + #[Test] public function theAudienceClaimListDoesNotContainTheCurrentAudience(): void { $this->expectException(InvalidClaimException::class); @@ -49,9 +44,7 @@ public function theAudienceClaimListDoesNotContainTheCurrentAudience(): void $checker->checkClaim(['bar']); } - /** - * @test - */ + #[Test] public function theAudienceClaimIsSupported(): void { $checker = new AudienceChecker('foo'); diff --git a/tests/Component/Checker/AudienceHeaderCheckerTest.php b/tests/Component/Checker/AudienceHeaderCheckerTest.php index 32fa02672..787b7b481 100644 --- a/tests/Component/Checker/AudienceHeaderCheckerTest.php +++ b/tests/Component/Checker/AudienceHeaderCheckerTest.php @@ -6,6 +6,7 @@ use Jose\Component\Checker\AudienceChecker; use Jose\Component\Checker\InvalidHeaderException; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -13,9 +14,7 @@ */ final class AudienceHeaderCheckerTest extends TestCase { - /** - * @test - */ + #[Test] public function anAudienceHeaderMustBeAStringOrAnArrayOfStrings(): void { $this->expectException(InvalidHeaderException::class); @@ -25,9 +24,7 @@ public function anAudienceHeaderMustBeAStringOrAnArrayOfStrings(): void $checker->checkHeader(1); } - /** - * @test - */ + #[Test] public function theAudienceHeaderIsNotKnown(): void { $this->expectException(InvalidHeaderException::class); @@ -37,9 +34,7 @@ public function theAudienceHeaderIsNotKnown(): void $checker->checkHeader('bar'); } - /** - * @test - */ + #[Test] public function theAudienceHeaderListDoesNotContainTheCurrentAudience(): void { $this->expectException(InvalidHeaderException::class); @@ -49,9 +44,7 @@ public function theAudienceHeaderListDoesNotContainTheCurrentAudience(): void $checker->checkHeader(['bar']); } - /** - * @test - */ + #[Test] public function theAudienceHeaderIsSupported(): void { $checker = new AudienceChecker('foo'); diff --git a/tests/Component/Checker/ClaimCheckerManagerFactoryTest.php b/tests/Component/Checker/ClaimCheckerManagerFactoryTest.php index e5b6d5f80..ddb125ab8 100644 --- a/tests/Component/Checker/ClaimCheckerManagerFactoryTest.php +++ b/tests/Component/Checker/ClaimCheckerManagerFactoryTest.php @@ -12,6 +12,7 @@ use Jose\Component\Checker\MissingMandatoryClaimException; use Jose\Component\Checker\NotBeforeChecker; use Jose\Tests\Component\Checker\Stub\MockClock; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use Psr\Clock\ClockInterface; @@ -22,17 +23,13 @@ final class ClaimCheckerManagerFactoryTest extends TestCase { private ?ClaimCheckerManagerFactory $claimCheckerManagerFactory = null; - /** - * @test - */ + #[Test] public function theAliasListOfTheClaimCheckerManagerFactoryIsAvailable(): void { static::assertSame(['exp', 'iat', 'nbf', 'aud'], $this->getClaimCheckerManagerFactory()->aliases()); } - /** - * @test - */ + #[Test] public function theAliasDoesNotExist(): void { $this->expectException(InvalidArgumentException::class); @@ -42,9 +39,7 @@ public function theAliasDoesNotExist(): void ->create(['foo']); } - /** - * @test - */ + #[Test] public function iCanCreateAClaimCheckerManager(): void { $manager = $this->getClaimCheckerManagerFactory() @@ -52,9 +47,7 @@ public function iCanCreateAClaimCheckerManager(): void static::assertCount(4, $manager->getCheckers()); } - /** - * @test - */ + #[Test] public function iCanCheckValidPayloadClaims(): void { $clock = new MockClock(); @@ -74,9 +67,7 @@ public function iCanCheckValidPayloadClaims(): void static::assertSame($expected, $result); } - /** - * @test - */ + #[Test] public function theMandatoryClaimsAreNotSet(): void { $this->expectException(MissingMandatoryClaimException::class); diff --git a/tests/Component/Checker/ClaimCheckerManagerTest.php b/tests/Component/Checker/ClaimCheckerManagerTest.php index b183c97d1..0a3660e82 100644 --- a/tests/Component/Checker/ClaimCheckerManagerTest.php +++ b/tests/Component/Checker/ClaimCheckerManagerTest.php @@ -6,6 +6,7 @@ use Jose\Component\Checker\AudienceChecker; use Jose\Component\Checker\ClaimCheckerManager; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -13,9 +14,7 @@ */ final class ClaimCheckerManagerTest extends TestCase { - /** - * @test - */ + #[Test] public function getCheckers(): void { $checkers = [new AudienceChecker('some-expected-audience')]; diff --git a/tests/Component/Checker/ExpirationTimeClaimCheckerTest.php b/tests/Component/Checker/ExpirationTimeClaimCheckerTest.php index 2ad71657a..5229c111d 100644 --- a/tests/Component/Checker/ExpirationTimeClaimCheckerTest.php +++ b/tests/Component/Checker/ExpirationTimeClaimCheckerTest.php @@ -7,6 +7,7 @@ use Jose\Component\Checker\ExpirationTimeChecker; use Jose\Component\Checker\InvalidClaimException; use Jose\Tests\Component\Checker\Stub\MockClock; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -14,9 +15,7 @@ */ final class ExpirationTimeClaimCheckerTest extends TestCase { - /** - * @test - */ + #[Test] public function theExpirationTimeClaimMustBeAnInteger(): void { $this->expectException(InvalidClaimException::class); @@ -27,9 +26,7 @@ public function theExpirationTimeClaimMustBeAnInteger(): void $checker->checkClaim('foo'); } - /** - * @test - */ + #[Test] public function theExpirationTimeIsInThePast(): void { $this->expectException(InvalidClaimException::class); @@ -40,9 +37,7 @@ public function theExpirationTimeIsInThePast(): void $checker->checkClaim($clock->now()->getTimestamp() - 1); } - /** - * @test - */ + #[Test] public function theExpirationTimeIsInTheFutur(): void { $clock = new MockClock(); diff --git a/tests/Component/Checker/HeaderCheckerManagerFactoryTest.php b/tests/Component/Checker/HeaderCheckerManagerFactoryTest.php index 0dccaf4c6..0fee14a29 100644 --- a/tests/Component/Checker/HeaderCheckerManagerFactoryTest.php +++ b/tests/Component/Checker/HeaderCheckerManagerFactoryTest.php @@ -13,6 +13,8 @@ use Jose\Tests\Component\Checker\Stub\OtherToken; use Jose\Tests\Component\Checker\Stub\Token; use Jose\Tests\Component\Checker\Stub\TokenSupport; +use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -22,17 +24,13 @@ final class HeaderCheckerManagerFactoryTest extends TestCase { private ?HeaderCheckerManagerFactory $headerCheckerManagerFactory = null; - /** - * @test - */ + #[Test] public function theAliasListOfTheHeaderCheckerManagerFactoryIsAvailable(): void { static::assertSame(['aud', 'iss'], $this->getHeaderCheckerManagerFactory()->aliases()); } - /** - * @test - */ + #[Test] public function aHeaderMustNotContainDuplicatedHeaderParameters(): void { $this->expectException(InvalidArgumentException::class); @@ -52,9 +50,7 @@ public function aHeaderMustNotContainDuplicatedHeaderParameters(): void $headerCheckerManager->check($token, 0); } - /** - * @test - */ + #[Test] public function theTokenHasCriticalHeaderNotSatisfied(): void { $this->expectException(InvalidHeaderException::class); @@ -74,10 +70,8 @@ public function theTokenHasCriticalHeaderNotSatisfied(): void $headerCheckerManager->check($token, 0); } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function theHeaderIsSuccessfullyChecked(): void { $headerCheckerManager = $this->getHeaderCheckerManagerFactory() @@ -94,9 +88,7 @@ public function theHeaderIsSuccessfullyChecked(): void $headerCheckerManager->check($token, 0); } - /** - * @test - */ + #[Test] public function theCriticalHeaderParameterMustBeProtected(): void { $this->expectException(InvalidHeaderException::class); @@ -115,9 +107,7 @@ public function theCriticalHeaderParameterMustBeProtected(): void $headerCheckerManager->check($token, 0); } - /** - * @test - */ + #[Test] public function theCriticalHeaderParameterMustBeAListOfHeaderParameters(): void { $this->expectException(InvalidHeaderException::class); @@ -135,10 +125,8 @@ public function theCriticalHeaderParameterMustBeAListOfHeaderParameters(): void $headerCheckerManager->check($token, 0); } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function theHeaderContainsUnknownParametersAndIsSuccessfullyChecked(): void { $headerCheckerManager = $this->getHeaderCheckerManagerFactory() @@ -153,9 +141,7 @@ public function theHeaderContainsUnknownParametersAndIsSuccessfullyChecked(): vo $headerCheckerManager->check($token, 0); } - /** - * @test - */ + #[Test] public function theHeaderDoesNotContainSomeMandatoryParameters(): void { $this->expectException(MissingMandatoryHeaderParameterException::class); @@ -175,9 +161,7 @@ public function theHeaderDoesNotContainSomeMandatoryParameters(): void $headerCheckerManager->check($token, 0, ['aud', 'iss', 'mandatory']); } - /** - * @test - */ + #[Test] public function iTryToCheckATokenThatIsNotSupported(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/Component/Checker/IssuedAtClaimCheckerTest.php b/tests/Component/Checker/IssuedAtClaimCheckerTest.php index 5f5da950e..2096cd1c5 100644 --- a/tests/Component/Checker/IssuedAtClaimCheckerTest.php +++ b/tests/Component/Checker/IssuedAtClaimCheckerTest.php @@ -7,6 +7,7 @@ use Jose\Component\Checker\InvalidClaimException; use Jose\Component\Checker\IssuedAtChecker; use Jose\Tests\Component\Checker\Stub\MockClock; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -14,9 +15,7 @@ */ final class IssuedAtClaimCheckerTest extends TestCase { - /** - * @test - */ + #[Test] public function anIssuedAtClaimMustBeAnInteger(): void { $this->expectException(InvalidClaimException::class); @@ -27,9 +26,7 @@ public function anIssuedAtClaimMustBeAnInteger(): void $checker->checkClaim('foo'); } - /** - * @test - */ + #[Test] public function theIssuedAtClaimIsInTheFutur(): void { $this->expectException(InvalidClaimException::class); @@ -40,9 +37,7 @@ public function theIssuedAtClaimIsInTheFutur(): void $checker->checkClaim($clock->now()->getTimestamp() + 3600); } - /** - * @test - */ + #[Test] public function theIssuedAtClaimIsInThePast(): void { $clock = new MockClock(); diff --git a/tests/Component/Checker/NotBeforeClaimCheckerTest.php b/tests/Component/Checker/NotBeforeClaimCheckerTest.php index e80d33365..ecc52e409 100644 --- a/tests/Component/Checker/NotBeforeClaimCheckerTest.php +++ b/tests/Component/Checker/NotBeforeClaimCheckerTest.php @@ -7,6 +7,7 @@ use Jose\Component\Checker\InvalidClaimException; use Jose\Component\Checker\NotBeforeChecker; use Jose\Tests\Component\Checker\Stub\MockClock; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -14,9 +15,7 @@ */ final class NotBeforeClaimCheckerTest extends TestCase { - /** - * @test - */ + #[Test] public function theNotBeforeClaimMustBeAnInteger(): void { $this->expectException(InvalidClaimException::class); @@ -27,9 +26,7 @@ public function theNotBeforeClaimMustBeAnInteger(): void $checker->checkClaim('foo'); } - /** - * @test - */ + #[Test] public function theNotBeforeClaimIsInTheFutur(): void { $this->expectException(InvalidClaimException::class); @@ -40,9 +37,7 @@ public function theNotBeforeClaimIsInTheFutur(): void $checker->checkClaim($clock->now()->getTimestamp() + 3600); } - /** - * @test - */ + #[Test] public function theNotBeforeClaimIsInThePast(): void { $clock = new MockClock(); diff --git a/tests/Component/Checker/UnencodedPayloadHeaderCheckerTest.php b/tests/Component/Checker/UnencodedPayloadHeaderCheckerTest.php index ff0a0a586..750c1ff6f 100644 --- a/tests/Component/Checker/UnencodedPayloadHeaderCheckerTest.php +++ b/tests/Component/Checker/UnencodedPayloadHeaderCheckerTest.php @@ -6,6 +6,7 @@ use Jose\Component\Checker\InvalidHeaderException; use Jose\Component\Checker\UnencodedPayloadChecker; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -13,9 +14,7 @@ */ final class UnencodedPayloadHeaderCheckerTest extends TestCase { - /** - * @test - */ + #[Test] public function theB64HeaderMustBeAnBoolean(): void { $this->expectException(InvalidHeaderException::class); @@ -25,9 +24,7 @@ public function theB64HeaderMustBeAnBoolean(): void $checker->checkHeader('foo'); } - /** - * @test - */ + #[Test] public function theB64HeaderIsABoolean(): void { $checker = new UnencodedPayloadChecker(); diff --git a/tests/Component/Console/AnalyzeCommandTest.php b/tests/Component/Console/AnalyzeCommandTest.php index b98de2550..3b55ca023 100644 --- a/tests/Component/Console/AnalyzeCommandTest.php +++ b/tests/Component/Console/AnalyzeCommandTest.php @@ -19,6 +19,7 @@ use Jose\Component\KeyManagement\Analyzer\OctAnalyzer; use Jose\Component\KeyManagement\Analyzer\RsaAnalyzer; use Jose\Component\KeyManagement\Analyzer\UsageAnalyzer; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; @@ -32,9 +33,7 @@ final class AnalyzeCommandTest extends TestCase private ?KeysetAnalyzerManager $keysetAnalyzerManager = null; - /** - * @test - */ + #[Test] public function iCanAnalyzeAKeyAndGetInformation(): void { $jwk = new JWK([ @@ -55,9 +54,7 @@ public function iCanAnalyzeAKeyAndGetInformation(): void static::assertStringContainsString('* The parameter "use" should be added.', $content); } - /** - * @test - */ + #[Test] public function iCanAnalyzeAKeySetAndGetInformation(): void { $keyset = JWKSet::createFromKeyData([ diff --git a/tests/Component/Console/KeyConversionCommandTest.php b/tests/Component/Console/KeyConversionCommandTest.php index d6d238683..01e8eeadd 100644 --- a/tests/Component/Console/KeyConversionCommandTest.php +++ b/tests/Component/Console/KeyConversionCommandTest.php @@ -15,6 +15,8 @@ use Jose\Component\Core\JWK; use Jose\Component\Core\JWKSet; use Jose\Component\Core\Util\JsonConverter; +use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\BufferedOutput; @@ -24,10 +26,8 @@ */ final class KeyConversionCommandTest extends TestCase { - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function iCanLoadAKeyFile(): void { $input = new ArrayInput([ @@ -40,10 +40,8 @@ public function iCanLoadAKeyFile(): void JWK::createFromJson($content); } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function iCanLoadAnEncryptedKeyFile(): void { $input = new ArrayInput([ @@ -57,10 +55,8 @@ public function iCanLoadAnEncryptedKeyFile(): void JWK::createFromJson($content); } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function iCanLoadAPKCS12CertificateFile(): never { static::markTestIncomplete('Unable to run this test using the last OpenSSL versions'); @@ -75,10 +71,8 @@ public function iCanLoadAPKCS12CertificateFile(): never JWK::createFromJson($content); } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function iCanLoadAX509CertificateFile(): void { $input = new ArrayInput([ @@ -91,9 +85,7 @@ public function iCanLoadAX509CertificateFile(): void JWK::createFromJson($content); } - /** - * @test - */ + #[Test] public function iCanOptimizeARsaKey(): void { $jwk = new JWK([ @@ -118,9 +110,7 @@ public function iCanOptimizeARsaKey(): void static::assertTrue($jwk->has('qi')); } - /** - * @test - */ + #[Test] public function iCanConvertARsaKeyIntoPKCS1(): void { $jwk = new JWK([ @@ -145,9 +135,7 @@ public function iCanConvertARsaKeyIntoPKCS1(): void static::assertStringContainsString('-----BEGIN PRIVATE KEY-----', $content); } - /** - * @test - */ + #[Test] public function iCanConvertAnEcKeyIntoPKCS1(): void { $jwk = new JWK([ @@ -168,9 +156,7 @@ public function iCanConvertAnEcKeyIntoPKCS1(): void static::assertStringContainsString('-----BEGIN EC PRIVATE KEY-----', $content); } - /** - * @test - */ + #[Test] public function iCanConvertAPrivateKeyIntoPublicKey(): void { $jwk = new JWK([ @@ -194,9 +180,7 @@ public function iCanConvertAPrivateKeyIntoPublicKey(): void ); } - /** - * @test - */ + #[Test] public function iCanConvertPrivateKeysIntoPublicKeys(): void { $keyset = JWKSet::createFromKeyData([ @@ -229,9 +213,7 @@ public function iCanConvertPrivateKeysIntoPublicKeys(): void ); } - /** - * @test - */ + #[Test] public function iCanGetTheThumbprintOfAKey(): void { $jwk = new JWK([ diff --git a/tests/Component/Console/KeyCreationCommandTest.php b/tests/Component/Console/KeyCreationCommandTest.php index 313f036eb..3dc3b4251 100644 --- a/tests/Component/Console/KeyCreationCommandTest.php +++ b/tests/Component/Console/KeyCreationCommandTest.php @@ -13,6 +13,8 @@ use Jose\Component\Console\SecretKeyGeneratorCommand; use Jose\Component\Core\JWK; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use RuntimeException; use Symfony\Component\Console\Input\ArrayInput; @@ -23,9 +25,7 @@ */ final class KeyCreationCommandTest extends TestCase { - /** - * @test - */ + #[Test] public function theEllipticCurveKeyCreationCommandIsAvailable(): void { $command = new EcKeyGeneratorCommand(); @@ -33,9 +33,7 @@ public function theEllipticCurveKeyCreationCommandIsAvailable(): void static::assertTrue($command->isEnabled()); } - /** - * @test - */ + #[Test] public function theEllipticCurveKeyCreationCommandNeedTheCurveArgument(): void { $this->expectException(RuntimeException::class); @@ -48,9 +46,7 @@ public function theEllipticCurveKeyCreationCommandNeedTheCurveArgument(): void $command->run($input, $output); } - /** - * @test - */ + #[Test] public function iCannotCreateAnEllipticCurveKeyWithAnUnsupportedCurve(): void { $this->expectException(InvalidArgumentException::class); @@ -65,10 +61,8 @@ public function iCannotCreateAnEllipticCurveKeyWithAnUnsupportedCurve(): void $command->run($input, $output); } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function iCanCreateAnEllipticCurveKeyWithCurveP256(): void { $input = new ArrayInput([ @@ -83,9 +77,7 @@ public function iCanCreateAnEllipticCurveKeyWithCurveP256(): void JWK::createFromJson($content); } - /** - * @test - */ + #[Test] public function iCannotCreateAnOctetKeyWithoutKeySize(): void { $this->expectException(RuntimeException::class); @@ -98,10 +90,8 @@ public function iCannotCreateAnOctetKeyWithoutKeySize(): void $command->run($input, $output); } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function iCanCreateAnOctetKey(): void { $input = new ArrayInput([ @@ -116,9 +106,7 @@ public function iCanCreateAnOctetKey(): void JWK::createFromJson($content); } - /** - * @test - */ + #[Test] public function iCanCreateAnOctetKeyUsingASecret(): void { $input = new ArrayInput([ @@ -134,9 +122,7 @@ public function iCanCreateAnOctetKeyUsingASecret(): void static::assertSame('This is my secret', Base64UrlSafe::decode($jwk->get('k'))); } - /** - * @test - */ + #[Test] public function iCanCreateAnOctetKeyUsingABinarySecret(): void { $secret = random_bytes(20); @@ -155,9 +141,7 @@ public function iCanCreateAnOctetKeyUsingABinarySecret(): void static::assertSame($secret, Base64UrlSafe::decode($jwk->get('k'))); } - /** - * @test - */ + #[Test] public function iCannotCreateAnOctetKeyPairWithoutKeyCurve(): void { $this->expectException(RuntimeException::class); @@ -170,10 +154,8 @@ public function iCannotCreateAnOctetKeyPairWithoutKeyCurve(): void $command->run($input, $output); } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function iCanCreateAnOctetKeyPair(): void { $input = new ArrayInput([ @@ -188,10 +170,8 @@ public function iCanCreateAnOctetKeyPair(): void JWK::createFromJson($content); } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function iCanCreateANoneKey(): void { $input = new ArrayInput([ @@ -205,9 +185,7 @@ public function iCanCreateANoneKey(): void JWK::createFromJson($content); } - /** - * @test - */ + #[Test] public function iCannotCreateAnRsaKeyWithoutKeySize(): void { $this->expectException(RuntimeException::class); @@ -220,10 +198,8 @@ public function iCannotCreateAnRsaKeyWithoutKeySize(): void $command->run($input, $output); } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function iCanCreateAnRsaKey(): void { $input = new ArrayInput([ diff --git a/tests/Component/Console/KeySetCreationCommandTest.php b/tests/Component/Console/KeySetCreationCommandTest.php index 1ca8c4f15..76427db44 100644 --- a/tests/Component/Console/KeySetCreationCommandTest.php +++ b/tests/Component/Console/KeySetCreationCommandTest.php @@ -10,6 +10,7 @@ use Jose\Component\Console\OkpKeysetGeneratorCommand; use Jose\Component\Console\RsaKeysetGeneratorCommand; use Jose\Component\Core\JWKSet; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use RuntimeException; use Symfony\Component\Console\Input\ArrayInput; @@ -20,9 +21,7 @@ */ final class KeySetCreationCommandTest extends TestCase { - /** - * @test - */ + #[Test] public function theEllipticCurveKeySetCreationCommandIsAvailable(): void { $command = new EcKeysetGeneratorCommand(); @@ -30,9 +29,7 @@ public function theEllipticCurveKeySetCreationCommandIsAvailable(): void static::assertTrue($command->isEnabled()); } - /** - * @test - */ + #[Test] public function theEllipticCurveKeySetCreationCommandNeedTheCurveAndQuantityArguments(): void { $this->expectException(RuntimeException::class); @@ -45,9 +42,7 @@ public function theEllipticCurveKeySetCreationCommandNeedTheCurveAndQuantityArgu $command->run($input, $output); } - /** - * @test - */ + #[Test] public function iCannotCreateAnEllipticCurveKeySetWithAnUnsupportedCurve(): void { $this->expectException(InvalidArgumentException::class); @@ -63,9 +58,7 @@ public function iCannotCreateAnEllipticCurveKeySetWithAnUnsupportedCurve(): void $command->run($input, $output); } - /** - * @test - */ + #[Test] public function iCanCreateAnEllipticCurveKeySetWithCurveP256(): void { $input = new ArrayInput([ @@ -82,9 +75,7 @@ public function iCanCreateAnEllipticCurveKeySetWithCurveP256(): void static::assertCount(2, $jwkset, 'Invalid number of keys in the keyset'); } - /** - * @test - */ + #[Test] public function iCannotCreateAnOctetKeySetWithoutKeySetSize(): void { $this->expectException(RuntimeException::class); @@ -102,9 +93,7 @@ public function iCannotCreateAnOctetKeySetWithoutKeySetSize(): void static::assertCount(2, $jwkset, 'Invalid number of keys in the keyset'); } - /** - * @test - */ + #[Test] public function iCanCreateAnOctetKeySet(): void { $input = new ArrayInput([ @@ -121,9 +110,7 @@ public function iCanCreateAnOctetKeySet(): void static::assertCount(2, $jwkset, 'Invalid number of keys in the keyset'); } - /** - * @test - */ + #[Test] public function iCannotCreateAnOctetKeySetPairWithoutKeySetCurve(): void { $this->expectException(RuntimeException::class); @@ -138,9 +125,7 @@ public function iCannotCreateAnOctetKeySetPairWithoutKeySetCurve(): void $command->run($input, $output); } - /** - * @test - */ + #[Test] public function iCanCreateAnOctetKeySetPair(): void { $input = new ArrayInput([ @@ -157,9 +142,7 @@ public function iCanCreateAnOctetKeySetPair(): void static::assertCount(2, $jwkset, 'Invalid number of keys in the keyset'); } - /** - * @test - */ + #[Test] public function iCannotCreateAnRsaKeySetWithoutKeySetSize(): void { $this->expectException(RuntimeException::class); @@ -174,9 +157,7 @@ public function iCannotCreateAnRsaKeySetWithoutKeySetSize(): void $command->run($input, $output); } - /** - * @test - */ + #[Test] public function iCanCreateAnRsaKeySet(): void { $input = new ArrayInput([ diff --git a/tests/Component/Core/AlgorithmManagerFactoryTest.php b/tests/Component/Core/AlgorithmManagerFactoryTest.php index 961c79d67..ab3612b67 100644 --- a/tests/Component/Core/AlgorithmManagerFactoryTest.php +++ b/tests/Component/Core/AlgorithmManagerFactoryTest.php @@ -7,6 +7,7 @@ use InvalidArgumentException; use Jose\Component\Core\AlgorithmManager; use Jose\Component\Core\AlgorithmManagerFactory; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use TypeError; @@ -17,18 +18,14 @@ final class AlgorithmManagerFactoryTest extends TestCase { private ?AlgorithmManagerFactory $algorithmManagerFactory = null; - /** - * @test - */ + #[Test] public function iCanListSupportedAliases(): void { static::assertSame(['foo'], $this->getAlgorithmManagerFactory()->aliases()); static::assertSame(['foo'], array_keys($this->getAlgorithmManagerFactory()->all())); } - /** - * @test - */ + #[Test] public function iCannotCreateAnAlgorithmManagerWithABadArgument(): void { $this->expectException(TypeError::class); @@ -36,9 +33,7 @@ public function iCannotCreateAnAlgorithmManagerWithABadArgument(): void new AlgorithmManager(['foo']); } - /** - * @test - */ + #[Test] public function iCannotGetAnAlgorithmThatDoesNotExist(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/Component/Core/JWKSetTest.php b/tests/Component/Core/JWKSetTest.php index c5644933d..ae280d3ca 100644 --- a/tests/Component/Core/JWKSetTest.php +++ b/tests/Component/Core/JWKSetTest.php @@ -7,17 +7,16 @@ use InvalidArgumentException; use Jose\Component\Core\JWK; use Jose\Component\Core\JWKSet; -use const JSON_THROW_ON_ERROR; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use const JSON_THROW_ON_ERROR; /** * @internal */ final class JWKSetTest extends TestCase { - /** - * @test - */ + #[Test] public function iCanSelectAKeyInAKeySet(): void { $jwkset = $this->getPublicKeySet(); @@ -26,9 +25,7 @@ public function iCanSelectAKeyInAKeySet(): void static::assertInstanceOf(JWK::class, $jwk); } - /** - * @test - */ + #[Test] public function iCannotSelectAKeyFromAKeySetWithUnsupportedUsageParameter(): void { $this->expectException(InvalidArgumentException::class); @@ -38,9 +35,7 @@ public function iCannotSelectAKeyFromAKeySetWithUnsupportedUsageParameter(): voi $jwkset->selectKey('foo'); } - /** - * @test - */ + #[Test] public function iCannotCreateAKeySetWithBadArguments(): void { $this->expectException(InvalidArgumentException::class); @@ -51,18 +46,14 @@ public function iCannotCreateAKeySetWithBadArguments(): void ]); } - /** - * @test - */ + #[Test] public function iCanGetAllKeysInAKeySet(): void { $jwkset = $this->getPublicKeySet(); static::assertCount(3, $jwkset->all()); } - /** - * @test - */ + #[Test] public function iCanAddKeysInAKeySet(): void { $jwkset = $this->getPublicKeySet(); @@ -73,29 +64,22 @@ public function iCanAddKeysInAKeySet(): void static::assertNotSame($jwkset, $new_jwkset); } - /** - * @test - */ + #[Test] public function iCanSelectAKeyWithAlgorithm(): void { $jwkset = $this->getPublicKeySet(); $jwk = $jwkset->selectKey('enc', new FooAlgorithm()); static::assertInstanceOf(JWK::class, $jwk); - static::assertSame( - [ - 'kid' => '71ee230371d19630bc17fb90ccf20ae632ad8cf8', - 'kty' => 'FOO', - 'alg' => 'foo', - 'use' => 'enc', - ], - $jwk->all() - ); + static::assertSame([ + 'kid' => '71ee230371d19630bc17fb90ccf20ae632ad8cf8', + 'kty' => 'FOO', + 'alg' => 'foo', + 'use' => 'enc', + ], $jwk->all()); } - /** - * @test - */ + #[Test] public function iCanSelectAKeyWithAlgorithmAndKeyId(): void { $jwkset = $this->getPublicKeySet(); @@ -104,20 +88,15 @@ public function iCanSelectAKeyWithAlgorithmAndKeyId(): void 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', ]); static::assertInstanceOf(JWK::class, $jwk); - static::assertSame( - [ - 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', - 'kty' => 'FOO', - 'alg' => 'foo', - 'use' => 'sig', - ], - $jwk->all() - ); + static::assertSame([ + 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', + 'kty' => 'FOO', + 'alg' => 'foo', + 'use' => 'sig', + ], $jwk->all()); } - /** - * @test - */ + #[Test] public function iCanSelectAKeyWithWithKeyId(): void { $jwkset = $this->getPublicKeySet(); @@ -126,20 +105,15 @@ public function iCanSelectAKeyWithWithKeyId(): void 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', ]); static::assertInstanceOf(JWK::class, $jwk); - static::assertSame( - [ - 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', - 'kty' => 'FOO', - 'alg' => 'foo', - 'use' => 'sig', - ], - $jwk->all() - ); + static::assertSame([ + 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', + 'kty' => 'FOO', + 'alg' => 'foo', + 'use' => 'sig', + ], $jwk->all()); } - /** - * @test - */ + #[Test] public function theKeySetDoesNotContainsSuitableAKeyThatFitsOnTheRequirements(): void { $jwkset = $this->getPublicKeySet(); @@ -150,9 +124,7 @@ public function theKeySetDoesNotContainsSuitableAKeyThatFitsOnTheRequirements(): static::assertNull($jwk); } - /** - * @test - */ + #[Test] public function iCanCreateAKeySetUsingValues(): void { $values = [ @@ -169,9 +141,7 @@ public function iCanCreateAKeySetUsingValues(): void static::assertFalse($jwkset->has(0)); } - /** - * @test - */ + #[Test] public function keySet(): void { $jwk1 = new JWK([ @@ -225,9 +195,7 @@ public function keySet(): void static::assertSame(0, $jwkset->count()); } - /** - * @test - */ + #[Test] public function keySet2(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/Component/Core/JWKTest.php b/tests/Component/Core/JWKTest.php index 1dfe701ee..49a1f05ef 100644 --- a/tests/Component/Core/JWKTest.php +++ b/tests/Component/Core/JWKTest.php @@ -7,17 +7,16 @@ use InvalidArgumentException; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\ECKey; -use const JSON_THROW_ON_ERROR; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use const JSON_THROW_ON_ERROR; /** * @internal */ final class JWKTest extends TestCase { - /** - * @test - */ + #[Test] public function aKeyContainsAllExpectedParameters(): void { $jwk = new JWK([ @@ -52,9 +51,7 @@ public function aKeyContainsAllExpectedParameters(): void static::assertSame('dqwHnan4iJ1_eEll-o4Egw', $jwk->thumbprint('md5')); } - /** - * @test - */ + #[Test] public function iCannotGetTheThumbprintOfTheKeyWhenIUseAnUnsupportedHashingAlgorithm(): void { $this->expectException(InvalidArgumentException::class); @@ -74,9 +71,7 @@ public function iCannotGetTheThumbprintOfTheKeyWhenIUseAnUnsupportedHashingAlgor $jwk->thumbprint('foo'); } - /** - * @test - */ + #[Test] public function iMustSetAtLeastTheKtyParameter(): void { $this->expectException(InvalidArgumentException::class); @@ -85,9 +80,7 @@ public function iMustSetAtLeastTheKtyParameter(): void new JWK([]); } - /** - * @test - */ + #[Test] public function iCannotGetAParameterThatDoesNotExist(): void { $this->expectException(InvalidArgumentException::class); @@ -107,9 +100,7 @@ public function iCannotGetAParameterThatDoesNotExist(): void $jwk->get('ABCD'); } - /** - * @test - */ + #[Test] public function iCanConvertAPrivateKeyIntoPublicKey(): void { $private = new JWK([ @@ -138,10 +129,7 @@ public function iCanConvertAPrivateKeyIntoPublicKey(): void ]), json_encode($public, JSON_THROW_ON_ERROR)); } - /** - * @test - * @see https://github.com/web-token/jwt-framework/issues/475 - */ + #[Test] public static function convertToPEM(): void { // Given diff --git a/tests/Component/Core/JsonConverterTest.php b/tests/Component/Core/JsonConverterTest.php index 791640e82..304fa3a88 100644 --- a/tests/Component/Core/JsonConverterTest.php +++ b/tests/Component/Core/JsonConverterTest.php @@ -5,6 +5,7 @@ namespace Jose\Tests\Component\Core; use Jose\Component\Core\Util\JsonConverter; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -12,9 +13,7 @@ */ final class JsonConverterTest extends TestCase { - /** - * @test - */ + #[Test] public function iCanConvertAnObjectIntoAJsonString(): void { static::assertSame('{"foo":"BAR"}', JsonConverter::encode([ diff --git a/tests/Component/Encryption/CompressionTestCase.php b/tests/Component/Encryption/CompressionTestCase.php index 5237816cd..7645fa184 100644 --- a/tests/Component/Encryption/CompressionTestCase.php +++ b/tests/Component/Encryption/CompressionTestCase.php @@ -7,6 +7,7 @@ use InvalidArgumentException; use Jose\Component\Encryption\Compression\CompressionMethodManager; use Jose\Component\Encryption\Compression\Deflate; +use PHPUnit\Framework\Attributes\Test; /** * Class CompressionTest. @@ -15,9 +16,7 @@ */ final class CompressionTestCase extends EncryptionTestCase { - /** - * @test - */ + #[Test] public function getValidCompressionAlgorithm(): void { $manager = new CompressionMethodManager([new Deflate()]); @@ -26,9 +25,7 @@ public function getValidCompressionAlgorithm(): void $manager->get('DEF'); } - /** - * @test - */ + #[Test] public function getInvalidCompressionAlgorithm(): void { $this->expectException(InvalidArgumentException::class); @@ -39,9 +36,7 @@ public function getInvalidCompressionAlgorithm(): void $manager->get('FOO'); } - /** - * @test - */ + #[Test] public function deflate(): void { $compression = new Deflate(9); @@ -53,9 +48,7 @@ public function deflate(): void static::assertSame($data, $uncompressed); } - /** - * @test - */ + #[Test] public function deflateInvalidCompressionLevel(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/Component/Encryption/ECDHESWithX25519EncryptionTestCase.php b/tests/Component/Encryption/ECDHESWithX25519EncryptionTestCase.php index 29bda1dda..938807974 100644 --- a/tests/Component/Encryption/ECDHESWithX25519EncryptionTestCase.php +++ b/tests/Component/Encryption/ECDHESWithX25519EncryptionTestCase.php @@ -5,6 +5,7 @@ namespace Jose\Tests\Component\Encryption; use Jose\Component\Core\JWK; +use PHPUnit\Framework\Attributes\Test; /** * Class ECDHESWithX25519EncryptionTest. @@ -15,9 +16,8 @@ final class ECDHESWithX25519EncryptionTestCase extends EncryptionTestCase { /** * @see https://tools.ietf.org/html/rfc7516#appendix-B - * - * @test */ + #[Test] public function a128CBCHS256EncryptAndDecrypt(): void { $receiverKey = new JWK([ diff --git a/tests/Component/Encryption/EncrypterTestCase.php b/tests/Component/Encryption/EncrypterTestCase.php index d1a11a84d..4344ffe30 100644 --- a/tests/Component/Encryption/EncrypterTestCase.php +++ b/tests/Component/Encryption/EncrypterTestCase.php @@ -7,17 +7,16 @@ use InvalidArgumentException; use Jose\Component\Core\JWK; use Jose\Component\Core\JWKSet; -use const JSON_THROW_ON_ERROR; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; +use const JSON_THROW_ON_ERROR; /** * @internal */ final class EncrypterTestCase extends EncryptionTestCase { - /** - * @test - */ + #[Test] public function encryptWithJWTInput(): void { $jweBuilder = $this->getJWEBuilderFactory() @@ -52,9 +51,7 @@ public function encryptWithJWTInput(): void static::assertSame('FOO', $loaded->getPayload()); } - /** - * @test - */ + #[Test] public function duplicatedHeader(): void { $this->expectException(InvalidArgumentException::class); @@ -76,9 +73,7 @@ public function duplicatedHeader(): void ]); } - /** - * @test - */ + #[Test] public function createCompactJWEUsingFactory(): void { $jweBuilder = $this->getJWEBuilderFactory() @@ -112,9 +107,7 @@ public function createCompactJWEUsingFactory(): void static::assertSame('FOO', $loaded->getPayload()); } - /** - * @test - */ + #[Test] public function createFlattenedJWEUsingFactory(): void { $jweBuilder = $this->getJWEBuilderFactory() @@ -157,9 +150,7 @@ public function createFlattenedJWEUsingFactory(): void static::assertSame('FOO', $loaded->getPayload()); } - /** - * @test - */ + #[Test] public function encryptAndLoadFlattenedWithAAD(): void { $jweBuilder = $this->getJWEBuilderFactory() @@ -197,9 +188,7 @@ public function encryptAndLoadFlattenedWithAAD(): void ); } - /** - * @test - */ + #[Test] public function compressionAlgorithmNotSupported(): void { $this->expectException(InvalidArgumentException::class); @@ -223,9 +212,7 @@ public function compressionAlgorithmNotSupported(): void ->serialize('jwe_json_flattened', $jwe, 0); } - /** - * @test - */ + #[Test] public function foreignKeyManagementModeForbidden(): void { $this->expectException(InvalidArgumentException::class); @@ -251,9 +238,7 @@ public function foreignKeyManagementModeForbidden(): void ->build(); } - /** - * @test - */ + #[Test] public function operationNotAllowedForTheKey(): void { $this->expectException(InvalidArgumentException::class); @@ -274,9 +259,7 @@ public function operationNotAllowedForTheKey(): void ->build(); } - /** - * @test - */ + #[Test] public function algorithmNotAllowedForTheKey(): void { $this->expectException(InvalidArgumentException::class); @@ -297,9 +280,7 @@ public function algorithmNotAllowedForTheKey(): void ->build(); } - /** - * @test - */ + #[Test] public function encryptAndLoadFlattenedWithDeflateCompression(): void { $jweBuilder = $this->getJWEBuilderFactory() @@ -337,9 +318,7 @@ public function encryptAndLoadFlattenedWithDeflateCompression(): void ); } - /** - * @test - */ + #[Test] public function algParameterIsMissing(): void { $this->expectException(InvalidArgumentException::class); @@ -360,9 +339,7 @@ public function algParameterIsMissing(): void ->build(); } - /** - * @test - */ + #[Test] public function encParameterIsMissing(): void { $this->expectException(InvalidArgumentException::class); @@ -383,9 +360,7 @@ public function encParameterIsMissing(): void ->build(); } - /** - * @test - */ + #[Test] public function notAKeyEncryptionAlgorithm(): void { $this->expectException(InvalidArgumentException::class); @@ -409,9 +384,7 @@ public function notAKeyEncryptionAlgorithm(): void ->build(); } - /** - * @test - */ + #[Test] public function notAContentEncryptionAlgorithm(): void { $this->expectException(InvalidArgumentException::class); @@ -435,9 +408,7 @@ public function notAContentEncryptionAlgorithm(): void ->build(); } - /** - * @test - */ + #[Test] public function encryptAndLoadCompactWithDirectKeyEncryption(): void { $jweBuilder = $this->getJWEBuilderFactory() @@ -474,9 +445,7 @@ public function encryptAndLoadCompactWithDirectKeyEncryption(): void ); } - /** - * @test - */ + #[Test] public function encryptAndLoadCompactKeyAgreement(): void { $jweBuilder = $this->getJWEBuilderFactory() @@ -514,9 +483,7 @@ public function encryptAndLoadCompactKeyAgreement(): void static::assertSame($payload, $loaded->getPayload()); } - /** - * @test - */ + #[Test] public function encryptAndLoadCompactKeyAgreementWithWrappingCompact(): void { $jweBuilder = $this->getJWEBuilderFactory() @@ -552,9 +519,7 @@ public function encryptAndLoadCompactKeyAgreementWithWrappingCompact(): void static::assertSame('Live long and Prosper.', $loaded->getPayload()); } - /** - * @test - */ + #[Test] public function encryptAndLoadWithGCMAndAAD(): void { $jweBuilder = $this->getJWEBuilderFactory() @@ -591,9 +556,7 @@ public function encryptAndLoadWithGCMAndAAD(): void static::assertSame('Live long and Prosper.', $loaded->getPayload()); } - /** - * @test - */ + #[Test] public function encryptAndLoadCompactKeyAgreementWithWrapping(): void { $jweBuilder = $this->getJWEBuilderFactory() diff --git a/tests/Component/Encryption/InvalidCurveAttackTestCase.php b/tests/Component/Encryption/InvalidCurveAttackTestCase.php index 75f75ac81..7bb6cb3f4 100644 --- a/tests/Component/Encryption/InvalidCurveAttackTestCase.php +++ b/tests/Component/Encryption/InvalidCurveAttackTestCase.php @@ -5,15 +5,14 @@ namespace Jose\Tests\Component\Encryption; use Jose\Component\Core\JWK; +use PHPUnit\Framework\Attributes\Test; /** * @internal */ final class InvalidCurveAttackTestCase extends EncryptionTestCase { - /** - * @test - */ + #[Test] public function curveCheckNegativeP256AttackPt1(): void { $maliciousJWE = 'eyJhbGciOiJFQ0RILUVTK0ExMjhLVyIsImVuYyI6IkExMjhDQkMtSFMyNTYiLCJlcGsiOnsia3R5IjoiRUMiLCJ4IjoiZ1RsaTY1ZVRRN3otQmgxNDdmZjhLM203azJVaURpRzJMcFlrV0FhRkpDYyIsInkiOiJjTEFuakthNGJ6akQ3REpWUHdhOUVQclJ6TUc3ck9OZ3NpVUQta2YzMEZzIiwiY3J2IjoiUC0yNTYifX0.qGAdxtEnrV_3zbIxU2ZKrMWcejNltjA_dtefBFnRh9A2z9cNIqYRWg.pEA5kX304PMCOmFSKX_cEg.a9fwUrx2JXi1OnWEMOmZhXd94-bEGCH9xxRwqcGuG2AMo-AwHoljdsH5C_kcTqlXS5p51OB1tvgQcMwB5rpTxg.72CHiYFecyDvuUa43KKT6w'; @@ -33,9 +32,7 @@ public function curveCheckNegativeP256AttackPt1(): void static::assertFalse($jweDecrypter->decryptUsingKey($loaded_compact_json, $privateKey, 0)); } - /** - * @test - */ + #[Test] public function curveCheckNegativeP256AttackPt2(): void { // The malicious JWE contains a public key with order 2447 diff --git a/tests/Component/Encryption/JWEFlattenedTestCase.php b/tests/Component/Encryption/JWEFlattenedTestCase.php index 2c6347edc..8b23d58d5 100644 --- a/tests/Component/Encryption/JWEFlattenedTestCase.php +++ b/tests/Component/Encryption/JWEFlattenedTestCase.php @@ -6,6 +6,7 @@ use Jose\Component\Core\JWKSet; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @internal @@ -14,9 +15,8 @@ final class JWEFlattenedTestCase extends EncryptionTestCase { /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.5 - * - * @test */ + #[Test] public function loadFlattenedJWE(): void { $jweDecrypter = $this->getJWEDecrypterFactory() diff --git a/tests/Component/Encryption/JWELoaderTestCase.php b/tests/Component/Encryption/JWELoaderTestCase.php index f88172679..c4a98134c 100644 --- a/tests/Component/Encryption/JWELoaderTestCase.php +++ b/tests/Component/Encryption/JWELoaderTestCase.php @@ -7,6 +7,7 @@ use Exception; use Jose\Component\Core\JWK; use Jose\Component\Encryption\JWELoader; +use PHPUnit\Framework\Attributes\Test; /** * Class JWELoaderTest. @@ -17,9 +18,7 @@ final class JWELoaderTestCase extends EncryptionTestCase { private ?JWELoader $jweLoader = null; - /** - * @test - */ + #[Test] public function theFlattenedTokenCannotBeLoaded(): void { $this->expectException(Exception::class); @@ -39,9 +38,7 @@ public function theFlattenedTokenCannotBeLoaded(): void ->loadAndDecryptWithKey($token, $key, $recipient); } - /** - * @test - */ + #[Test] public function theTokenCannotBeVerifiedBecauseOfAnUnsupportedAlgorithm(): void { $this->expectException(Exception::class); @@ -61,9 +58,7 @@ public function theTokenCannotBeVerifiedBecauseOfAnUnsupportedAlgorithm(): void ->loadAndDecryptWithKey($token, $key, $recipient); } - /** - * @test - */ + #[Test] public function theTokenCannotBeVerifiedBecauseOfABadKey(): void { $this->expectException(Exception::class); @@ -83,9 +78,7 @@ public function theTokenCannotBeVerifiedBecauseOfABadKey(): void ->loadAndDecryptWithKey($token, $key, $recipient); } - /** - * @test - */ + #[Test] public function theJweLoaderCanLoadAndDecryptAToken(): void { $token = 'eyJhbGciOiJBMTI4S1ciLCJraWQiOiI4MWIyMDk2NS04MzMyLTQzZDktYTQ2OC04MjE2MGFkOTFhYzgiLCJlbmMiOiJBMTI4R0NNIn0.CBI6oDw8MydIx1IBntf_lQcw2MmJKIQx.Qx0pmsDa8KnJc9Jo.AwliP-KmWgsZ37BvzCefNen6VTbRK3QMA4TkvRkH0tP1bTdhtFJgJxeVmJkLD61A1hnWGetdg11c9ADsnWgL56NyxwSYjU1ZEHcGkd3EkU0vjHi9gTlb90qSYFfeF0LwkcTtjbYKCsiNJQkcIp1yeM03OmuiYSoYJVSpf7ej6zaYcMv3WwdxDFl8REwOhNImk2Xld2JXq6BR53TSFkyT7PwVLuq-1GwtGHlQeg7gDT6xW0JqHDPn_H-puQsmthc9Zg0ojmJfqqFvETUxLAF-KjcBTS5dNy6egwkYtOt8EIHK-oEsKYtZRaa8Z7MOZ7UGxGIMvEmxrGCPeJa14slv2-gaqK0kEThkaSqdYw0FkQZF.ER7MWJZ1FBI_NKvn7Zb1Lw'; diff --git a/tests/Component/Encryption/JWESplitTestCase.php b/tests/Component/Encryption/JWESplitTestCase.php index bbdcbe570..9113aeee7 100644 --- a/tests/Component/Encryption/JWESplitTestCase.php +++ b/tests/Component/Encryption/JWESplitTestCase.php @@ -5,15 +5,14 @@ namespace Jose\Tests\Component\Encryption; use Jose\Component\Encryption\Serializer\JSONGeneralSerializer; +use PHPUnit\Framework\Attributes\Test; /** * @internal */ final class JWESplitTestCase extends EncryptionTestCase { - /** - * @test - */ + #[Test] public function aJweObjectWithMoreThanOneRecipientCanBeSplittedIntoSeveralJweObjects(): void { $input = '{"recipients":[{"encrypted_key":"dYOD28kab0Vvf4ODgxVAJXgHcSZICSOp8M51zjwj4w6Y5G4XJQsNNIBiqyvUUAOcpL7S7-cFe7Pio7gV_Q06WmCSa-vhW6me4bWrBf7cHwEQJdXihidAYWVajJIaKMXMvFRMV6iDlRr076DFthg2_AV0_tSiV6xSEIFqt1xnYPpmP91tc5WJDOGb-wqjw0-b-S1laS11QVbuP78dQ7Fa0zAVzzjHX-xvyM2wxj_otxr9clN1LnZMbeYSrRicJK5xodvWgkpIdkMHo4LvdhRRvzoKzlic89jFWPlnBq_V4n5trGuExtp_-dbHcGlihqc_wGgho9fLMK8JOArYLcMDNQ","header":{"alg":"RSA1_5","kid":"frodo.baggins@hobbiton.example"}},{"encrypted_key":"ExInT0io9BqBMYF6-maw5tZlgoZXThD1zWKsHixJuw_elY4gSSId_w","header":{"alg":"ECDH-ES+A256KW","kid":"peregrin.took@tuckborough.example","epk":{"kty":"EC","crv":"P-384","x":"Uzdvk3pi5wKCRc1izp5_r0OjeqT-I68i8g2b8mva8diRhsE2xAn2DtMRb25Ma2CX","y":"VDrRyFJh-Kwd1EjAgmj5Eo-CTHAZ53MC7PjjpLioy3ylEjI1pOMbw91fzZ84pbfm"}}},{"encrypted_key":"a7CclAejo_7JSuPB8zeagxXRam8dwCfmkt9-WyTpS1E","header":{"alg":"A256GCMKW","kid":"18ec08e1-bfa9-4d95-b205-2b4dd1d4321d","tag":"59Nqh1LlYtVIhfD3pgRGvw","iv":"AvpeoPZ9Ncn9mkBn"}}],"unprotected":{"cty":"text/plain"},"protected":"eyJlbmMiOiJBMTI4Q0JDLUhTMjU2In0","iv":"VgEIHY20EnzUtZFl2RpB1g","ciphertext":"ajm2Q-OpPXCr7-MHXicknb1lsxLdXxK_yLds0KuhJzfWK04SjdxQeSw2L9mu3a_k1C55kCQ_3xlkcVKC5yr__Is48VOoK0k63_QRM9tBURMFqLByJ8vOYQX0oJW4VUHJLmGhF-tVQWB7Kz8mr8zeE7txF0MSaP6ga7-siYxStR7_G07Thd1jh-zGT0wxM5g-VRORtq0K6AXpLlwEqRp7pkt2zRM0ZAXqSpe1O6FJ7FHLDyEFnD-zDIZukLpCbzhzMDLLw2-8I14FQrgi-iEuzHgIJFIJn2wh9Tj0cg_kOZy9BqMRZbmYXMY9YQjorZ_P_JYG3ARAIF3OjDNqpdYe-K_5Q5crGJSDNyij_ygEiItR5jssQVH2ofDQdLChtazE","tag":"BESYyFN7T09KY7i8zKs5_g"}'; diff --git a/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionProtectedContentOnlyTestCase.php b/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionProtectedContentOnlyTestCase.php index dd99007dc..30b1b7df9 100644 --- a/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionProtectedContentOnlyTestCase.php +++ b/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionProtectedContentOnlyTestCase.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.12 @@ -18,9 +19,8 @@ final class A128KWAndA128GCMEncryptionProtectedContentOnlyTestCase extends Encry /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function a128KWAndA128GCMEncryptionProtectedContentOnly(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -88,9 +88,8 @@ public function a128KWAndA128GCMEncryptionProtectedContentOnly(): void /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function a128KWAndA128GCMEncryptionProtectedContentOnlyBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; diff --git a/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionTestCase.php b/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionTestCase.php index 4618b5970..404898f0b 100644 --- a/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionTestCase.php +++ b/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionTestCase.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.8 @@ -18,9 +19,8 @@ final class A128KWAndA128GCMEncryptionTestCase extends EncryptionTestCase /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function a128KWAndA128GCMEncryption(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -62,10 +62,7 @@ public function a128KWAndA128GCMEncryption(): void ->unserialize($expected_json); static::assertTrue($jweDecrypter->decryptUsingKey($loaded_json, $private_key, 0)); - static::assertSame( - $expected_ciphertext, - Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext()) - ); + static::assertSame($expected_ciphertext, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext())); static::assertSame($protectedHeader, $loaded_compact_json->getSharedProtectedHeader()); static::assertSame($expected_iv, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getIV())); static::assertSame( @@ -102,9 +99,8 @@ public function a128KWAndA128GCMEncryption(): void /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function a128KWAndA128GCMEncryptionBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; diff --git a/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithAdditionalAuthenticatedDataTestCase.php b/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithAdditionalAuthenticatedDataTestCase.php index 4f8e0a610..7e9243de4 100644 --- a/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithAdditionalAuthenticatedDataTestCase.php +++ b/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithAdditionalAuthenticatedDataTestCase.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.10 @@ -18,9 +19,8 @@ final class A128KWAndA128GCMEncryptionWithAdditionalAuthenticatedDataTestCase ex /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function a128KWAndA128GCMEncryptionWithAdditionalAuthenticatedData(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -87,9 +87,8 @@ public function a128KWAndA128GCMEncryptionWithAdditionalAuthenticatedData(): voi /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function a128KWAndA128GCMEncryptionWithAdditionalAuthenticatedDataBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; diff --git a/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithCompressionTestCase.php b/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithCompressionTestCase.php index 9c3914b66..6d0634348 100644 --- a/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithCompressionTestCase.php +++ b/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithCompressionTestCase.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.9 @@ -18,9 +19,8 @@ final class A128KWAndA128GCMEncryptionWithCompressionTestCase extends Encryption /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function a128KWAndA128GCMEncryptionWithCompression(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -63,10 +63,7 @@ public function a128KWAndA128GCMEncryptionWithCompression(): void ->unserialize($expected_json); static::assertTrue($jweDecrypter->decryptUsingKey($loaded_json, $private_key, 0)); - static::assertSame( - $expected_ciphertext, - Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext()) - ); + static::assertSame($expected_ciphertext, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext())); static::assertSame($protectedHeader, $loaded_compact_json->getSharedProtectedHeader()); static::assertSame($expected_iv, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getIV())); static::assertSame( @@ -103,9 +100,8 @@ public function a128KWAndA128GCMEncryptionWithCompression(): void /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function a128KWAndA128GCMEncryptionWithCompressionBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; diff --git a/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithSpecificProtectedHeaderValuesTestCase.php b/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithSpecificProtectedHeaderValuesTestCase.php index 985a17bbb..cbc6f2fc4 100644 --- a/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithSpecificProtectedHeaderValuesTestCase.php +++ b/tests/Component/Encryption/RFC7520/A128KWAndA128GCMEncryptionWithSpecificProtectedHeaderValuesTestCase.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.11 @@ -18,9 +19,8 @@ final class A128KWAndA128GCMEncryptionWithSpecificProtectedHeaderValuesTestCase /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function a128KWAndA128GCMEncryptionWithSpecificProtectedHeaderValues(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -89,9 +89,8 @@ public function a128KWAndA128GCMEncryptionWithSpecificProtectedHeaderValues(): v /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function a128KWAndA128GCMEncryptionWithSpecificProtectedHeaderValuesBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; diff --git a/tests/Component/Encryption/RFC7520/A256GCMKWAndA128CBC_HS256EncryptionTestCase.php b/tests/Component/Encryption/RFC7520/A256GCMKWAndA128CBC_HS256EncryptionTestCase.php index a8345925c..aba8e934e 100644 --- a/tests/Component/Encryption/RFC7520/A256GCMKWAndA128CBC_HS256EncryptionTestCase.php +++ b/tests/Component/Encryption/RFC7520/A256GCMKWAndA128CBC_HS256EncryptionTestCase.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.7 @@ -18,9 +19,8 @@ final class A256GCMKWAndA128CBC_HS256EncryptionTestCase extends EncryptionTestCa /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function a256GCMKWAndA128CBCHS256Encryption(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -70,10 +70,7 @@ public function a256GCMKWAndA128CBCHS256Encryption(): void ->unserialize($expected_json); static::assertTrue($jweDecrypter->decryptUsingKey($loaded_json, $private_key, 0)); - static::assertSame( - $expected_ciphertext, - Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext()) - ); + static::assertSame($expected_ciphertext, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext())); static::assertSame($protectedHeader, $loaded_compact_json->getSharedProtectedHeader()); static::assertSame($expected_iv, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getIV())); static::assertSame( @@ -110,9 +107,8 @@ public function a256GCMKWAndA128CBCHS256Encryption(): void /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function a256GCMKWAndA128CBCHS256EncryptionBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; diff --git a/tests/Component/Encryption/RFC7520/DirAndA128GCMEncryptionTestCase.php b/tests/Component/Encryption/RFC7520/DirAndA128GCMEncryptionTestCase.php index 82dc46fdb..a95337b22 100644 --- a/tests/Component/Encryption/RFC7520/DirAndA128GCMEncryptionTestCase.php +++ b/tests/Component/Encryption/RFC7520/DirAndA128GCMEncryptionTestCase.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.6 @@ -18,9 +19,8 @@ final class DirAndA128GCMEncryptionTestCase extends EncryptionTestCase /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function dirAndA128GCMEncryption(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -56,10 +56,7 @@ public function dirAndA128GCMEncryption(): void ->unserialize($expected_json); static::assertTrue($jweDecrypter->decryptUsingKey($loaded_json, $private_key, 0)); - static::assertSame( - $expected_ciphertext, - Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext()) - ); + static::assertSame($expected_ciphertext, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext())); static::assertSame($protectedHeader, $loaded_compact_json->getSharedProtectedHeader()); static::assertSame($expected_iv, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getIV())); static::assertSame($expected_tag, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getTag())); @@ -75,9 +72,8 @@ public function dirAndA128GCMEncryption(): void /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function dirAndA128GCMEncryptionBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; diff --git a/tests/Component/Encryption/RFC7520/ECDH_ES_A128KWAndA128GCMEncryptionTestCase.php b/tests/Component/Encryption/RFC7520/ECDH_ES_A128KWAndA128GCMEncryptionTestCase.php index 933c27ea8..fae61ff56 100644 --- a/tests/Component/Encryption/RFC7520/ECDH_ES_A128KWAndA128GCMEncryptionTestCase.php +++ b/tests/Component/Encryption/RFC7520/ECDH_ES_A128KWAndA128GCMEncryptionTestCase.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.4 @@ -18,9 +19,8 @@ final class ECDH_ES_A128KWAndA128GCMEncryptionTestCase extends EncryptionTestCas /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function eCDHESA128KWAndA128GCMEncryption(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -70,10 +70,7 @@ public function eCDHESA128KWAndA128GCMEncryption(): void ->unserialize($expected_json); static::assertTrue($jweDecrypter->decryptUsingKey($loaded_json, $private_key, 0)); - static::assertSame( - $expected_ciphertext, - Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext()) - ); + static::assertSame($expected_ciphertext, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext())); static::assertSame($protectedHeader, $loaded_compact_json->getSharedProtectedHeader()); static::assertSame($expected_iv, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getIV())); static::assertSame( @@ -110,9 +107,8 @@ public function eCDHESA128KWAndA128GCMEncryption(): void /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function eCDHESA128KWAndA128GCMEncryptionBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; diff --git a/tests/Component/Encryption/RFC7520/ECDH_ES_AndA128CBC_HS256EncryptionTestCase.php b/tests/Component/Encryption/RFC7520/ECDH_ES_AndA128CBC_HS256EncryptionTestCase.php index f616d5d3f..c7db6afa2 100644 --- a/tests/Component/Encryption/RFC7520/ECDH_ES_AndA128CBC_HS256EncryptionTestCase.php +++ b/tests/Component/Encryption/RFC7520/ECDH_ES_AndA128CBC_HS256EncryptionTestCase.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.5 @@ -18,9 +19,8 @@ final class ECDH_ES_AndA128CBC_HS256EncryptionTestCase extends EncryptionTestCas /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function eCDHESAndA128CBCHS256Encryption(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -62,10 +62,7 @@ public function eCDHESAndA128CBCHS256Encryption(): void $loaded_json = $this->getJWESerializerManager() ->unserialize($expected_json); - static::assertSame( - $expected_ciphertext, - Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext()) - ); + static::assertSame($expected_ciphertext, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext())); static::assertSame($protectedHeader, $loaded_compact_json->getSharedProtectedHeader()); static::assertSame($expected_iv, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getIV())); static::assertSame($expected_tag, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getTag())); @@ -84,9 +81,8 @@ public function eCDHESAndA128CBCHS256Encryption(): void /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function eCDHESAndA128CBCHS256EncryptionBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; diff --git a/tests/Component/Encryption/RFC7520/MultipleRecipientEncryptionTestCase.php b/tests/Component/Encryption/RFC7520/MultipleRecipientEncryptionTestCase.php index fff06317b..fad444262 100644 --- a/tests/Component/Encryption/RFC7520/MultipleRecipientEncryptionTestCase.php +++ b/tests/Component/Encryption/RFC7520/MultipleRecipientEncryptionTestCase.php @@ -8,6 +8,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.13 @@ -19,9 +20,8 @@ final class MultipleRecipientEncryptionTestCase extends EncryptionTestCase /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function multipleRecipientEncryption(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -138,9 +138,8 @@ public function multipleRecipientEncryption(): void /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function multipleRecipientEncryptionBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -246,9 +245,7 @@ public function multipleRecipientEncryptionBis(): void static::assertSame($expected_payload, $loaded_json->getPayload()); } - /** - * @test - */ + #[Test] public function multipleRecipientEncryptionWithDifferentContentEncryptionAlgorithm(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/Component/Encryption/RFC7520/PBES2_HS512_A256KWAndA128CBC_HS256EncryptionTestCase.php b/tests/Component/Encryption/RFC7520/PBES2_HS512_A256KWAndA128CBC_HS256EncryptionTestCase.php index 6f6f0e7f1..5cc1c8315 100644 --- a/tests/Component/Encryption/RFC7520/PBES2_HS512_A256KWAndA128CBC_HS256EncryptionTestCase.php +++ b/tests/Component/Encryption/RFC7520/PBES2_HS512_A256KWAndA128CBC_HS256EncryptionTestCase.php @@ -6,8 +6,9 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; -use const JSON_THROW_ON_ERROR; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; +use const JSON_THROW_ON_ERROR; /** * @see https://tools.ietf.org/html/rfc7520#section-5.3 @@ -19,9 +20,8 @@ final class PBES2_HS512_A256KWAndA128CBC_HS256EncryptionTestCase extends Encrypt /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function pBES2HS512A256KWAndA128CBCHS256Encryption(): void { $expected_payload = [ @@ -85,10 +85,7 @@ public function pBES2HS512A256KWAndA128CBCHS256Encryption(): void ->unserialize($expected_json); static::assertTrue($jweDecrypter->decryptUsingKey($loaded_json, $private_key, 0)); - static::assertSame( - $expected_ciphertext, - Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext()) - ); + static::assertSame($expected_ciphertext, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext())); static::assertSame($protectedHeader, $loaded_compact_json->getSharedProtectedHeader()); static::assertSame($expected_iv, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getIV())); static::assertSame( @@ -134,9 +131,8 @@ public function pBES2HS512A256KWAndA128CBCHS256Encryption(): void /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function pBES2HS512A256KWAndA128CBCHS256EncryptionBis(): void { $expected_payload = json_encode([ diff --git a/tests/Component/Encryption/RFC7520/RSA1_5AndA128CBC_HS256EncryptionTestCase.php b/tests/Component/Encryption/RFC7520/RSA1_5AndA128CBC_HS256EncryptionTestCase.php index 687cd0657..0d1cabf85 100644 --- a/tests/Component/Encryption/RFC7520/RSA1_5AndA128CBC_HS256EncryptionTestCase.php +++ b/tests/Component/Encryption/RFC7520/RSA1_5AndA128CBC_HS256EncryptionTestCase.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.1 @@ -18,9 +19,8 @@ final class RSA1_5AndA128CBC_HS256EncryptionTestCase extends EncryptionTestCase /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function rSA15AndA128CBCHS256Encryption(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -68,10 +68,7 @@ public function rSA15AndA128CBCHS256Encryption(): void ->unserialize($expected_json); static::assertTrue($jweDecrypter->decryptUsingKey($loaded_json, $private_key, 0)); - static::assertSame( - $expected_ciphertext, - Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext()) - ); + static::assertSame($expected_ciphertext, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext())); static::assertSame($protectedHeader, $loaded_compact_json->getSharedProtectedHeader()); static::assertSame($expected_iv, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getIV())); static::assertSame( @@ -108,9 +105,8 @@ public function rSA15AndA128CBCHS256Encryption(): void /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function rSA15AndA128CBCHS256EncryptionBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; diff --git a/tests/Component/Encryption/RFC7520/RSA_OAEPAndA256GCMEncryptionTestCase.php b/tests/Component/Encryption/RFC7520/RSA_OAEPAndA256GCMEncryptionTestCase.php index 2e7e6cfdd..dd731d6d9 100644 --- a/tests/Component/Encryption/RFC7520/RSA_OAEPAndA256GCMEncryptionTestCase.php +++ b/tests/Component/Encryption/RFC7520/RSA_OAEPAndA256GCMEncryptionTestCase.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Encryption\EncryptionTestCase; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-5.2 @@ -18,9 +19,8 @@ final class RSA_OAEPAndA256GCMEncryptionTestCase extends EncryptionTestCase /** * Please note that we cannot the encryption and get the same result as the example (IV, TAG and other data are * always different). The output given in the RFC is used and only decrypted. - * - * @test */ + #[Test] public function rSAOAEPAndA256GCMEncryption(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; @@ -69,10 +69,7 @@ public function rSAOAEPAndA256GCMEncryption(): void ->unserialize($expected_json); static::assertTrue($jweDecrypter->decryptUsingKey($loaded_json, $private_key, 0)); - static::assertSame( - $expected_ciphertext, - Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext()) - ); + static::assertSame($expected_ciphertext, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getCiphertext())); static::assertSame($protectedHeader, $loaded_compact_json->getSharedProtectedHeader()); static::assertSame($expected_iv, Base64UrlSafe::encodeUnpadded($loaded_compact_json->getIV())); static::assertSame( @@ -109,9 +106,8 @@ public function rSAOAEPAndA256GCMEncryption(): void /** * Same input as before, but we perform the encryption first. - * - * @test */ + #[Test] public function rSAOAEPAndA256GCMEncryptionBis(): void { $expected_payload = "You can trust us to stick with you through thick and thin\xe2\x80\x93to the bitter end. And you can trust us to keep any secret of yours\xe2\x80\x93closer than you keep it yourself. But you cannot trust us to let you face trouble alone, and go off without a word. We are your friends, Frodo."; diff --git a/tests/Component/Encryption/RSAEncryptionTestCase.php b/tests/Component/Encryption/RSAEncryptionTestCase.php index a75b6b901..ae0781481 100644 --- a/tests/Component/Encryption/RSAEncryptionTestCase.php +++ b/tests/Component/Encryption/RSAEncryptionTestCase.php @@ -5,6 +5,7 @@ namespace Jose\Tests\Component\Encryption; use Jose\Component\Core\JWKSet; +use PHPUnit\Framework\Attributes\Test; /** * @internal @@ -13,9 +14,8 @@ final class RSAEncryptionTestCase extends EncryptionTestCase { /** * @see https://tools.ietf.org/html/rfc7516 - * - * @test */ + #[Test] public function loadJWEFromRFC7516(): void { $jweDecrypter = $this->getJWEDecrypterFactory() @@ -35,9 +35,8 @@ public function loadJWEFromRFC7516(): void /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.4 - * - * @test */ + #[Test] public function loadJWEJSONSerialization(): void { $jweDecrypter = $this->getJWEDecrypterFactory() diff --git a/tests/Component/Encryption/RSAKeyEncryptionTestCase.php b/tests/Component/Encryption/RSAKeyEncryptionTestCase.php index e21ad00fc..ed10d4437 100644 --- a/tests/Component/Encryption/RSAKeyEncryptionTestCase.php +++ b/tests/Component/Encryption/RSAKeyEncryptionTestCase.php @@ -11,6 +11,7 @@ use Jose\Component\Encryption\Algorithm\KeyEncryption\RSAOAEP; use Jose\Component\Encryption\Algorithm\KeyEncryption\RSAOAEP256; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use const STR_PAD_LEFT; /** @@ -20,9 +21,7 @@ */ final class RSAKeyEncryptionTestCase extends EncryptionTestCase { - /** - * @test - */ + #[Test] public function invalidKey(): void { $this->expectException(InvalidArgumentException::class); @@ -43,9 +42,8 @@ public function invalidKey(): void /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.2 - * - * @test */ + #[Test] public function rSA15EncryptionAndDecryption(): void { $header = []; @@ -114,9 +112,8 @@ public function rSA15EncryptionAndDecryption(): void /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.1 - * - * @test */ + #[Test] public function rSAOAEPEncryptionAndDecryption(): void { $header = []; @@ -185,9 +182,8 @@ public function rSAOAEPEncryptionAndDecryption(): void /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.1 - * - * @test */ + #[Test] public function rSAOAEP256EncryptionAndDecryption(): void { $header = []; @@ -251,9 +247,8 @@ public function rSAOAEP256EncryptionAndDecryption(): void /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.1 - * - * @test */ + #[Test] public function loadJWK1(): void { $jweDecrypter = $this->getJWEDecrypterFactory() @@ -273,9 +268,8 @@ public function loadJWK1(): void /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.2 - * - * @test */ + #[Test] public function loadJWK2(): void { $jweDecrypter = $this->getJWEDecrypterFactory() @@ -293,9 +287,8 @@ public function loadJWK2(): void /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.3 - * - * @test */ + #[Test] public function loadJWK3(): void { $jweDecrypter = $this->getJWEDecrypterFactory() diff --git a/tests/Component/Encryption/RSAKeyWithoutAllPrimesTestCase.php b/tests/Component/Encryption/RSAKeyWithoutAllPrimesTestCase.php index a8ba25d07..104501b65 100644 --- a/tests/Component/Encryption/RSAKeyWithoutAllPrimesTestCase.php +++ b/tests/Component/Encryption/RSAKeyWithoutAllPrimesTestCase.php @@ -6,6 +6,8 @@ use Jose\Component\Core\JWK; use Jose\Component\Core\Util\JsonConverter; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; /** * Class RSAKeyWithoutAllPrimesTest. @@ -14,11 +16,8 @@ */ final class RSAKeyWithoutAllPrimesTestCase extends EncryptionTestCase { - /** - * @dataProvider dataEncryptionAlgorithms - * - * @test - */ + #[DataProvider('dataEncryptionAlgorithms')] + #[Test] public function encryptionAlgorithms(string $encryption_algorithm): void { $key = $this->getPrivateKey(); @@ -50,11 +49,8 @@ public function encryptionAlgorithms(string $encryption_algorithm): void static::assertTrue($jweDecrypter->decryptUsingKey($loaded, $key, 0)); } - /** - * @dataProvider dataEncryptionAlgorithms - * - * @test - */ + #[DataProvider('dataEncryptionAlgorithms')] + #[Test] public function encryptionAlgorithmsWithMinimalRsaKey(string $encryption_algorithm): void { $key = $this->getMinimalPrivateKey(); @@ -93,9 +89,10 @@ public static function dataEncryptionAlgorithms(): iterable yield ['RSA-OAEP-256']; } - public function dataEncryptionAlgorithmsWithSimpleKey(): array + public function dataEncryptionAlgorithmsWithSimpleKey(): iterable { - return [['RSA-OAEP'], ['RSA-OAEP-256']]; + yield ['RSA-OAEP']; + yield ['RSA-OAEP-256']; } private function getPrivateKey(): JWK diff --git a/tests/Component/KeyManagement/CertificateTest.php b/tests/Component/KeyManagement/CertificateTest.php index af0c5d405..afe70bed3 100644 --- a/tests/Component/KeyManagement/CertificateTest.php +++ b/tests/Component/KeyManagement/CertificateTest.php @@ -9,6 +9,8 @@ use Jose\Component\Core\Util\RSAKey; use Jose\Component\KeyManagement\JWKFactory; use Jose\Component\KeyManagement\KeyConverter\KeyConverter; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -18,9 +20,7 @@ */ final class CertificateTest extends TestCase { - /** - * @test - */ + #[Test] public function fileNotFound(): void { $this->expectException(InvalidArgumentException::class); @@ -29,9 +29,7 @@ public function fileNotFound(): void KeyConverter::loadKeyFromCertificateFile('file:///foo/bar'); } - /** - * @test - */ + #[Test] public function fileNotValid(): void { $this->expectException(InvalidArgumentException::class); @@ -39,9 +37,7 @@ public function fileNotValid(): void KeyConverter::loadKeyFromCertificateFile(__DIR__ . __FILE__); } - /** - * @test - */ + #[Test] public function rsaEncryptedPrivateKeyConversion(): void { // When @@ -61,9 +57,7 @@ public function rsaEncryptedPrivateKeyConversion(): void ]); } - /** - * @test - */ + #[Test] public function rsaPublicKeyConversion(): void { // When @@ -82,9 +76,7 @@ public function rsaPublicKeyConversion(): void static::assertSame($content, $rsaKey->toPEM()); } - /** - * @test - */ + #[Test] public function certificateConversionPkcs8(): void { $details = KeyConverter::loadFromKeyFile(__DIR__ . '/Keys/RSA/pkcs8.private.encrypted.key', 'tests'); @@ -101,11 +93,8 @@ public function certificateConversionPkcs8(): void ]); } - /** - * @dataProvider dataLoadCertificate - * - * @test - */ + #[DataProvider('dataLoadCertificate')] + #[Test] public function loadCertificate(string $file, array $expected_values): void { $result = KeyConverter::loadKeyFromCertificateFile($file); @@ -327,9 +316,7 @@ public static function dataLoadCertificate(): iterable ]; } - /** - * @test - */ + #[Test] public function loadX5CParameter(): void { $key = new JWK([ @@ -348,20 +335,17 @@ public function loadX5CParameter(): void 'kid' => '1b94c', ]); - static::assertEqualsCanonicalizing( - [ - 'kty' => 'RSA', - 'use' => 'sig', - 'kid' => '1b94c', - 'n' => 'vrjOfz9Ccdgx5nQudyhdoR17V-IubWMeOZCwX_jj0hgAsz2J_pqYW08PLbK_PdiVGKPrqzmDIsLI7sA25VEnHU1uCLNwBuUiCO11_-7dYbsr4iJmG0Qu2j8DsVyT1azpJC_NG84Ty5KKthuCaPod7iI7w0LK9orSMhBEwwZDCxTWq4aYWAchc8t-emd9qOvWtVMDC2BXksRngh6X5bUYLy6AyHKvj-nUy1wgzjYQDwHMTplCoLtU-o-8SNnZ1tmRoGE9uJkBLdh5gFENabWnU5m1ZqZPdwS-qo-meMvVfJb6jJVWRpl2SUtCnYG2C32qvbWbjZ_jBPD5eunqsIo1vQ', - 'e' => 'AQAB', - 'x5t' => '4pNenEBLv0JpLIdugWxQkOsZcK0', - 'x5t#256' => 'pJm2BBpkB8y7tCqrWM0X37WOmQTO8zQw-VpxVgBb21I', - 'x5c' => [ - 'MIIDQjCCAiqgAwIBAgIGATz/FuLiMA0GCSqGSIb3DQEBBQUAMGIxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDTzEPMA0GA1UEBxMGRGVudmVyMRwwGgYDVQQKExNQaW5nIElkZW50aXR5IENvcnAuMRcwFQYDVQQDEw5CcmlhbiBDYW1wYmVsbDAeFw0xMzAyMjEyMzI5MTVaFw0xODA4MTQyMjI5MTVaMGIxCzAJBgNVBAYTAlVTMQswCQYDVQQIE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kiG9w0BAQUFAAOCAQEAh8zGlfSlcI0o3rYDPBB07aXNswb4ECNIKG0CETTUxmXl9KUL+9gGlqCz5iWLOgWsnrcKcY0vXPG9J1r9AqBNTqNgHq2G03X09266X5CpOe1zFo+Owb1zxtp3PehFdfQJ610CDLEaS9V9Rqp17hCyybEpOGVwe8fnk+fbEL2Bo3UPGrpsHzUoaGpDftmWssZkhpBJKVMJyf/RuP2SmmaIzmnw9JiSlYhzo4tpzd5rFXhjRbg4zW9C+2qok+2+qDM1iJ684gPHMIY8aLWrdgQTxkumGmTqgawR+N5MDtdPTEQ0XfIBc2cJEUyMTY5MPvACWpkA6SdS4xSvdXK3IVfOWA==', ], - $certificate->all() - ); + ], $certificate->all()); } } diff --git a/tests/Component/KeyManagement/JWKAnalyzerTest.php b/tests/Component/KeyManagement/JWKAnalyzerTest.php index cdced50f0..121afac50 100644 --- a/tests/Component/KeyManagement/JWKAnalyzerTest.php +++ b/tests/Component/KeyManagement/JWKAnalyzerTest.php @@ -20,6 +20,8 @@ use Jose\Component\KeyManagement\Analyzer\UsageAnalyzer; use Jose\Component\KeyManagement\Analyzer\ZxcvbnKeyAnalyzer; use Jose\Component\KeyManagement\JWKFactory; +use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -29,9 +31,7 @@ final class JWKAnalyzerTest extends TestCase { private ?KeyAnalyzerManager $keyAnalyzerManager = null; - /** - * @test - */ + #[Test] public function iCanAnalyzeANoneKeyAndGetMessages(): void { $key = JWKFactory::createNoneKey(); @@ -41,9 +41,7 @@ public function iCanAnalyzeANoneKeyAndGetMessages(): void static::assertNotEmpty($messages); } - /** - * @test - */ + #[Test] public function iCanAnalyzeAnRsaKeyAndGetMessages(): void { $key = new JWK([ @@ -58,10 +56,8 @@ public function iCanAnalyzeAnRsaKeyAndGetMessages(): void static::assertNotEmpty($messages); } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function theRsaKeyHasALowExponent(): void { $key = JWK::createFromJson( @@ -78,9 +74,7 @@ public function theRsaKeyHasALowExponent(): void static::fail('The low exponent should be catched'); } - /** - * @test - */ + #[Test] public function iCanAnalyzeAnOctKeyAndGetMessages(): void { $key = JWKFactory::createOctKey(16, [ @@ -93,9 +87,7 @@ public function iCanAnalyzeAnOctKeyAndGetMessages(): void static::assertNotEmpty($messages); } - /** - * @test - */ + #[Test] public function iCanAnalyzeAnES521OctKeyAndGetMessages(): void { $key = JWKFactory::createECKey('P-521', [ diff --git a/tests/Component/KeyManagement/JWKFactoryTest.php b/tests/Component/KeyManagement/JWKFactoryTest.php index 9d6fe7758..4f83ab07a 100644 --- a/tests/Component/KeyManagement/JWKFactoryTest.php +++ b/tests/Component/KeyManagement/JWKFactoryTest.php @@ -6,65 +6,55 @@ use Jose\Component\Core\Util\ECKey; use Jose\Component\KeyManagement\JWKFactory; -use const JSON_THROW_ON_ERROR; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use const JSON_THROW_ON_ERROR; /** * @internal */ final class JWKFactoryTest extends TestCase { - /** - * @test - */ + #[Test] public function iCanLoadAP12CertificateThatContainsARSAKey(): never { static::markTestIncomplete('Unable to run this test using the last OpenSSL versions'); $result = JWKFactory::createFromPKCS12CertificateFile(__DIR__ . '/P12/CertRSA.p12', 'cert'); - static::assertSame( - [ - 'kty' => 'RSA', - 'n' => 'acqZqFSLArU71p9yp8ZH1nDfi5g0TLgPCgAYESrfb-DB0_F89LUSSukRRkCjNCuJqp6j6jpe4VmJ2YzGiBV3eoMqORIdUmQ3XlKKX_ONM3oWhZZoFS_2s1RLFl1faXORe4JSJIN9gt_4EpXoKTjX1gftTcFOLrXPgODEwjAYll0', - 'e' => 'AQAB', - 'd' => 'F5wRgtGrXGVZ_2ICUpMbwS3blenX8i85m_-9X0d0KiG84DIKswoeFP3Czyzpv2DgDmXtKv7v4db7vsN-Iyy3RyKmX6y_1yfahMGbLqYl7pFQ2nYooZJI4XRJMDbtfX5l7QqiDDkQrHPcUNlC361WKf8rWlVlIDfwHrBkvp-UPoE', - 'p' => 'gbDt-jRqRZw1Dwg_Ckl_vBRWqCfWfem1YALgpud5FCnPtXoHHcMPayTUb8mjWioN4HIjMIJ29abtvXq3zvhYcQ', - 'q' => '0NLnRW0gajCpa0bA76AbF_MQhxGWH_ZQBfLtEq4NFGWdk_CslovUzJJ4DnW96TfthHgGQEqETtZweQd53kryrQ', - 'dp' => 'KhbWlM3v81lnqtI9S0RhLRPYr8gGB2USlO86I1CZ7d5H55iLuK_2UApq20CwP_HIASBppTOiEcU0ALtT7dqRMQ', - 'dq' => 'WOvmBV9BtVZBXmgDkkZoIxuixxFLDxMw4keeghzRfwUCQ9Pxei3TEMWyD949X0ksgAMoDkps6rFPtYnkcC8UBQ', - 'qi' => 'R-TcgNYrZs8iYmR3pI2UwFhrmJl98vzzSkI4rGTON0vPrnl_46KqzpiW04dBj3yQxhlKyPO8TO0tnA3AYnDc-Q', - ], - $result->all() - ); + static::assertSame([ + 'kty' => 'RSA', + 'n' => 'acqZqFSLArU71p9yp8ZH1nDfi5g0TLgPCgAYESrfb-DB0_F89LUSSukRRkCjNCuJqp6j6jpe4VmJ2YzGiBV3eoMqORIdUmQ3XlKKX_ONM3oWhZZoFS_2s1RLFl1faXORe4JSJIN9gt_4EpXoKTjX1gftTcFOLrXPgODEwjAYll0', + 'e' => 'AQAB', + 'd' => 'F5wRgtGrXGVZ_2ICUpMbwS3blenX8i85m_-9X0d0KiG84DIKswoeFP3Czyzpv2DgDmXtKv7v4db7vsN-Iyy3RyKmX6y_1yfahMGbLqYl7pFQ2nYooZJI4XRJMDbtfX5l7QqiDDkQrHPcUNlC361WKf8rWlVlIDfwHrBkvp-UPoE', + 'p' => 'gbDt-jRqRZw1Dwg_Ckl_vBRWqCfWfem1YALgpud5FCnPtXoHHcMPayTUb8mjWioN4HIjMIJ29abtvXq3zvhYcQ', + 'q' => '0NLnRW0gajCpa0bA76AbF_MQhxGWH_ZQBfLtEq4NFGWdk_CslovUzJJ4DnW96TfthHgGQEqETtZweQd53kryrQ', + 'dp' => 'KhbWlM3v81lnqtI9S0RhLRPYr8gGB2USlO86I1CZ7d5H55iLuK_2UApq20CwP_HIASBppTOiEcU0ALtT7dqRMQ', + 'dq' => 'WOvmBV9BtVZBXmgDkkZoIxuixxFLDxMw4keeghzRfwUCQ9Pxei3TEMWyD949X0ksgAMoDkps6rFPtYnkcC8UBQ', + 'qi' => 'R-TcgNYrZs8iYmR3pI2UwFhrmJl98vzzSkI4rGTON0vPrnl_46KqzpiW04dBj3yQxhlKyPO8TO0tnA3AYnDc-Q', + ], $result->all()); } - /** - * @test - */ + #[Test] public function createFromECCertificateFileInDERFormat(): void { $result = JWKFactory::createFromCertificateFile(__DIR__ . '/EC/DER/prime256v1-cert.der'); - static::assertSame( - [ - 'kty' => 'EC', - 'crv' => 'P-256', - 'x' => 'xEsr_55aqgFXdrbRNz1_WSNI8UaSUxCka2kGEN1bXsI', - 'y' => 'SM45Hsr9dnUR6Ox-TpmNv2fbDX4CoVo-3patMUpXANA', - 'x5c' => [ - 'MIIB0jCCAXegAwIBAgIJAK2o1kQ5JwpUMAoGCCqGSM49BAMCMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTUxMTA4MTUxMTU2WhcNMTYxMTA3MTUxMTU2WjBFMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExEsr/55aqgFXdrbRNz1/WSNI8UaSUxCka2kGEN1bXsJIzjkeyv12dRHo7H5OmY2/Z9sNfgKhWj7elq0xSlcA0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A+FY4SWKv4mfe0gsOBId0Aah/HtVZxDBe3bCXOQM8MMM=', ], - $result->all() - ); + 'x5t' => 'ZnnaQDssCKJQZLp6zyHssIZOa7o', + 'x5t#256' => 'v7VlokKTGL3anRk8Nl0VcqVC9u5j2Fb5tdlQntUgDT4', + ], $result->all()); } - /** - * @test - */ + #[Test] public function createFromSecret(): void { $jwk = JWKFactory::createFromSecret('This is a very secured secret!!!!', [ @@ -78,9 +68,7 @@ public function createFromSecret(): void static::assertSame('FOO', $jwk->get('kid')); } - /** - * @test - */ + #[Test] public function createFromKey(): void { $jwk = JWKFactory::createFromKey(file_get_contents(__DIR__ . '/Keys/EC/private.es256.encrypted.key'), 'test'); @@ -90,99 +78,77 @@ public function createFromKey(): void ); } - /** - * @test - */ + #[Test] public function createFromResource(): void { $res = openssl_x509_read(file_get_contents(__DIR__ . '/RSA/PEM/1024b-rsa-example-cert.pem')); $jwk = JWKFactory::createFromX509Resource($res); - static::assertSame( - [ - 'kty' => 'RSA', - 'n' => 'xgEGvHk-U_RY0j9l3MP7o-S2a6uf4XaRBhu1ztdCHz8tMG8Kj4_qJmgsSZQD17sRctHGBTUJWp4CLtBwCf0zAGVzySwUkcHSu1_2mZ_w7Nr0TQHKeWr_j8pvXH534DKEvugr21DAHbi4c654eLUL-JW_wJJYqJh7qHM3W3Fh7ys', - 'e' => 'AQAB', - 'x5c' => [ - 'MIICVjCCAb8CAg37MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwGA1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNEREMRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdlYiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIwODIyMDUyNzIzWhcNMTcwODIxMDUyNzIzWjBKMQswCQYDVQQGEwJKUDEOMAwGA1UECAwFV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UyNzIzWhcNMTcwODIxMDUyNzIzWjBKMQswCQYDVQQGEwJKUDEOMAwGA1UECAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMYBBrx5PlP0WNI/ZdzD+6Pktmurn+F2kQYbtc7XQh8/LTBvCo+P6iZoLEmUA9e7EXLRxgU1CVqeAi7QcAn9MwBlc8ksFJHB0rtf9pmf8Oza9E0Bynlq/4/Kb1x+d+AyhL7oK9tQwB24uHOueHi1C/iVv8CSWKiYe6hzN1txYe8rAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAASPdjigJkXCqKWpnZ/Oc75EUcMi6HztaW8abUMlYXPIgkV2F7YanHOB7K4f7OOLjiz8DTPFfjC9UeuErhaA/zzWi8ewMTFZW/WshOrm3fNvcMrMLKtH534JKvcdMg6qIdjTFINIrevnAhf0cwULaebn+lMs8Pdl7y37+sfluVok=', ], - $jwk->all() - ); + 'x5t' => '4bK45ewZ00Wk-a_shpTw2cCqJc8', + 'x5t#256' => '5F5GTPOxBGAOsVyuYzqUBjri0R2YDTiDowiQbs6oGgU', + ], $jwk->all()); } - /** - * @test - */ + #[Test] public function createFromECCertificateFileInPEMFormat(): void { $result = JWKFactory::createFromCertificateFile(__DIR__ . '/EC/PEM/prime256v1-cert.pem'); - static::assertSame( - [ - 'kty' => 'EC', - 'crv' => 'P-256', - 'x' => 'xEsr_55aqgFXdrbRNz1_WSNI8UaSUxCka2kGEN1bXsI', - 'y' => 'SM45Hsr9dnUR6Ox-TpmNv2fbDX4CoVo-3patMUpXANA', - 'x5c' => [ - 'MIIB0jCCAXegAwIBAgIJAK2o1kQ5JwpUMAoGCCqGSM49BAMCMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTUxMTA4MT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WSNI8UaSUxCka2kGEN1bXsJIzjkeyv12dRHo7H5OmY2/Z9sNfgKhWj7elq0xSlcA0KNQME4wHQYDVR0OBBYEFKIGgCZoS388STT0qjoX/swKYBXhMB8GA1UdIwQYMBaAFKIGgCZoS388STT0qjoX/swKYBXhMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhAK5OqQoBGR/pj2NOb+PyRKK4k4d3Muj9z/6LsJK+kkgUAiEA+FY4SWKv4mfe0gsOBId0Aah/HtVZxDBe3bCXOQM8MMM=', ], - $result->all() - ); + 'x5t' => 'ZnnaQDssCKJQZLp6zyHssIZOa7o', + 'x5t#256' => 'v7VlokKTGL3anRk8Nl0VcqVC9u5j2Fb5tdlQntUgDT4', + ], $result->all()); } - /** - * @test - */ + #[Test] public function createFrom32kRSACertificateFileInDERFormat(): void { $result = JWKFactory::createFromCertificateFile(__DIR__ . '/RSA/DER/32k-rsa-example-cert.der'); - static::assertSame( - [ - 'kty' => 'RSA', - 'n' => 'qzPFsFIf3cSes25DloV3y3d8gKMcZVE_EQ_6e_MZnyqDbuOEP39yQs3aunzbZRoO8Xw8lLoJNduiKKsco7odI753kBvz1eLyke-sWBVZttbnYyz9AE3ZXfAb9rHW2AxgIqHNsQOsLJS_douGZwxawNdE90WM4QG80bDpkxxHfObtmZIbZoOFSeokDHA5jokQGzJ65t6ARtQOIht84pIlAr8RO0vCUiJ0R4TdAffbdIukMcVfSoZBlZJ_q-yBtPoqB1Nmr1x1FqCtR81NrEtdp7CUHy4yLIskMzHTwJL24dx8zPS9RBIAuR6HO6soQwQgKY5NYmyaZGuWDrzw0Lor9_jjcx3x7NlXEUffGyUdT_bZ6owsgd-SpvnbqXPXIf-u5JH7afSUuajytHnGVilQOpEg06B0F-AumUEx8vdLPczCx0CED11mhRhT1eRQPJlzxgqA22SN1Yz0P55R8QbfFYcflpEtZbHmdvwMSipEoEUyI8aA9z268oNVnnAGhG3cOqk8-4HOvtqZ9LIc8jUcQLtWX-PJav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TDM37BNXGziM2S141unQyMgoDljoWIIRfqSg1Zj1wtdI2DhcbgixZFCt8ifZZYXP+eHOVpk2b81QzWSYpFEQ+ay9AgMBAAEwDQYJKoZIhvcNAQEFBQADgYEATPINk/17H+RLz459iCVQAGes8kc5sxYj3CkMlWrGMiCxvsgu2kak6dCa0f3DfiVt54Fry7s0OklHiZmipoiF4RCtyJwUSAzRrZFAbkpDg8oIu4Ui/Bt13kY7xON+u4m0IgkLZSE+8BSjMrfjVvVxe+qH5i7X/ibUTDjgyfdA8XI=', - ], - 'x5t' => 'KGApLybHWJmBwZGgBk07AlRD9nU', - 'x5t#256' => 'YD12k6kc4xuh_5vEHMyyOFpGs6VqTyaKMlxg0Nt2crA', + static::assertSame([ + 'kty' => 'RSA', + 'n' => 'qzPFsFIf3cSes25DloV3y3d8gKMcZVE_EQ_6e_MZnyqDbuOEP39yQs3aunzbZRoO8Xw8lLoJNduiKKsco7odI753kBvz1eLyke-sWBVZttbnYyz9AE3ZXfAb9rHW2AxgIqHNsQOsLJS_douGZwxawNdE90WM4QG80bDpkxxHfObtmZIbZoOFSeokDHA5jokQGzJ65t6ARtQOIht84pIlAr8RO0vCUiJ0R4TdAffbdIukMcVfSoZBlZJ_q-yBtPoqB1Nmr1x1FqCtR81NrEtdp7CUHy4yLIskMzHTwJL24dx8zPS9RBIAuR6HO6soQwQgKY5NYmyaZGuWDrzw0Lor9_jjcx3x7NlXEUffGyUdT_bZ6owsgd-SpvnbqXPXIf-u5JH7afSUuajytHnGVilQOpEg06B0F-AumUEx8vdLPczCx0CED11mhRhT1eRQPJlzxgqA22SN1Yz0P55R8QbfFYcflpEtZbHmdvwMSipEoEUyI8aA9z268oNVnnAGhG3cOqk8-4HOvtqZ9LIc8jUcQLtWX-PJav9EePnWuV6pFwzvKcwl09m08xIfIh9DvFVJz3Fks-X6c1tVo2Valftlj8fnlzu9WgownkwhM4KN2UpcHcff4G-v9zckhcpROSzZ1ax5mPOUMF6B2OVawMhf3li9A9JEpBDxV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RLz459iCVQAGes8kc5sxYj3CkMlWrGMiCxvsgu2kak6dCa0f3DfiVt54Fry7s0OklHiZmipoiF4RCtyJwUSAzRrZFAbkpDg8oIu4Ui/Bt13kY7xON+u4m0IgkLZSE+8BSjMrfjVvVxe+qH5i7X/ibUTDjgyfdA8XI=', ], - $result->all() - ); + 'x5t' => 'KGApLybHWJmBwZGgBk07AlRD9nU', + 'x5t#256' => 'YD12k6kc4xuh_5vEHMyyOFpGs6VqTyaKMlxg0Nt2crA', + ], $result->all()); } - /** - * @test - */ + #[Test] public function createFrom32kRSACertificateFileInPEMFormat(): void { $result = JWKFactory::createFromCertificateFile(__DIR__ . '/RSA/PEM/32k-rsa-example-cert.pem'); - static::assertSame( - [ - 'kty' => 'RSA', - 'n' => 'qzPFsFIf3cSes25DloV3y3d8gKMcZVE_EQ_6e_MZnyqDbuOEP39yQs3aunzbZRoO8Xw8lLoJNduiKKsco7odI753kBvz1eLyke-sWBVZttbnYyz9AE3ZXfAb9rHW2AxgIqHNsQOsLJS_douGZwxawNdE90WM4QG80bDpkxxHfObtmZIbZoOFSeokDHA5jokQGzJ65t6ARtQOIht84pIlAr8RO0vCUiJ0R4TdAffbdIukMcVfSoZBlZJ_q-yBtPoqB1Nmr1x1FqCtR81NrEtdp7CUHy4yLIskMzHTwJL24dx8zPS9RBIAuR6HO6soQwQgKY5NYmyaZGuWDrzw0Lor9_jjcx3x7NlXEUffGyUdT_bZ6owsgd-SpvnbqXPXIf-u5JH7afSUuajytHnGVilQOpEg06B0F-AumUEx8vdLPczCx0CED11mhRhT1eRQPJlzxgqA22SN1Yz0P55R8QbfFYcflpEtZbHmdvwMSipEoEUyI8aA9z268oNVnnAGhG3cOqk8-4HOvtqZ9LIc8jUcQLtWX-PJav9EePnWuV6pFwzvKcwl09m08xIfIh9DvFVJz3Fks-X6c1tVo2Valftlj8fnlzu9WgownkwhM4KN2UpcHcff4G-v9zckhcpROSzZ1ax5mPOUMF6B2OVawMhf3li9A9JEpBDxVu2-g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rfjVvVxe+qH5i7X/ibUTDjgyfdA8XI=', ], - $result->all() - ); + 'x5t' => 'KGApLybHWJmBwZGgBk07AlRD9nU', + 'x5t#256' => 'YD12k6kc4xuh_5vEHMyyOFpGs6VqTyaKMlxg0Nt2crA', + ], $result->all()); } - /** - * @test - */ + #[Test] public function createFromPrivateEC256KeyFileEncrypted(): void { $result = JWKFactory::createFromKeyFile(__DIR__ . '/Keys/EC/private.es256.encrypted.key', 'test'); @@ -193,9 +159,7 @@ public function createFromPrivateEC256KeyFileEncrypted(): void ); } - /** - * @test - */ + #[Test] public function createFromPrivateEC384KeyFileEncrypted(): void { $result = JWKFactory::createFromKeyFile(__DIR__ . '/Keys/EC/private.es384.encrypted.key', 'test'); @@ -206,9 +170,7 @@ public function createFromPrivateEC384KeyFileEncrypted(): void ); } - /** - * @test - */ + #[Test] public function createFromPrivateEC512KeyFileEncrypted(): void { $result = JWKFactory::createFromKeyFile(__DIR__ . '/Keys/EC/private.es512.encrypted.key', 'test'); @@ -219,10 +181,8 @@ public function createFromPrivateEC512KeyFileEncrypted(): void ); } - /** - * @dataProvider publicKeysAndPem - * @test - */ + #[DataProvider('publicKeysAndPem')] + #[Test] public function createFromPublicEC512KeyFile(string $filename, string $expectedJWK): void { // Given @@ -252,9 +212,7 @@ public static function publicKeysAndPem(): iterable ]; } - /** - * @test - */ + #[Test] public function createFromValues(): void { $result = JWKFactory::createFromValues([ @@ -271,10 +229,8 @@ public function createFromValues(): void ); } - /** - * @test - * @dataProvider dataKeys - */ + #[DataProvider('dataKeys')] + #[Test] public function loadKeyPEMEncoded(string $filename, array $expectedValues): void { $jwk = JWKFactory::createFromKeyFile($filename); diff --git a/tests/Component/KeyManagement/JWKSetAnalyzerTest.php b/tests/Component/KeyManagement/JWKSetAnalyzerTest.php index 167b4f130..280a4b33c 100644 --- a/tests/Component/KeyManagement/JWKSetAnalyzerTest.php +++ b/tests/Component/KeyManagement/JWKSetAnalyzerTest.php @@ -9,6 +9,7 @@ use Jose\Component\KeyManagement\Analyzer\KeysetAnalyzerManager; use Jose\Component\KeyManagement\Analyzer\MixedKeyTypes; use Jose\Component\KeyManagement\Analyzer\MixedPublicAndPrivateKeys; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -18,9 +19,7 @@ final class JWKSetAnalyzerTest extends TestCase { private ?KeysetAnalyzerManager $keysetAnalyzerManager = null; - /** - * @test - */ + #[Test] public function theKeysetHasNoKey(): void { $jwkset = new JWKSet([]); @@ -30,9 +29,7 @@ public function theKeysetHasNoKey(): void static::assertEmpty($messages); } - /** - * @test - */ + #[Test] public function theKeysetDoesNotMixesKeys(): void { $jwkset = new JWKSet([ @@ -55,9 +52,7 @@ public function theKeysetDoesNotMixesKeys(): void static::assertEmpty($messages); } - /** - * @test - */ + #[Test] public function theKeysetMixesKeys(): void { $jwkset = new JWKSet([ @@ -83,9 +78,7 @@ public function theKeysetMixesKeys(): void static::assertNotEmpty($messages); } - /** - * @test - */ + #[Test] public function theKeysetHasOnlyPrivateKeys(): void { $jwkset = new JWKSet([ @@ -108,9 +101,7 @@ public function theKeysetHasOnlyPrivateKeys(): void static::assertEmpty($messages); } - /** - * @test - */ + #[Test] public function theKeysetHasOnlyPublicKeys(): void { $jwkset = new JWKSet([ @@ -130,9 +121,7 @@ public function theKeysetHasOnlyPublicKeys(): void static::assertEmpty($messages); } - /** - * @test - */ + #[Test] public function theKeysetMixesPublicAndPrivateKeys(): void { $jwkset = new JWKSet([ diff --git a/tests/Component/KeyManagement/JWKSetTest.php b/tests/Component/KeyManagement/JWKSetTest.php index ca928036c..5fa9e987a 100644 --- a/tests/Component/KeyManagement/JWKSetTest.php +++ b/tests/Component/KeyManagement/JWKSetTest.php @@ -4,20 +4,19 @@ namespace Jose\Tests\Component\KeyManagement; -use function count; use Jose\Component\Core\JWK; use Jose\Component\Core\JWKSet; use Jose\Component\KeyManagement\JWKFactory; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use function count; /** * @internal */ final class JWKSetTest extends TestCase { - /** - * @test - */ + #[Test] public function keySelection(): void { $jwkset = $this->getPublicKeySet(); @@ -26,29 +25,22 @@ public function keySelection(): void static::assertInstanceOf(JWK::class, $jwk); } - /** - * @test - */ + #[Test] public function keySelectionWithAlgorithm(): void { $jwkset = $this->getPublicKeySet(); $jwk = $jwkset->selectKey('sig', new FooAlgorithm()); static::assertInstanceOf(JWK::class, $jwk); - static::assertSame( - [ - 'kid' => '71ee230371d19630bc17fb90ccf20ae632ad8cf8', - 'kty' => 'FOO', - 'alg' => 'foo', - 'use' => 'sig', - ], - $jwk->all() - ); + static::assertSame([ + 'kid' => '71ee230371d19630bc17fb90ccf20ae632ad8cf8', + 'kty' => 'FOO', + 'alg' => 'foo', + 'use' => 'sig', + ], $jwk->all()); } - /** - * @test - */ + #[Test] public function keySelectionWithAlgorithmAndKeyId(): void { $jwkset = $this->getPublicKeySet(); @@ -57,20 +49,15 @@ public function keySelectionWithAlgorithmAndKeyId(): void 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', ]); static::assertInstanceOf(JWK::class, $jwk); - static::assertSame( - [ - 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', - 'kty' => 'FOO', - 'alg' => 'foo', - 'use' => 'sig', - ], - $jwk->all() - ); + static::assertSame([ + 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', + 'kty' => 'FOO', + 'alg' => 'foo', + 'use' => 'sig', + ], $jwk->all()); } - /** - * @test - */ + #[Test] public function keySelectionWithKeyId(): void { $jwkset = $this->getPublicKeySet(); @@ -79,20 +66,15 @@ public function keySelectionWithKeyId(): void 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', ]); static::assertInstanceOf(JWK::class, $jwk); - static::assertSame( - [ - 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', - 'kty' => 'FOO', - 'alg' => 'foo', - 'use' => 'sig', - ], - $jwk->all() - ); + static::assertSame([ + 'kid' => '02491f945c951adf156f370788e8ccdabf8877a8', + 'kty' => 'FOO', + 'alg' => 'foo', + 'use' => 'sig', + ], $jwk->all()); } - /** - * @test - */ + #[Test] public function keySelectionReturnsNothing(): void { $jwkset = $this->getPublicKeySet(); @@ -103,9 +85,7 @@ public function keySelectionReturnsNothing(): void static::assertNull($jwk); } - /** - * @test - */ + #[Test] public function createKeySetFromValues(): void { $values = [ diff --git a/tests/Component/KeyManagement/JWKTest.php b/tests/Component/KeyManagement/JWKTest.php index 8e19773da..f76e9d917 100644 --- a/tests/Component/KeyManagement/JWKTest.php +++ b/tests/Component/KeyManagement/JWKTest.php @@ -9,18 +9,17 @@ use Jose\Component\Core\JWKSet; use Jose\Component\Core\Util\RSAKey; use Jose\Component\KeyManagement\JWKFactory; -use const JSON_THROW_ON_ERROR; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use const JSON_THROW_ON_ERROR; /** * @internal */ final class JWKTest extends TestCase { - /** - * @test - */ + #[Test] public function key(): void { $jwk = new JWK([ @@ -52,9 +51,7 @@ public function key(): void ); } - /** - * @test - */ + #[Test] public function badConstruction(): void { $this->expectException(InvalidArgumentException::class); @@ -63,9 +60,7 @@ public function badConstruction(): void new JWK([]); } - /** - * @test - */ + #[Test] public function badCall(): void { $this->expectException(InvalidArgumentException::class); @@ -85,9 +80,7 @@ public function badCall(): void $jwk->get('ABCD'); } - /** - * @test - */ + #[Test] public function keySet(): void { $jwk1 = new JWK([ @@ -142,9 +135,7 @@ public function keySet(): void static::assertSame(0, $jwkset->count()); } - /** - * @test - */ + #[Test] public function keySet2(): void { $this->expectException(InvalidArgumentException::class); @@ -178,9 +169,7 @@ public function keySet2(): void $jwkset->get(2); } - /** - * @test - */ + #[Test] public function privateToPublic(): void { $private = new JWK([ @@ -209,9 +198,7 @@ public function privateToPublic(): void ]), json_encode($public, JSON_THROW_ON_ERROR)); } - /** - * @test - */ + #[Test] public function loadCertificateChain(): void { $key = JWKFactory::createFromCertificateFile( @@ -225,25 +212,20 @@ public function loadCertificateChain(): void '178f7e93a74ed73d88c29042220b9ae6e4b371cd', mb_strtolower(bin2hex(Base64UrlSafe::decode($key->get('x5t')))) ); - static::assertEqualsCanonicalizing( - [ - 'kty' => 'RSA', - 'n' => 'nCoEd1zYUJE6BqOC4NhQSLyJP_EZcBqIRn7gj8Xxic4h7lr-YQ23MkSJoHQLU09VpM6CYpXu61lfxuEFgBLEXpQ_vFtIOPRT9yTm-5HpFcTP9FMN9Er8n1Tefb6ga2-HwNBQHygwA0DaCHNRbH__OjynNwaOvUsRBOt9JN7m-fwxcfuU1WDzLkqvQtLL6sRqGrLMU90VS4sfyBlhH82dqD5jK4Q1aWWEyBnFRiL4U5W-44BKEMYq7LqXIBHHOZkQBKDwYXqVJYxOUnXitu0IyhT8ziJqs07PRgOXlwN-wLHee69FM8-6PnG33vQlJcINNYmdnfsOEXmJHjfFr45yaQ', - 'e' => 'AQAB', - 'x5t' => 'F49-k6dO1z2IwpBCIgua5uSzcc0', - 'x5t#256' => 'pBJP2vnKx7ruHKsy4yJddGUAwJ888-uyU-8_uwiK_TQ', - 'kid' => 'From www.google.com', - 'x5c' => [ - 'MIID8DCCAtigAwIBAgIDAjqDMA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMTMwNDA1MTUxNTU2WhcNMTYxMjMxMjM1OTU5WjBJMQswCQYDVQQGEwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzElMCMGA1UEAxMcR29vZ2xlIEludGVybmV0IEF1dGhvcml0eSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJwqBHdc2FCROgajguDYUEi8iT/xGXAaiEZ+4I/F8YnOIe5a/mENtzJEiaB0C1NPVaTOgmKV7utZX8bhBYASxF6UP7xbSDj0U/ck5vuR6RXEz/RTDfRK/J9U3n2+oGtvh8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jAdBgNVHQ4EFgQUSt0GFhu89mi1dvWBtrtiGrpagS8wDgYDVR0PAQH/BAQDAgEGMC4GCCsGAQUFBwEBBCIwIDAeBggrBgEFBQcwAYYSaHR0cDovL2cuc3ltY2QuY29tMBIGA1UdEwEB/wQIMAYBAf8CAQAwNQYDVR0fBC4wLDAqoCigJoYkaHR0cDovL2cuc3ltY2IuY29tL2NybHMvZ3RnbG9iYWwuY3JsMBcGA1UdIAQQMA4wDAYKKwYBBAHWeQIFATANBgkqhkiG9w0BAQsFAAOCAQEAqvqpIM1qZ4PtXtR+3h3Ef+AlBgDFJPupyC1tft6dgmUsgWM0Zj7pUsIItMsv91+ZOmqcUHqFBYx90SpIhNMJbHzCzTWf84LuUt5oX+QAihcglvcpjZpNy6jehsgNb1aHA30DP9z6eX0hGfnIOi9RdozHQZJxjyXON/hKTAAj78Q1EK7gI4BzfE00LshukNYQHpmEcxpw8u1VDu4XBupn7jLrLN1nBz/2i8Jw3lsA5rsb0zYaImxssDVCbJAJPZPpZAkiDoUGn8JzIdPmX4DkjYUiOnMDsWCOrmji9D6X52ASCWg23jrW4kOVWzeBkoEfu43XrVJkFleW2V40fsg12A==', ], - $key->all() - ); + ], $key->all()); } - /** - * @test - */ + #[Test] public function theRSAKeyIsCorrectlyConvertedIntoPEM(): void { // Given @@ -257,8 +239,7 @@ public function theRSAKeyIsCorrectlyConvertedIntoPEM(): void $pem = RSAKey::createFromJWK($key)->toPEM(); // Then - static::assertSame( - '-----BEGIN PUBLIC KEY----- + static::assertSame('-----BEGIN PUBLIC KEY----- MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAz62tHQzm4fDHipqlcrNh C1gUdn0N38pmlcQbVlLvtZf1aRm1OO43cB9YQyWr1MsTrYH4nyWZDMPIGY/BsIfY w1lp9fo2D1tpG2vtCaKRETVimu+N9DySQ9vYs6n8lG0vXy/spK7sGrOLFooijDSt @@ -271,8 +252,6 @@ public function theRSAKeyIsCorrectlyConvertedIntoPEM(): void XCARX1IObFJNoinxYJ5SNX9bCSRtgefuBKE7BSNukAkHyBPf+++kEi9GbYXzlJr+ yCMAIsA0UoiEx264hkAF9zF+N1yRhS/QmrhzU5hpj1IE8WRCqyIZV8f/IbSGXBue 7MmgknLVRWHuGqehkTSfiNECAwEAAQ== ------END PUBLIC KEY-----', - $pem - ); +-----END PUBLIC KEY-----', $pem); } } diff --git a/tests/Component/KeyManagement/Keys/ECKeysTest.php b/tests/Component/KeyManagement/Keys/ECKeysTest.php index caf719f70..7a29b8b8b 100644 --- a/tests/Component/KeyManagement/Keys/ECKeysTest.php +++ b/tests/Component/KeyManagement/Keys/ECKeysTest.php @@ -4,22 +4,21 @@ namespace Jose\Tests\Component\KeyManagement\Keys; -use const DIRECTORY_SEPARATOR; use InvalidArgumentException; use Jose\Component\Core\JWK; use Jose\Component\Core\Util\ECKey; use Jose\Component\KeyManagement\JWKFactory; use Jose\Component\KeyManagement\KeyConverter\KeyConverter; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use const DIRECTORY_SEPARATOR; /** * @internal */ final class ECKeysTest extends TestCase { - /** - * @test - */ + #[Test] public function keyTypeNotSupported(): void { $this->expectException(InvalidArgumentException::class); @@ -32,9 +31,8 @@ public function keyTypeNotSupported(): void /** * @see https://github.com/Spomky-Labs/jose/issues/141 * @see https://gist.github.com/Spomky/246eca6aaeeb7a40f11d3a2d98960282 - * - * @test */ + #[Test] public function loadPrivateEC256KeyGenerateByAPN(): void { $pem = file_get_contents( @@ -50,9 +48,7 @@ public function loadPrivateEC256KeyGenerateByAPN(): void ]); } - /** - * @test - */ + #[Test] public function loadPublicEC256Key(): void { $pem = file_get_contents( @@ -67,9 +63,7 @@ public function loadPublicEC256Key(): void ]); } - /** - * @test - */ + #[Test] public function loadPrivateEC256Key(): void { // Given @@ -93,9 +87,7 @@ public function loadPrivateEC256Key(): void static::assertSame($private_pem, $ecKey); } - /** - * @test - */ + #[Test] public function loadEncryptedPrivateEC256Key(): void { $private_pem = file_get_contents( @@ -111,9 +103,7 @@ public function loadEncryptedPrivateEC256Key(): void ]); } - /** - * @test - */ + #[Test] public function loadEncryptedPrivateEC256KeyWithoutPassword(): void { $this->expectException(InvalidArgumentException::class); @@ -124,9 +114,7 @@ public function loadEncryptedPrivateEC256KeyWithoutPassword(): void ); } - /** - * @test - */ + #[Test] public function loadPublicEC384Key(): void { $pem = file_get_contents( @@ -141,9 +129,7 @@ public function loadPublicEC384Key(): void ]); } - /** - * @test - */ + #[Test] public function loadPrivateEC384Key(): void { $private_pem = file_get_contents( @@ -159,9 +145,7 @@ public function loadPrivateEC384Key(): void ]); } - /** - * @test - */ + #[Test] public function loadEncryptedPrivateEC384Key(): void { $private_pem = file_get_contents( @@ -177,9 +161,7 @@ public function loadEncryptedPrivateEC384Key(): void ]); } - /** - * @test - */ + #[Test] public function loadPublicEC512Key(): void { $pem = file_get_contents( @@ -194,9 +176,7 @@ public function loadPublicEC512Key(): void ]); } - /** - * @test - */ + #[Test] public function loadPrivateEC512Key(): void { $private_pem = file_get_contents( @@ -212,9 +192,7 @@ public function loadPrivateEC512Key(): void ]); } - /** - * @test - */ + #[Test] public function loadEncryptedPrivateEC512Key(): void { $private_pem = file_get_contents( @@ -230,9 +208,7 @@ public function loadEncryptedPrivateEC512Key(): void ]); } - /** - * @test - */ + #[Test] public function convertPrivateKeyToPublic(): void { $jwk = new JWK([ @@ -258,9 +234,7 @@ public function convertPrivateKeyToPublic(): void ->all()); } - /** - * @test - */ + #[Test] public function createECKeyOnP256(): void { $jwk = JWKFactory::createECKey('P-256'); @@ -271,9 +245,7 @@ public function createECKeyOnP256(): void static::assertTrue($jwk->has('y')); } - /** - * @test - */ + #[Test] public function createECKeyOnP384(): void { $jwk = JWKFactory::createECKey('P-384'); @@ -284,9 +256,7 @@ public function createECKeyOnP384(): void static::assertTrue($jwk->has('y')); } - /** - * @test - */ + #[Test] public function createECKeyOnP521(): void { $jwk = JWKFactory::createECKey('P-521'); diff --git a/tests/Component/KeyManagement/Keys/NoneKeysTest.php b/tests/Component/KeyManagement/Keys/NoneKeysTest.php index dc1896570..38ef022e2 100644 --- a/tests/Component/KeyManagement/Keys/NoneKeysTest.php +++ b/tests/Component/KeyManagement/Keys/NoneKeysTest.php @@ -6,8 +6,9 @@ use Jose\Component\Core\JWK; use Jose\Component\KeyManagement\JWKFactory; -use const JSON_THROW_ON_ERROR; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use const JSON_THROW_ON_ERROR; /** * @internal @@ -16,9 +17,8 @@ final class NoneKeysTest extends TestCase { /** * @see https://tools.ietf.org/html/rfc7638#section-3.1 - * - * @test */ + #[Test] public function keyThumbprint(): void { $key = new JWK([ @@ -37,9 +37,7 @@ public function keyThumbprint(): void static::assertSame('JI3gujreJtPt2gzxlbGnLQ', $key->thumbprint('md5')); } - /** - * @test - */ + #[Test] public function createNoneKey(): void { $key = JWKFactory::createNoneKey([ diff --git a/tests/Component/KeyManagement/Keys/OKPKeysTest.php b/tests/Component/KeyManagement/Keys/OKPKeysTest.php index 1293fe162..e75ef03dc 100644 --- a/tests/Component/KeyManagement/Keys/OKPKeysTest.php +++ b/tests/Component/KeyManagement/Keys/OKPKeysTest.php @@ -6,6 +6,7 @@ use InvalidArgumentException; use Jose\Component\KeyManagement\JWKFactory; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -13,9 +14,7 @@ */ final class OKPKeysTest extends TestCase { - /** - * @test - */ + #[Test] public function createOKPKeyWithInvalidKeySize(): void { $this->expectException(InvalidArgumentException::class); @@ -24,9 +23,7 @@ public function createOKPKeyWithInvalidKeySize(): void JWKFactory::createOKPKey('Ed455'); } - /** - * @test - */ + #[Test] public function createOKPKeyWithCurveX25519(): void { $jwk = JWKFactory::createOKPKey('X25519', [ @@ -43,9 +40,7 @@ public function createOKPKeyWithCurveX25519(): void static::assertSame('enc', $jwk->get('use')); } - /** - * @test - */ + #[Test] public function createOKPKeyWithCurveEd25519(): void { $jwk = JWKFactory::createOKPKey('Ed25519', [ diff --git a/tests/Component/KeyManagement/Keys/OctKeysTest.php b/tests/Component/KeyManagement/Keys/OctKeysTest.php index 3f9a9a1d0..de2a8c06f 100644 --- a/tests/Component/KeyManagement/Keys/OctKeysTest.php +++ b/tests/Component/KeyManagement/Keys/OctKeysTest.php @@ -6,6 +6,7 @@ use InvalidArgumentException; use Jose\Component\KeyManagement\JWKFactory; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -13,9 +14,7 @@ */ final class OctKeysTest extends TestCase { - /** - * @test - */ + #[Test] public function createOctKeyWithInvalidKeySize(): void { $this->expectException(InvalidArgumentException::class); @@ -24,9 +23,7 @@ public function createOctKeyWithInvalidKeySize(): void JWKFactory::createOctKey(12); } - /** - * @test - */ + #[Test] public function createOctKey(): void { $jwk = JWKFactory::createOctKey(64); diff --git a/tests/Component/KeyManagement/Keys/RSAKeysTest.php b/tests/Component/KeyManagement/Keys/RSAKeysTest.php index b5da31cf2..0cf1f0a78 100644 --- a/tests/Component/KeyManagement/Keys/RSAKeysTest.php +++ b/tests/Component/KeyManagement/Keys/RSAKeysTest.php @@ -4,12 +4,13 @@ namespace Jose\Tests\Component\KeyManagement\Keys; -use const DIRECTORY_SEPARATOR; use InvalidArgumentException; use Jose\Component\Core\JWK; use Jose\Component\KeyManagement\JWKFactory; use Jose\Component\KeyManagement\KeyConverter\RSAKey; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use const DIRECTORY_SEPARATOR; /** * @internal @@ -18,9 +19,8 @@ final class RSAKeysTest extends TestCase { /** * @see https://tools.ietf.org/html/rfc7638#section-3.1 - * - * @test */ + #[Test] public function keyThumbprint(): void { $key = new JWK([ @@ -34,9 +34,7 @@ public function keyThumbprint(): void static::assertSame('NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs', $key->thumbprint('sha256')); } - /** - * @test - */ + #[Test] public function hashAlgorithmNotSupported(): void { $this->expectException(InvalidArgumentException::class); @@ -53,9 +51,7 @@ public function hashAlgorithmNotSupported(): void $key->thumbprint('foo'); } - /** - * @test - */ + #[Test] public function unsupportedKeyType(): void { $this->expectException(InvalidArgumentException::class); @@ -70,9 +66,7 @@ public function unsupportedKeyType(): void ])); } - /** - * @test - */ + #[Test] public function loadPublicRSAKeyFromPEM(): void { $file = 'file://' . __DIR__ . DIRECTORY_SEPARATOR . 'RSA' . DIRECTORY_SEPARATOR . 'public.key'; @@ -86,9 +80,7 @@ public function loadPublicRSAKeyFromPEM(): void static::assertTrue($rsa_key->isPublic()); } - /** - * @test - */ + #[Test] public function loadPublicRSAKeyFromJWK(): void { $jwk = new JWK([ @@ -110,9 +102,7 @@ public function loadPublicRSAKeyFromJWK(): void static::assertTrue($rsa_key->isPublic()); } - /** - * @test - */ + #[Test] public function loadPublicRSAKeyFromValues(): void { $rsa_key = RSAKey::createFromJWK(new JWK([ @@ -129,9 +119,7 @@ public function loadPublicRSAKeyFromValues(): void static::assertTrue($rsa_key->isPublic()); } - /** - * @test - */ + #[Test] public function loadPrivateRSAKey(): void { // Given @@ -165,9 +153,7 @@ public function loadPrivateRSAKey(): void static::assertSame($content, \Jose\Component\Core\Util\RSAKey::createFromJWK($rsaKey->toJwk())->toPEM()); } - /** - * @test - */ + #[Test] public function loadPrivateRSAKeyFromJWK(): void { $jwk = new JWK([ @@ -205,9 +191,7 @@ public function loadPrivateRSAKeyFromJWK(): void static::assertTrue($public_key->isPublic()); } - /** - * @test - */ + #[Test] public function loadPrivateRSAKeyFromValues(): void { $rsa_key = RSAKey::createFromJWK(new JWK([ @@ -245,9 +229,7 @@ public function loadPrivateRSAKeyFromValues(): void static::assertTrue($public_key->isPublic()); } - /** - * @test - */ + #[Test] public function convertPrivateKeyToPublic(): void { $private_ec_key = RSAKey::createFromJWK(new JWK([ @@ -275,9 +257,7 @@ public function convertPrivateKeyToPublic(): void ], $public_ec_key->toArray()); } - /** - * @test - */ + #[Test] public function createRSAKey512Bits(): void { $jwk = JWKFactory::createRSAKey(512); @@ -292,9 +272,7 @@ public function createRSAKey512Bits(): void static::assertTrue($jwk->has('qi')); } - /** - * @test - */ + #[Test] public function loadPrivateRSAKeyFromMinimalValues(): void { $rsa_key = RSAKey::createFromJWK(new JWK([ diff --git a/tests/Component/KeyManagement/MessageBagTest.php b/tests/Component/KeyManagement/MessageBagTest.php index 27498b777..14902e69b 100644 --- a/tests/Component/KeyManagement/MessageBagTest.php +++ b/tests/Component/KeyManagement/MessageBagTest.php @@ -6,17 +6,16 @@ use Jose\Component\KeyManagement\Analyzer\Message; use Jose\Component\KeyManagement\Analyzer\MessageBag; -use const JSON_THROW_ON_ERROR; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use const JSON_THROW_ON_ERROR; /** * @internal */ final class MessageBagTest extends TestCase { - /** - * @test - */ + #[Test] public function iCanGetAMessageWithLowSeverity(): void { $message = Message::low('Not important'); @@ -25,9 +24,7 @@ public function iCanGetAMessageWithLowSeverity(): void static::assertSame('Not important', $message->getMessage()); } - /** - * @test - */ + #[Test] public function iCanGetAMessageWithMediumSeverity(): void { $message = Message::medium('Quite important'); @@ -36,9 +33,7 @@ public function iCanGetAMessageWithMediumSeverity(): void static::assertSame('Quite important', $message->getMessage()); } - /** - * @test - */ + #[Test] public function iCanGetAMessageWithHighSeverity(): void { $message = Message::high('Very important'); @@ -47,9 +42,7 @@ public function iCanGetAMessageWithHighSeverity(): void static::assertSame('Very important', $message->getMessage()); } - /** - * @test - */ + #[Test] public function iCanSerializeAMessageIntoJson(): void { $message = Message::high('Very important'); @@ -60,9 +53,7 @@ public function iCanSerializeAMessageIntoJson(): void ); } - /** - * @test - */ + #[Test] public function aMessageBagCanHaveSeveralMessages(): void { $bag = new MessageBag(); @@ -74,9 +65,7 @@ public function aMessageBagCanHaveSeveralMessages(): void static::assertContainsOnlyInstancesOf(Message::class, $bag); } - /** - * @test - */ + #[Test] public function iCanSerializeAMessageBagIntoJson(): void { $bag = new MessageBag(); diff --git a/tests/Component/KeyManagement/UrlKeySetFactoryTest.php b/tests/Component/KeyManagement/UrlKeySetFactoryTest.php index 08e2ddc02..4f3fd77f1 100644 --- a/tests/Component/KeyManagement/UrlKeySetFactoryTest.php +++ b/tests/Component/KeyManagement/UrlKeySetFactoryTest.php @@ -9,6 +9,7 @@ use Jose\Component\KeyManagement\X5UFactory; use JsonException; use Nyholm\Psr7\Factory\Psr17Factory; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use RuntimeException; @@ -30,9 +31,7 @@ protected function setUp(): void $this->messageFactory = new Psr17Factory(); } - /** - * @test - */ + #[Test] public function iCanGetAKeySetFromAJWKUrl(): void { $response = $this->messageFactory->createResponse(200); @@ -50,9 +49,7 @@ public function iCanGetAKeySetFromAJWKUrl(): void static::assertSame(3, $keyset->count()); } - /** - * @test - */ + #[Test] public function theJWKUrlIsValidButDoesNotContainAKeySet(): void { $this->expectException(JsonException::class); @@ -69,9 +66,7 @@ public function theJWKUrlIsValidButDoesNotContainAKeySet(): void ->loadFromUrl('https://foo.bar/bad/url'); } - /** - * @test - */ + #[Test] public function theUrlIsNotValidAndJWKSetCannotBeLoaded(): void { $this->expectException(RuntimeException::class); @@ -88,9 +83,7 @@ public function theUrlIsNotValidAndJWKSetCannotBeLoaded(): void ->loadFromUrl('https://foo.bar/bad/url'); } - /** - * @test - */ + #[Test] public function iCanGetAKeySetFromAX509Url(): void { $response = $this->messageFactory->createResponse(200); @@ -108,9 +101,7 @@ public function iCanGetAKeySetFromAX509Url(): void static::assertSame(3, $keyset->count()); } - /** - * @test - */ + #[Test] public function theX509UrlIsValidButDoesNotContainAKeySet(): void { $this->expectException(JsonException::class); @@ -127,9 +118,7 @@ public function theX509UrlIsValidButDoesNotContainAKeySet(): void ->loadFromUrl('https://foo.bar/bad/url'); } - /** - * @test - */ + #[Test] public function theUrlIsNotValidAndX509CertificatesCannotBeLoaded(): void { $this->expectException(RuntimeException::class); diff --git a/tests/Component/NestedToken/NestedTokenTest.php b/tests/Component/NestedToken/NestedTokenTest.php deleted file mode 100644 index 13d4ab819..000000000 --- a/tests/Component/NestedToken/NestedTokenTest.php +++ /dev/null @@ -1,162 +0,0 @@ -algorithmManagerFactory === null) { - $this->algorithmManagerFactory = new AlgorithmManagerFactory(); - $this->algorithmManagerFactory->add('A128GCM', new A128GCM()); - $this->algorithmManagerFactory->add('A192GCM', new A192GCM()); - $this->algorithmManagerFactory->add('A256GCM', new A256GCM()); - $this->algorithmManagerFactory->add('A128CBC-HS256', new A128CBCHS256()); - $this->algorithmManagerFactory->add('A192CBC-HS384', new A192CBCHS384()); - $this->algorithmManagerFactory->add('A256CBC-HS512', new A256CBCHS512()); - $this->algorithmManagerFactory->add('A128GCMKW', new A128GCMKW()); - $this->algorithmManagerFactory->add('A192GCMKW', new A192GCMKW()); - $this->algorithmManagerFactory->add('A256GCMKW', new A256GCMKW()); - $this->algorithmManagerFactory->add('A128KW', new A128KW()); - $this->algorithmManagerFactory->add('A192KW', new A192KW()); - $this->algorithmManagerFactory->add('A256KW', new A256KW()); - $this->algorithmManagerFactory->add('dir', new Dir()); - $this->algorithmManagerFactory->add('ECDH-ES', new ECDHES()); - $this->algorithmManagerFactory->add('ECDH-ES+A128KW', new ECDHESA128KW()); - $this->algorithmManagerFactory->add('ECDH-ES+A192KW', new ECDHESA192KW()); - $this->algorithmManagerFactory->add('ECDH-ES+A256KW', new ECDHESA256KW()); - $this->algorithmManagerFactory->add('PBES2-HS256+A128KW', new PBES2HS256A128KW()); - $this->algorithmManagerFactory->add('PBES2-HS384+A192KW', new PBES2HS384A192KW()); - $this->algorithmManagerFactory->add('PBES2-HS512+A256KW', new PBES2HS512A256KW()); - $this->algorithmManagerFactory->add('RSA1_5', new RSA15()); - $this->algorithmManagerFactory->add('RSA-OAEP', new RSAOAEP()); - $this->algorithmManagerFactory->add('RSA-OAEP-256', new RSAOAEP256()); - } - - return $this->algorithmManagerFactory; - } - - protected function getCompressionMethodManagerFactory(): CompressionMethodManagerFactory - { - if ($this->compressionMethodManagerFactory === null) { - $this->compressionMethodManagerFactory = new CompressionMethodManagerFactory(); - $this->compressionMethodManagerFactory->add('DEF', new Deflate()); - } - - return $this->compressionMethodManagerFactory; - } - - protected function getJWEBuilderFactory(): JWEBuilderFactory - { - if ($this->jweBuilderFactory === null) { - $this->jweBuilderFactory = new JWEBuilderFactory( - $this->getAlgorithmManagerFactory(), - $this->getCompressionMethodManagerFactory() - ); - } - - return $this->jweBuilderFactory; - } - - protected function getJWEDecrypterFactory(): JWEDecrypterFactory - { - if ($this->jweDecrypterFactory === null) { - $this->jweDecrypterFactory = new JWEDecrypterFactory( - $this->getAlgorithmManagerFactory(), - $this->getCompressionMethodManagerFactory() - ); - } - - return $this->jweDecrypterFactory; - } - - protected function getJWELoaderFactory(): JWELoaderFactory - { - if ($this->jweLoaderFactory === null) { - $this->jweLoaderFactory = new JWELoaderFactory( - $this->getJWESerializerManagerFactory(), - $this->getJWEDecrypterFactory(), - null - ); - } - - return $this->jweLoaderFactory; - } - - protected function getJWESerializerManagerFactory(): JWESerializerManagerFactory - { - if ($this->jwsSerializerManagerFactory === null) { - $this->jwsSerializerManagerFactory = new JWESerializerManagerFactory(); - $this->jwsSerializerManagerFactory->add(new CompactSerializer()); - $this->jwsSerializerManagerFactory->add(new JSONFlattenedSerializer()); - $this->jwsSerializerManagerFactory->add(new JSONGeneralSerializer()); - } - - return $this->jwsSerializerManagerFactory; - } - - protected function getJWESerializerManager(): JWESerializerManager - { - if ($this->jwsSerializerManager === null) { - $this->jwsSerializerManager = new JWESerializerManager([ - new CompactSerializer(), - new JSONFlattenedSerializer(), - new JSONGeneralSerializer(), - ]); - } - - return $this->jwsSerializerManager; - } -} diff --git a/tests/Component/NestedToken/NestingTest.php b/tests/Component/NestedToken/NestingTestCase.php similarity index 98% rename from tests/Component/NestedToken/NestingTest.php rename to tests/Component/NestedToken/NestingTestCase.php index 9d1bd70dc..238a83d2c 100644 --- a/tests/Component/NestedToken/NestingTest.php +++ b/tests/Component/NestedToken/NestingTestCase.php @@ -5,17 +5,16 @@ namespace Jose\Tests\Component\NestedToken; use Jose\Component\Core\JWK; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-6 * * @internal */ -final class NestingTest extends NestedTokenTest +final class NestingTestCase extends NestedTokenTestCase { - /** - * @test - */ + #[Test] public function decryption(): void { $payload = 'eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJob2JiaXRvbi5leGFtcGxlIiwiZXhwIjoxMzAwODE5MzgwLCJodHRwOi8vZXhhbXBsZS5jb20vaXNfcm9vdCI6dHJ1ZX0.dPpMqwRZxFYi1UfcDAaf8M99o7kwUWtiXZ-ByvVuJih4MhJ_aZqciprz0OWaIAkIvn1qskChirjKvY9ESZNUCP4JjvfyPS-nqjJxYoA5ztWOyFk2cZNIPXjcJXSQwXPO9tEe-v4VSqgD0aKHqPxYog4N6Cz1lKph1U1sYDSI67_bLL7elg_vkjfMp5_W5l5LuUYGMeh6hxQIaIUXf9EwV2JmvTMuZ-vBOWy0Sniy1EFo72CRTvmtrIf5AROo5MNliY3KtUxeP-SOmD-LEYwW9SlkohYzMVAZDDOrVbv7KVRHpeYNaK75KEQqdCEEkS_rskZS-Qtt_nlegTWh1mEYaA'; diff --git a/tests/Component/NestedToken/NestingTokenBuilderTest.php b/tests/Component/NestedToken/NestingTokenBuilderTest.php index a46e7903b..c8856f6a7 100644 --- a/tests/Component/NestedToken/NestingTokenBuilderTest.php +++ b/tests/Component/NestedToken/NestingTokenBuilderTest.php @@ -19,6 +19,8 @@ use Jose\Component\Signature\JWSBuilder; use Jose\Component\Signature\JWSBuilderFactory; use Jose\Component\Signature\Serializer as JwsSerializer; +use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -50,10 +52,8 @@ protected function setUp(): void } } - /** - * @test - * @doesNotPerformAssertions - */ + #[DoesNotPerformAssertions] + #[Test] public function decryption(): void { $payload = '{"iss":"hobbiton.example","exp":1300819380,"http://example.com/is_root":true}'; diff --git a/tests/Component/NestedToken/NestingTokenUsingNestedTokenLoaderTest.php b/tests/Component/NestedToken/NestingTokenUsingNestedTokenLoaderTest.php index c98c55eb8..c56242f23 100644 --- a/tests/Component/NestedToken/NestingTokenUsingNestedTokenLoaderTest.php +++ b/tests/Component/NestedToken/NestingTokenUsingNestedTokenLoaderTest.php @@ -24,6 +24,7 @@ use Jose\Component\Signature\JWSTokenSupport; use Jose\Component\Signature\JWSVerifierFactory; use Jose\Component\Signature\Serializer as JwsSerializer; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -57,9 +58,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function decryption(): void { $payload = '{"iss":"hobbiton.example","exp":1300819380,"http://example.com/is_root":true}'; diff --git a/tests/Component/Signature/ForeignJWTTestCase.php b/tests/Component/Signature/ForeignJWTTestCase.php index a460c8cde..cc7c814c6 100644 --- a/tests/Component/Signature/ForeignJWTTestCase.php +++ b/tests/Component/Signature/ForeignJWTTestCase.php @@ -5,6 +5,7 @@ namespace Jose\Tests\Component\Signature; use Jose\Component\Core\JWK; +use PHPUnit\Framework\Attributes\Test; /** * @internal @@ -15,10 +16,7 @@ final class ForeignJWTTestCase extends SignatureTestCase * The following test uses an assertion created with another library. * This assertion is valid if verified with the JWK. */ - - /** - * @test - */ + #[Test] public function validJWTFromOtherLibrary(): void { $jwk = new JWK([ diff --git a/tests/Component/Signature/JWSFlattenedTestCase.php b/tests/Component/Signature/JWSFlattenedTestCase.php index 8b0298d6f..896e4bbd3 100644 --- a/tests/Component/Signature/JWSFlattenedTestCase.php +++ b/tests/Component/Signature/JWSFlattenedTestCase.php @@ -4,6 +4,7 @@ namespace Jose\Tests\Component\Signature; +use PHPUnit\Framework\Attributes\Test; use const JSON_THROW_ON_ERROR; /** @@ -13,9 +14,8 @@ final class JWSFlattenedTestCase extends SignatureTestCase { /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.5 - * - * @test */ + #[Test] public function loadFlattenedJWS(): void { $loaded = $this->getJWSSerializerManager() diff --git a/tests/Component/Signature/JWSLoaderTestCase.php b/tests/Component/Signature/JWSLoaderTestCase.php index 0aed2fbcb..d9fdfc422 100644 --- a/tests/Component/Signature/JWSLoaderTestCase.php +++ b/tests/Component/Signature/JWSLoaderTestCase.php @@ -7,6 +7,7 @@ use Exception; use Jose\Component\Core\JWK; use Jose\Component\Signature\JWSLoader; +use PHPUnit\Framework\Attributes\Test; /** * @internal @@ -15,9 +16,7 @@ final class JWSLoaderTestCase extends SignatureTestCase { private ?JWSLoader $jwsLoader = null; - /** - * @test - */ + #[Test] public function theFlattenedTokenCannotBeLoaded(): void { $this->expectException(Exception::class); @@ -36,9 +35,7 @@ public function theFlattenedTokenCannotBeLoaded(): void ->loadAndVerifyWithKey($token, $key, $signature); } - /** - * @test - */ + #[Test] public function theTokenCannotBeVerifiedBecauseOfAnUnsupportedAlgorithm(): void { $this->expectException(Exception::class); @@ -57,9 +54,7 @@ public function theTokenCannotBeVerifiedBecauseOfAnUnsupportedAlgorithm(): void ->loadAndVerifyWithKey($token, $key, $signature); } - /** - * @test - */ + #[Test] public function theTokenCannotBeVerifiedBecauseOfABadKey(): void { $this->expectException(Exception::class); @@ -78,9 +73,7 @@ public function theTokenCannotBeVerifiedBecauseOfABadKey(): void ->loadAndVerifyWithKey($token, $key, $signature); } - /** - * @test - */ + #[Test] public function theTokenCanBeVerified(): void { $token = 'eyJhbGciOiJIUzI1NiIsImtpZCI6IjAxOGMwYWU1LTRkOWItNDcxYi1iZmQ2LWVlZjMxNGJjNzAzNyJ9.SXTigJlzIGEgZGFuZ2Vyb3VzIGJ1c2luZXNzLCBGcm9kbywgZ29pbmcgb3V0IHlvdXIgZG9vci4gWW91IHN0ZXAgb250byB0aGUgcm9hZCwgYW5kIGlmIHlvdSBkb24ndCBrZWVwIHlvdXIgZmVldCwgdGhlcmXigJlzIG5vIGtub3dpbmcgd2hlcmUgeW91IG1pZ2h0IGJlIHN3ZXB0IG9mZiB0by4.s0h6KThzkfBBBkLspW1h84VsJZFTsPPqMDA7g1Md7p0'; diff --git a/tests/Component/Signature/JWSSplitTestCase.php b/tests/Component/Signature/JWSSplitTestCase.php index 7a73a9735..1a1e48185 100644 --- a/tests/Component/Signature/JWSSplitTestCase.php +++ b/tests/Component/Signature/JWSSplitTestCase.php @@ -5,15 +5,14 @@ namespace Jose\Tests\Component\Signature; use Jose\Component\Signature\Serializer\JSONGeneralSerializer; +use PHPUnit\Framework\Attributes\Test; /** * @internal */ final class JWSSplitTestCase extends SignatureTestCase { - /** - * @test - */ + #[Test] public function aJwsObjectWithMoreThanOneRecipientCanBeSplittedIntoSeveralJwsObjects(): void { $input = '{"payload":"SXTigJlzIGEgZGFuZ2Vyb3VzIGJ1c2luZXNzLCBGcm9kbywgZ29pbmcgb3V0IHlvdXIgZG9vci4gWW91IHN0ZXAgb250byB0aGUgcm9hZCwgYW5kIGlmIHlvdSBkb24ndCBrZWVwIHlvdXIgZmVldCwgdGhlcmXigJlzIG5vIGtub3dpbmcgd2hlcmUgeW91IG1pZ2h0IGJlIHN3ZXB0IG9mZiB0by4","signatures":[{"protected":"eyJhbGciOiJSUzI1NiJ9","header":{"kid":"bilbo.baggins@hobbiton.example"},"signature":"MIsjqtVlOpa71KE-Mss8_Nq2YH4FGhiocsqrgi5NvyG53uoimic1tcMdSg-qptrzZc7CG6Svw2Y13TDIqHzTUrL_lR2ZFcryNFiHkSw129EghGpwkpxaTn_THJTCglNbADko1MZBCdwzJxwqZc-1RlpO2HibUYyXSwO97BSe0_evZKdjvvKSgsIqjytKSeAMbhMBdMma622_BG5t4sdbuCHtFjp9iJmkio47AIwqkZV1aIZsv33uPUqBBCXbYoQJwt7mxPftHmNlGoOSMxR_3thmXTCm4US-xiNOyhbm8afKK64jU6_TPtQHiJeQJxz9G3Tx-083B745_AfYOnlC9w"},{"header":{"alg":"ES512","kid":"bilbo.baggins@hobbiton.example"},"signature":"ARcVLnaJJaUWG8fG-8t5BREVAuTY8n8YHjwDO1muhcdCoFZFFjfISu0Cdkn9Ybdlmi54ho0x924DUz8sK7ZXkhc7AFM8ObLfTvNCrqcI3Jkl2U5IX3utNhODH6v7xgy1Qahsn0fyb4zSAkje8bAWz4vIfj5pCMYxxm4fgV3q7ZYhm5eD"},{"protected":"eyJhbGciOiJIUzI1NiIsImtpZCI6IjAxOGMwYWU1LTRkOWItNDcxYi1iZmQ2LWVlZjMxNGJjNzAzNyJ9","signature":"s0h6KThzkfBBBkLspW1h84VsJZFTsPPqMDA7g1Md7p0"}]}'; diff --git a/tests/Component/Signature/JWSTestCase.php b/tests/Component/Signature/JWSTestCase.php index 045d78a2f..442877bb2 100644 --- a/tests/Component/Signature/JWSTestCase.php +++ b/tests/Component/Signature/JWSTestCase.php @@ -6,18 +6,17 @@ use InvalidArgumentException; use Jose\Component\Signature\JWS; -use const JSON_THROW_ON_ERROR; use LogicException; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; +use const JSON_THROW_ON_ERROR; /** * @internal */ final class JWSTestCase extends SignatureTestCase { - /** - * @test - */ + #[Test] public function jWS(): void { $claims = [ @@ -42,9 +41,7 @@ public function jWS(): void static::assertSame([], $jws->getSignature(0)->getHeader()); } - /** - * @test - */ + #[Test] public function toCompactJSONFailed(): void { $this->expectException(InvalidArgumentException::class); @@ -63,9 +60,7 @@ public function toCompactJSONFailed(): void ->serialize('jws_compact', $jws, 0); } - /** - * @test - */ + #[Test] public function toFlattenedJSONFailed(): void { $this->expectException(InvalidArgumentException::class); @@ -84,9 +79,7 @@ public function toFlattenedJSONFailed(): void ->serialize('jws_json_flattened', $jws, 0); } - /** - * @test - */ + #[Test] public function toJSONFailed(): void { $this->expectException(LogicException::class); @@ -105,9 +98,7 @@ public function toJSONFailed(): void ->serialize('jws_json_general', $jws, 0); } - /** - * @test - */ + #[Test] public function signatureContainsUnprotectedHeader(): void { $this->expectException(LogicException::class); @@ -135,9 +126,7 @@ public function signatureContainsUnprotectedHeader(): void ->serialize('jws_compact', $jws, 0); } - /** - * @test - */ + #[Test] public function signatureDoesNotContainHeader(): void { $this->expectException(InvalidArgumentException::class); @@ -160,9 +149,7 @@ public function signatureDoesNotContainHeader(): void ->getHeaderParameter('foo'); } - /** - * @test - */ + #[Test] public function signatureDoesNotContainProtectedHeader(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/Component/Signature/RFC7520/MultipleSignaturesTestCase.php b/tests/Component/Signature/RFC7520/MultipleSignaturesTestCase.php index 32191d5cd..894914b11 100644 --- a/tests/Component/Signature/RFC7520/MultipleSignaturesTestCase.php +++ b/tests/Component/Signature/RFC7520/MultipleSignaturesTestCase.php @@ -6,6 +6,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Signature\SignatureTestCase; +use PHPUnit\Framework\Attributes\Test; /** * @see https://tools.ietf.org/html/rfc7520#section-4.8 @@ -14,9 +15,7 @@ */ final class MultipleSignaturesTestCase extends SignatureTestCase { - /** - * @test - */ + #[Test] public function multipleSignatures(): void { /** diff --git a/tests/Component/Signature/RFC7520/NestingTestCase.php b/tests/Component/Signature/RFC7520/NestingTestCase.php index 7e072d682..93f7c81dc 100644 --- a/tests/Component/Signature/RFC7520/NestingTestCase.php +++ b/tests/Component/Signature/RFC7520/NestingTestCase.php @@ -6,6 +6,7 @@ use Jose\Component\Core\JWK; use Jose\Tests\Component\Signature\SignatureTestCase; +use PHPUnit\Framework\Attributes\Test; use const JSON_THROW_ON_ERROR; /** @@ -15,9 +16,7 @@ */ final class NestingTestCase extends SignatureTestCase { - /** - * @test - */ + #[Test] public function signatureVerification(): void { $payload = [ diff --git a/tests/Component/Signature/SignerTestCase.php b/tests/Component/Signature/SignerTestCase.php index d2607be32..db1bd1bd8 100644 --- a/tests/Component/Signature/SignerTestCase.php +++ b/tests/Component/Signature/SignerTestCase.php @@ -8,18 +8,17 @@ use Jose\Component\Core\JWK; use Jose\Component\Core\JWKSet; use Jose\Component\Signature\Serializer\CompactSerializer; -use const JSON_THROW_ON_ERROR; use LogicException; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; +use const JSON_THROW_ON_ERROR; /** * @internal */ final class SignerTestCase extends SignatureTestCase { - /** - * @test - */ + #[Test] public function algParameterIsMissing(): void { $this->expectException(InvalidArgumentException::class); @@ -34,9 +33,7 @@ public function algParameterIsMissing(): void ->build(); } - /** - * @test - */ + #[Test] public function algParameterIsNotSupported(): void { $this->expectException(InvalidArgumentException::class); @@ -53,9 +50,7 @@ public function algParameterIsNotSupported(): void ->build(); } - /** - * @test - */ + #[Test] public function duplicatedHeader(): void { $this->expectException(InvalidArgumentException::class); @@ -74,9 +69,7 @@ public function duplicatedHeader(): void ]); } - /** - * @test - */ + #[Test] public function signAndLoadCompact(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -101,9 +94,7 @@ public function signAndLoadCompact(): void static::assertSame('RS512', $loaded->getSignature(1)->getProtectedHeaderParameter('alg')); } - /** - * @test - */ + #[Test] public function signMultipleInstructionWithCompactRepresentation(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -132,9 +123,7 @@ public function signMultipleInstructionWithCompactRepresentation(): void ); } - /** - * @test - */ + #[Test] public function signMultipleInstructionWithCompactRepresentationUsingBuilder(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -163,9 +152,7 @@ public function signMultipleInstructionWithCompactRepresentationUsingBuilder(): ); } - /** - * @test - */ + #[Test] public function signMultipleInstructionWithCompactRepresentationUsingBuilderAndDetachedPayload(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -194,9 +181,7 @@ public function signMultipleInstructionWithCompactRepresentationUsingBuilderAndD ); } - /** - * @test - */ + #[Test] public function createCompactJWSUsingFactory(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -268,9 +253,7 @@ public function createCompactJWSUsingFactory(): void static::assertTrue($jwsVerifier->verifyWithKey($loaded_3, $this->getKey2(), 0, 'Live long and Prosper.')); } - /** - * @test - */ + #[Test] public function signMultipleInstructionWithFlattenedRepresentation(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -299,9 +282,7 @@ public function signMultipleInstructionWithFlattenedRepresentation(): void ); } - /** - * @test - */ + #[Test] public function createFlattenedJWSUsingFactory(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -380,9 +361,7 @@ public function createFlattenedJWSUsingFactory(): void static::assertTrue($jwsVerifier->verifyWithKey($loaded_3, $this->getKey2(), 0, 'Live long and Prosper.')); } - /** - * @test - */ + #[Test] public function algorithmNotAllowedForTheKey(): void { $this->expectException(InvalidArgumentException::class); @@ -399,9 +378,7 @@ public function algorithmNotAllowedForTheKey(): void ->build(); } - /** - * @test - */ + #[Test] public function operationNotAllowedForTheKey(): void { $this->expectException(InvalidArgumentException::class); @@ -418,9 +395,7 @@ public function operationNotAllowedForTheKey(): void ->build(); } - /** - * @test - */ + #[Test] public function signAndLoadFlattened(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -442,9 +417,7 @@ public function signAndLoadFlattened(): void static::assertSame('HS512', $loaded->getSignature(0)->getProtectedHeaderParameter('alg')); } - /** - * @test - */ + #[Test] public function signAndLoad(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -476,9 +449,7 @@ public function signAndLoad(): void static::assertSame('RS512', $loaded->getSignature(1)->getProtectedHeaderParameter('alg')); } - /** - * @test - */ + #[Test] public function signAndLoadWithWrongKeys(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -502,9 +473,7 @@ public function signAndLoadWithWrongKeys(): void static::assertFalse($jwsVerifier->verifyWithKeySet($loaded, $this->getSymmetricKeySet(), 0)); } - /** - * @test - */ + #[Test] public function signAndLoadWithUnsupportedAlgorithm(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -528,9 +497,7 @@ public function signAndLoadWithUnsupportedAlgorithm(): void static::assertFalse($jwsVerifier->verifyWithKeySet($loaded, $this->getSymmetricKeySet(), 0)); } - /** - * @test - */ + #[Test] public function signAndLoadWithJWSWithoutSignatures(): void { $this->expectException(InvalidArgumentException::class); @@ -553,9 +520,8 @@ public function signAndLoadWithJWSWithoutSignatures(): void /** * @see https://tools.ietf.org/html/rfc7797#section-4 * @see https://tools.ietf.org/html/rfc7797#section-4.2 - * - * @test */ + #[Test] public function compactJSONWithUnencodedPayloadFailsBecauseOfForbiddenCharacters(): void { $this->expectException(LogicException::class); @@ -587,9 +553,8 @@ public function compactJSONWithUnencodedPayloadFailsBecauseOfForbiddenCharacters /** * @see https://tools.ietf.org/html/rfc7797#section-4 * @see https://tools.ietf.org/html/rfc7797#section-4.2 - * - * @test */ + #[Test] public function compactJSONWithUnencodedPayloadSucceeded(): void { $protectedHeader = [ @@ -629,9 +594,8 @@ public function compactJSONWithUnencodedPayloadSucceeded(): void /** * @see https://tools.ietf.org/html/rfc7797#section-4 * @see https://tools.ietf.org/html/rfc7797#section-4.2 - * - * @test */ + #[Test] public function compactJSONWithUnencodedDetachedPayload(): void { $payload = '$.02'; @@ -671,9 +635,8 @@ public function compactJSONWithUnencodedDetachedPayload(): void /** * The library is able to support multiple payload encoding and conversion in JSON if payload is detached. - * - * @test */ + #[Test] public function compactJSONWithUnencodedDetachedPayloadAndMultipleSignatures(): void { $payload = '$.02'; @@ -706,11 +669,8 @@ public function compactJSONWithUnencodedDetachedPayloadAndMultipleSignatures(): $expected_result = '{"signatures":[{"signature":"A5dxf2s96_n5FLueVuW1Z_vh161FwXZC4YLPff6dmDY","protected":"eyJhbGciOiJIUzI1NiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19"},{"signature":"Mp-m-Vyst0zYCNkpg2RiIN8W9GO4nLU3FKsFtHzEcP4tgR4QcMys1_2m9HrDwszi0Cp2gv_Lioe6UPCcTNn6tQ","protected":"eyJhbGciOiJIUzUxMiIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19"}]}'; - static::assertSame( - $expected_result, - $this->getJWSSerializerManager() - ->serialize('jws_json_general', $jws, 0) - ); + static::assertSame($expected_result, $this->getJWSSerializerManager() + ->serialize('jws_json_general', $jws, 0)); $loaded = $this->getJWSSerializerManager() ->unserialize($expected_result); @@ -721,9 +681,8 @@ public function compactJSONWithUnencodedDetachedPayloadAndMultipleSignatures(): /** * The library is able to support multiple payload encoding and conversion in JSON is not available if payload is * not detached. - * - * @test */ + #[Test] public function compactJSONWithUnencodedPayloadAndMultipleSignatures(): void { $this->expectException(LogicException::class); @@ -757,9 +716,7 @@ public function compactJSONWithUnencodedPayloadAndMultipleSignatures(): void ->serialize('jws_json_general', $jws, 0); } - /** - * @test - */ + #[Test] public function jWSWithUnencodedPayloadButNoCritHeader(): void { $this->expectException(LogicException::class); @@ -789,9 +746,7 @@ public function jWSWithUnencodedPayloadButNoCritHeader(): void ->serialize('jws_compact', $jws, 0); } - /** - * @test - */ + #[Test] public function jWSWithUnencodedPayloadButCritHeaderIsNotAnArray(): void { $this->expectException(LogicException::class); @@ -820,9 +775,7 @@ public function jWSWithUnencodedPayloadButCritHeaderIsNotAnArray(): void ->serialize('jws_compact', $jws, 0); } - /** - * @test - */ + #[Test] public function jWSWithUnencodedPayloadButCritHeaderDoesNotContainB64(): void { $this->expectException(LogicException::class); @@ -856,9 +809,8 @@ public function jWSWithUnencodedPayloadButCritHeaderDoesNotContainB64(): void /** * @see https://tools.ietf.org/html/rfc7797#section-4 * @see https://tools.ietf.org/html/rfc7797#section-4.2 - * - * @test */ + #[Test] public function flattenedJSONWithUnencodedPayload(): void { $payload = '$.02'; @@ -904,9 +856,8 @@ public function flattenedJSONWithUnencodedPayload(): void /** * @see https://tools.ietf.org/html/rfc7797#section-4 * @see https://tools.ietf.org/html/rfc7797#section-4.2 - * - * @test */ + #[Test] public function flattenedJSONWithUnencodedDetachedPayload(): void { $payload = '$.02'; @@ -939,9 +890,7 @@ public function flattenedJSONWithUnencodedDetachedPayload(): void static::assertSame($expected_result, json_decode($jws, true, 512, JSON_THROW_ON_ERROR)); } - /** - * @test - */ + #[Test] public function signAndLoadWithoutAlgParameterInTheHeader(): void { $this->expectException(InvalidArgumentException::class); @@ -961,9 +910,7 @@ public function signAndLoadWithoutAlgParameterInTheHeader(): void static::assertTrue($jwsVerifier->verifyWithKeySet($loaded, $this->getSymmetricKeySet(), 0)); } - /** - * @test - */ + #[Test] public function signAndLoadJWKSet(): void { $jwsBuilder = $this->getJWSBuilderFactory() @@ -997,9 +944,7 @@ public function signAndLoadJWKSet(): void static::assertSame('RS512', $loaded->getSignature(1)->getProtectedHeaderParameter('alg')); } - /** - * @test - */ + #[Test] public function keySetIsEmpty(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/ComposerJsonTest.php b/tests/ComposerJsonTest.php index 6177951e4..87ba7dce3 100644 --- a/tests/ComposerJsonTest.php +++ b/tests/ComposerJsonTest.php @@ -5,10 +5,11 @@ namespace Jose; use DirectoryIterator; -use function in_array; -use const JSON_THROW_ON_ERROR; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use Traversable; +use function in_array; +use const JSON_THROW_ON_ERROR; /** * @internal @@ -20,9 +21,7 @@ final class ComposerJsonTest extends TestCase { private const SRC_DIR = __DIR__ . '/../src'; - /** - * @test - */ + #[Test] public function packageDependenciesEqualRootDependencies(): void { $usedDependencies = ['symfony/symfony']; // Some builds add this to composer.json @@ -63,9 +62,7 @@ public function packageDependenciesEqualRootDependencies(): void static::assertCount(0, $unusedDependencies, $message); } - /** - * @test - */ + #[Test] public function rootReplacesSubPackages(): void { $rootReplaces = $this->getComposerReplaces(__DIR__ . '/../composer.json'); diff --git a/tests/EncryptionAlgorithm/ContentEncryption/AESCBC/AESCBC_HSContentEncryptionTest.php b/tests/EncryptionAlgorithm/ContentEncryption/AESCBC/AESCBC_HSContentEncryptionTest.php index 2794c4972..e97906048 100644 --- a/tests/EncryptionAlgorithm/ContentEncryption/AESCBC/AESCBC_HSContentEncryptionTest.php +++ b/tests/EncryptionAlgorithm/ContentEncryption/AESCBC/AESCBC_HSContentEncryptionTest.php @@ -8,6 +8,7 @@ use Jose\Component\Encryption\Algorithm\ContentEncryption\A192CBCHS384; use Jose\Component\Encryption\Algorithm\ContentEncryption\A256CBCHS512; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use ReflectionClass; use ReflectionMethod; @@ -21,9 +22,8 @@ final class AESCBC_HSContentEncryptionTest extends TestCase { /** * @see https://tools.ietf.org/html/rfc7516#appendix-B - * - * @test */ + #[Test] public function a128CBCHS256EncryptAndDecrypt(): void { $header = Base64UrlSafe::encodeUnpadded(json_encode([ @@ -120,9 +120,7 @@ public function a128CBCHS256EncryptAndDecrypt(): void static::assertSame($expected_T, $T); } - /** - * @test - */ + #[Test] public function badTag(): void { $this->expectException(RuntimeException::class); @@ -214,9 +212,8 @@ public function badTag(): void /** * @see https://tools.ietf.org/html/rfc7518#appendix-B.1 - * - * @test */ + #[Test] public function a128CBCHS256EncryptAndDecryptBis(): void { $header = Base64UrlSafe::encodeUnpadded(json_encode([ @@ -252,9 +249,8 @@ public function a128CBCHS256EncryptAndDecryptBis(): void /** * @see https://tools.ietf.org/html/rfc7518#appendix-B.2 - * - * @test */ + #[Test] public function a192CBCHS384EncryptAndDecrypt(): void { $header = Base64UrlSafe::encodeUnpadded(json_encode([])); @@ -288,9 +284,8 @@ public function a192CBCHS384EncryptAndDecrypt(): void /** * @see https://tools.ietf.org/html/rfc7518#appendix-B.3 - * - * @test */ + #[Test] public function a256CBCHS512EncryptAndDecrypt(): void { $header = Base64UrlSafe::encodeUnpadded(json_encode([])); diff --git a/tests/EncryptionAlgorithm/ContentEncryption/AESGCM/AESGCMContentEncryptionTest.php b/tests/EncryptionAlgorithm/ContentEncryption/AESGCM/AESGCMContentEncryptionTest.php index f671c2bb7..74e044886 100644 --- a/tests/EncryptionAlgorithm/ContentEncryption/AESGCM/AESGCMContentEncryptionTest.php +++ b/tests/EncryptionAlgorithm/ContentEncryption/AESGCM/AESGCMContentEncryptionTest.php @@ -8,6 +8,7 @@ use Jose\Component\Encryption\Algorithm\ContentEncryption\A192GCM; use Jose\Component\Encryption\Algorithm\ContentEncryption\A256GCM; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use const STR_PAD_LEFT; @@ -16,9 +17,7 @@ */ final class AESGCMContentEncryptionTest extends TestCase { - /** - * @test - */ + #[Test] public function a128GCMEncryptAndDecrypt(): void { $header = Base64UrlSafe::encodeUnpadded(json_encode([ @@ -39,9 +38,7 @@ public function a128GCMEncryptAndDecrypt(): void static::assertSame($plaintext, $algorithm->decryptContent($cyphertext, $cek, $iv, null, $header, $tag)); } - /** - * @test - */ + #[Test] public function a192GCMEncryptAndDecrypt(): void { $header = Base64UrlSafe::encodeUnpadded(json_encode([ @@ -62,9 +59,7 @@ public function a192GCMEncryptAndDecrypt(): void static::assertSame($plaintext, $algorithm->decryptContent($cyphertext, $cek, $iv, null, $header, $tag)); } - /** - * @test - */ + #[Test] public function a256GCMEncryptAndDecrypt(): void { $header = Base64UrlSafe::encodeUnpadded(json_encode([ @@ -87,9 +82,8 @@ public function a256GCMEncryptAndDecrypt(): void /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.1 - * - * @test */ + #[Test] public function a256GCMDecryptTestVector(): void { $algorithm = new A256GCM(); diff --git a/tests/EncryptionAlgorithm/Experimental/AESCTRContentEncryptionTest.php b/tests/EncryptionAlgorithm/Experimental/AESCTRContentEncryptionTest.php index 5d74eb708..717b9b729 100644 --- a/tests/EncryptionAlgorithm/Experimental/AESCTRContentEncryptionTest.php +++ b/tests/EncryptionAlgorithm/Experimental/AESCTRContentEncryptionTest.php @@ -8,6 +8,7 @@ use Jose\Component\Encryption\Algorithm\KeyEncryption\A128CTR; use Jose\Component\Encryption\Algorithm\KeyEncryption\A192CTR; use Jose\Component\Encryption\Algorithm\KeyEncryption\A256CTR; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -15,9 +16,7 @@ */ final class AESCTRContentEncryptionTest extends TestCase { - /** - * @test - */ + #[Test] public function a128CTRKeyEncryptionAndDecryption(): void { $header = []; @@ -32,9 +31,7 @@ public function a128CTRKeyEncryptionAndDecryption(): void static::assertSame($cek, $decrypted); } - /** - * @test - */ + #[Test] public function a192CTRKeyEncryptionAndDecryption(): void { $header = []; @@ -49,9 +46,7 @@ public function a192CTRKeyEncryptionAndDecryption(): void static::assertSame($cek, $decrypted); } - /** - * @test - */ + #[Test] public function a256CTRKeyEncryptionAndDecryption(): void { $header = []; diff --git a/tests/EncryptionAlgorithm/Experimental/Chacha20Poly1305ContentEncryptionTest.php b/tests/EncryptionAlgorithm/Experimental/Chacha20Poly1305ContentEncryptionTest.php index 8d4f64df7..5d3b2c010 100644 --- a/tests/EncryptionAlgorithm/Experimental/Chacha20Poly1305ContentEncryptionTest.php +++ b/tests/EncryptionAlgorithm/Experimental/Chacha20Poly1305ContentEncryptionTest.php @@ -4,11 +4,12 @@ namespace Jose\Tests\Component\Encryption\Algorithm; -use function in_array; use Jose\Component\Core\JWK; use Jose\Component\Encryption\Algorithm\KeyEncryption\Chacha20Poly1305; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use Throwable; +use function in_array; /** * @internal @@ -22,9 +23,7 @@ protected function setUp(): void } } - /** - * @test - */ + #[Test] public function contentEncryptionAndDecryption(): void { $header = []; diff --git a/tests/EncryptionAlgorithm/Experimental/RSAOAEPKeyEncryptionTest.php b/tests/EncryptionAlgorithm/Experimental/RSAOAEPKeyEncryptionTest.php index 71dbc0328..bf57ca32e 100644 --- a/tests/EncryptionAlgorithm/Experimental/RSAOAEPKeyEncryptionTest.php +++ b/tests/EncryptionAlgorithm/Experimental/RSAOAEPKeyEncryptionTest.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Component\Encryption\Algorithm\KeyEncryption\RSAOAEP384; use Jose\Component\Encryption\Algorithm\KeyEncryption\RSAOAEP512; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -16,9 +17,7 @@ */ final class RSAOAEPKeyEncryptionTest extends TestCase { - /** - * @test - */ + #[Test] public function rSAOAEP384EncryptionAndDecryption(): void { $header = []; @@ -33,9 +32,7 @@ public function rSAOAEP384EncryptionAndDecryption(): void static::assertSame($cek, $decrypted); } - /** - * @test - */ + #[Test] public function rSAOAEP512EncryptionAndDecryption(): void { $header = []; diff --git a/tests/EncryptionAlgorithm/KeyEncryption/AESGCMKW/AESGCMKWKeyEncryptionTest.php b/tests/EncryptionAlgorithm/KeyEncryption/AESGCMKW/AESGCMKWKeyEncryptionTest.php index 77b73bf77..63e608c0d 100644 --- a/tests/EncryptionAlgorithm/KeyEncryption/AESGCMKW/AESGCMKWKeyEncryptionTest.php +++ b/tests/EncryptionAlgorithm/KeyEncryption/AESGCMKW/AESGCMKWKeyEncryptionTest.php @@ -10,6 +10,7 @@ use Jose\Component\Encryption\Algorithm\KeyEncryption\A192GCMKW; use Jose\Component\Encryption\Algorithm\KeyEncryption\A256GCMKW; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -17,9 +18,7 @@ */ final class AESGCMKWKeyEncryptionTest extends TestCase { - /** - * @test - */ + #[Test] public function a128GCMKW(): void { $header = []; @@ -41,9 +40,7 @@ public function a128GCMKW(): void static::assertSame($cek, $aeskw->unwrapKey($key, $wrapped_cek, $header)); } - /** - * @test - */ + #[Test] public function badKey(): void { $this->expectException(InvalidArgumentException::class); @@ -61,9 +58,7 @@ public function badKey(): void $aeskw->wrapKey($key, $cek, $header, $header); } - /** - * @test - */ + #[Test] public function missingParameters(): void { $this->expectException(InvalidArgumentException::class); @@ -82,9 +77,7 @@ public function missingParameters(): void $aeskw->unwrapKey($key, $cek, $header); } - /** - * @test - */ + #[Test] public function a192GCMKW(): void { $header = []; @@ -106,9 +99,7 @@ public function a192GCMKW(): void static::assertSame($cek, $aeskw->unwrapKey($key, $wrapped_cek, $header)); } - /** - * @test - */ + #[Test] public function a256GCMKW(): void { $header = []; diff --git a/tests/EncryptionAlgorithm/KeyEncryption/AESKW/AESKWKeyEncryptionTest.php b/tests/EncryptionAlgorithm/KeyEncryption/AESKW/AESKWKeyEncryptionTest.php index a543e69ea..4ca0f1cc0 100644 --- a/tests/EncryptionAlgorithm/KeyEncryption/AESKW/AESKWKeyEncryptionTest.php +++ b/tests/EncryptionAlgorithm/KeyEncryption/AESKW/AESKWKeyEncryptionTest.php @@ -10,6 +10,7 @@ use Jose\Component\Encryption\Algorithm\KeyEncryption\A192KW; use Jose\Component\Encryption\Algorithm\KeyEncryption\A256KW; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -17,9 +18,7 @@ */ final class AESKWKeyEncryptionTest extends TestCase { - /** - * @test - */ + #[Test] public function a128KW(): void { $header = []; @@ -41,9 +40,7 @@ public function a128KW(): void static::assertSame($cek, $aeskw->unwrapKey($key, $wrapped_cek, $header)); } - /** - * @test - */ + #[Test] public function badKey(): void { $this->expectException(InvalidArgumentException::class); @@ -61,9 +58,7 @@ public function badKey(): void $aeskw->wrapKey($key, $cek, $header, $header); } - /** - * @test - */ + #[Test] public function a192KW(): void { $header = []; @@ -85,9 +80,7 @@ public function a192KW(): void static::assertSame($cek, $aeskw->unwrapKey($key, $wrapped_cek, $header)); } - /** - * @test - */ + #[Test] public function a256KW(): void { $header = []; diff --git a/tests/EncryptionAlgorithm/KeyEncryption/Direct/DirAlgorithmTest.php b/tests/EncryptionAlgorithm/KeyEncryption/Direct/DirAlgorithmTest.php index 0210e0152..18bb46849 100644 --- a/tests/EncryptionAlgorithm/KeyEncryption/Direct/DirAlgorithmTest.php +++ b/tests/EncryptionAlgorithm/KeyEncryption/Direct/DirAlgorithmTest.php @@ -8,6 +8,7 @@ use Jose\Component\Core\JWK; use Jose\Component\Encryption\Algorithm\KeyEncryption\Dir; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -17,9 +18,7 @@ */ final class DirAlgorithmTest extends TestCase { - /** - * @test - */ + #[Test] public function invalidKey(): void { $this->expectException(InvalidArgumentException::class); @@ -34,9 +33,7 @@ public function invalidKey(): void $dir->getCEK($key); } - /** - * @test - */ + #[Test] public function validCEK(): void { $key = new JWK([ diff --git a/tests/EncryptionAlgorithm/KeyEncryption/ECDHES/ECDHESKeyAgreementTest.php b/tests/EncryptionAlgorithm/KeyEncryption/ECDHES/ECDHESKeyAgreementTest.php index 5ae4d9c33..2817dbbb8 100644 --- a/tests/EncryptionAlgorithm/KeyEncryption/ECDHES/ECDHESKeyAgreementTest.php +++ b/tests/EncryptionAlgorithm/KeyEncryption/ECDHES/ECDHESKeyAgreementTest.php @@ -11,6 +11,7 @@ use Jose\Component\Encryption\Algorithm\KeyEncryption\ECDHESA192KW; use Jose\Component\Encryption\Algorithm\KeyEncryption\ECDHESA256KW; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use const STR_PAD_LEFT; @@ -23,9 +24,8 @@ final class ECDHESKeyAgreementTest extends TestCase { /** * @see https://tools.ietf.org/html/rfc7518#appendix-C - * - * @test */ + #[Test] public function getAgreementKeyWithEllipticCurveKey(): void { $receiver = new JWK([ @@ -53,9 +53,8 @@ public function getAgreementKeyWithEllipticCurveKey(): void /** * @see https://tools.ietf.org/html/rfc7518#appendix-C - * - * @test */ + #[Test] public function getAgreementKeyWithA128KeyWrapAndWithOctetKeyPairKey(): void { $header = [ @@ -121,9 +120,7 @@ public function getAgreementKeyWithA128KeyWrapAndWithOctetKeyPairKey(): void static::assertSame($cek, $ecdh_es->unwrapAgreementKey($private, null, $encrypted_cek, 128, $header)); } - /** - * @test - */ + #[Test] public function getAgreementKeyWithA128KeyWrap(): void { $header = [ @@ -190,9 +187,7 @@ public function getAgreementKeyWithA128KeyWrap(): void static::assertSame($cek, $ecdh_es->unwrapAgreementKey($private, null, $encrypted_cek, 128, $header)); } - /** - * @test - */ + #[Test] public function getAgreementKeyWithA192KeyWrap(): void { $header = [ @@ -259,9 +254,7 @@ public function getAgreementKeyWithA192KeyWrap(): void static::assertSame($cek, $ecdh_es->unwrapAgreementKey($private, null, $encrypted_cek, 192, $header)); } - /** - * @test - */ + #[Test] public function getAgreementKeyWithA256KeyWrap(): void { $header = [ @@ -334,9 +327,7 @@ public function getAgreementKeyWithA256KeyWrap(): void static::assertSame($cek, $ecdh_es->unwrapAgreementKey($private, null, $encrypted_cek, 256, $header)); } - /** - * @test - */ + #[Test] public function ePKParameterAreMissing(): void { $this->expectException(InvalidArgumentException::class); @@ -354,9 +345,7 @@ public function ePKParameterAreMissing(): void $ecdh_es->getAgreementKey(256, 'A128GCM', $sender, null); } - /** - * @test - */ + #[Test] public function badEPKParameter(): void { $this->expectException(InvalidArgumentException::class); @@ -377,9 +366,7 @@ public function badEPKParameter(): void $ecdh_es->getAgreementKey(256, 'A128GCM', $sender, null, $header); } - /** - * @test - */ + #[Test] public function eCKeyHasMissingParameters(): void { $this->expectException(InvalidArgumentException::class); @@ -394,9 +381,7 @@ public function eCKeyHasMissingParameters(): void $ecdh_es->getAgreementKey(256, 'A128GCM', $receiver, null); } - /** - * @test - */ + #[Test] public function unsupportedCurve(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/EncryptionAlgorithm/KeyEncryption/ECDHSS/ECDHSSKeyAgreementTest.php b/tests/EncryptionAlgorithm/KeyEncryption/ECDHSS/ECDHSSKeyAgreementTest.php index 2ee6dd081..fda9eb770 100644 --- a/tests/EncryptionAlgorithm/KeyEncryption/ECDHSS/ECDHSSKeyAgreementTest.php +++ b/tests/EncryptionAlgorithm/KeyEncryption/ECDHSS/ECDHSSKeyAgreementTest.php @@ -9,6 +9,7 @@ use Jose\Component\Encryption\Algorithm\KeyEncryption\ECDHSSA128KW; use Jose\Component\Encryption\Algorithm\KeyEncryption\ECDHSSA192KW; use Jose\Component\Encryption\Algorithm\KeyEncryption\ECDHSSA256KW; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use const STR_PAD_LEFT; @@ -21,9 +22,8 @@ final class ECDHSSKeyAgreementTest extends TestCase { /** * @see https://tools.ietf.org/html/rfc7518#appendix-C - * - * @test */ + #[Test] public function getAgreementKey(): void { $receiver = new JWK([ @@ -52,9 +52,7 @@ public function getAgreementKey(): void static::assertArrayNotHasKey('epk', $additional_header_values); } - /** - * @test - */ + #[Test] public function getAgreementKeyWithA128KeyWrapAndOctetKeyPairKey(): void { $additional_header_values = [ @@ -128,9 +126,7 @@ public function getAgreementKeyWithA128KeyWrapAndOctetKeyPairKey(): void ); } - /** - * @test - */ + #[Test] public function getAgreementKeyWithA128KeyWrap(): void { $additional_header_values = [ @@ -206,9 +202,7 @@ public function getAgreementKeyWithA128KeyWrap(): void ); } - /** - * @test - */ + #[Test] public function getAgreementKeyWithA192KeyWrap(): void { $additional_header_values = [ @@ -285,9 +279,7 @@ public function getAgreementKeyWithA192KeyWrap(): void ); } - /** - * @test - */ + #[Test] public function getAgreementKeyWithA256KeyWrap(): void { $additional_header_values = [ diff --git a/tests/EncryptionAlgorithm/KeyEncryption/PBES2/PBES2_HS_AESKWKeyEncryptionTest.php b/tests/EncryptionAlgorithm/KeyEncryption/PBES2/PBES2_HS_AESKWKeyEncryptionTest.php index 961619fcd..9b9c85081 100644 --- a/tests/EncryptionAlgorithm/KeyEncryption/PBES2/PBES2_HS_AESKWKeyEncryptionTest.php +++ b/tests/EncryptionAlgorithm/KeyEncryption/PBES2/PBES2_HS_AESKWKeyEncryptionTest.php @@ -10,6 +10,7 @@ use Jose\Component\Encryption\Algorithm\KeyEncryption\PBES2HS384A192KW; use Jose\Component\Encryption\Algorithm\KeyEncryption\PBES2HS512A256KW; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use const STR_PAD_LEFT; @@ -22,9 +23,8 @@ final class PBES2_HS_AESKWKeyEncryptionTest extends TestCase { /** * @see https://tools.ietf.org/html/rfc7517#appendix-C - * - * @test */ + #[Test] public function pBES2HS256A128KW(): void { $header = [ @@ -132,9 +132,7 @@ public function pBES2HS256A128KW(): void static::assertSame($expected_cek, $pbes2->unwrapKey($key, $wrapped_cek, $header)); } - /** - * @test - */ + #[Test] public function pBES2HS256A128KWBis(): void { $header = [ @@ -240,9 +238,7 @@ public function pBES2HS256A128KWBis(): void static::assertSame($cek, $pbes2->unwrapKey($key, $encrypted_cek, $header)); } - /** - * @test - */ + #[Test] public function pBES2HS384A192KW(): void { $header = [ @@ -348,9 +344,7 @@ public function pBES2HS384A192KW(): void static::assertSame($cek, $pbes2->unwrapKey($key, $encrypted_cek, $header)); } - /** - * @test - */ + #[Test] public function pBES2HS512A256KW(): void { $header = [ @@ -456,9 +450,7 @@ public function pBES2HS512A256KW(): void static::assertSame($cek, $pbes2->unwrapKey($key, $encrypted_cek, $header)); } - /** - * @test - */ + #[Test] public function badKeyType(): void { $this->expectException(InvalidArgumentException::class); @@ -563,9 +555,7 @@ public function badKeyType(): void $pbes2->wrapKey($key, $cek, $header, $header); } - /** - * @test - */ + #[Test] public function invalidKeyType(): void { $this->expectException(InvalidArgumentException::class); @@ -670,9 +660,7 @@ public function invalidKeyType(): void $pbes2->wrapKey($key, $cek, $header, $header); } - /** - * @test - */ + #[Test] public function algorithmParameterIsMissing(): void { $this->expectException(InvalidArgumentException::class); @@ -776,9 +764,7 @@ public function algorithmParameterIsMissing(): void $pbes2->wrapKey($key, $cek, $header, $header); } - /** - * @test - */ + #[Test] public function p2CParameterIsMissing(): void { $this->expectException(InvalidArgumentException::class); @@ -850,9 +836,7 @@ public function p2CParameterIsMissing(): void $pbes2->unwrapKey($key, $wrapped_cek, $header); } - /** - * @test - */ + #[Test] public function p2SParameterIsMissing(): void { $this->expectException(InvalidArgumentException::class); diff --git a/tests/SignatureAlgorithm/ECDSA/ECDSAFromRFC6979Test.php b/tests/SignatureAlgorithm/ECDSA/ECDSAFromRFC6979Test.php index 3cbeb1fb4..e4e57aff3 100644 --- a/tests/SignatureAlgorithm/ECDSA/ECDSAFromRFC6979Test.php +++ b/tests/SignatureAlgorithm/ECDSA/ECDSAFromRFC6979Test.php @@ -10,6 +10,8 @@ use Jose\Component\Signature\Algorithm\ES512; use Jose\Component\Signature\Algorithm\SignatureAlgorithm; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -31,11 +33,9 @@ final class ECDSAFromRFC6979Test extends TestCase /** * @param string $message * @param string $signature - * - * @dataProvider dataWithVectors - * - * @test */ + #[DataProvider('dataWithVectors')] + #[Test] public function withVectors(SignatureAlgorithm $algorithm, $message, JWK $key, $signature): void { $is_valid = $algorithm->verify($key, $message, $signature); diff --git a/tests/SignatureAlgorithm/ECDSA/ECDSAFromRFC7520Test.php b/tests/SignatureAlgorithm/ECDSA/ECDSAFromRFC7520Test.php index c521bf1c7..f86e632e7 100644 --- a/tests/SignatureAlgorithm/ECDSA/ECDSAFromRFC7520Test.php +++ b/tests/SignatureAlgorithm/ECDSA/ECDSAFromRFC7520Test.php @@ -12,6 +12,7 @@ use Jose\Component\Signature\Serializer\CompactSerializer; use Jose\Component\Signature\Serializer\JSONFlattenedSerializer; use Jose\Component\Signature\Serializer\JSONGeneralSerializer; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -26,9 +27,8 @@ final class ECDSAFromRFC7520Test extends TestCase * always different). This test case create a signature and verifies it. Then the output given in the RFC is used * and verified. This way, we can say that the library is able to create/verify ECDSA signatures and verify * signature from test vectors. - * - * @test */ + #[Test] public function eS512(): void { /** diff --git a/tests/SignatureAlgorithm/ECDSA/ECDSASignatureTest.php b/tests/SignatureAlgorithm/ECDSA/ECDSASignatureTest.php index 1888a19a6..4d7700d2a 100644 --- a/tests/SignatureAlgorithm/ECDSA/ECDSASignatureTest.php +++ b/tests/SignatureAlgorithm/ECDSA/ECDSASignatureTest.php @@ -10,6 +10,7 @@ use Jose\Component\Signature\Algorithm\ES384; use Jose\Component\Signature\Algorithm\ES512; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -17,9 +18,7 @@ */ final class ECDSASignatureTest extends TestCase { - /** - * @test - */ + #[Test] public function invalidKey(): void { $this->expectException(InvalidArgumentException::class); @@ -34,9 +33,7 @@ public function invalidKey(): void $ecdsa->sign($key, $data); } - /** - * @test - */ + #[Test] public function eS256Verify(): void { $key = new JWK([ @@ -57,9 +54,7 @@ public function eS256Verify(): void static::assertTrue($ecdsa->verify($key, $data, Base64UrlSafe::decode($signature))); } - /** - * @test - */ + #[Test] public function eS256SignVerify(): void { $key = new JWK([ @@ -78,9 +73,7 @@ public function eS256SignVerify(): void static::assertTrue($ecdsa->verify($key, $data, $signature)); } - /** - * @test - */ + #[Test] public function keyNotPrivate(): void { $this->expectException(InvalidArgumentException::class); @@ -98,9 +91,7 @@ public function keyNotPrivate(): void $ecdsa->sign($key, $data); } - /** - * @test - */ + #[Test] public function eS384SignVerify(): void { $key = new JWK([ @@ -119,9 +110,7 @@ public function eS384SignVerify(): void static::assertTrue($ecdsa->verify($key, $data, $signature)); } - /** - * @test - */ + #[Test] public function eS512Verify(): void { $key = new JWK([ @@ -142,9 +131,7 @@ public function eS512Verify(): void static::assertTrue($ecdsa->verify($key, $data, Base64UrlSafe::decode($signature))); } - /** - * @test - */ + #[Test] public function eS512SignVerify(): void { $key = new JWK([ @@ -163,9 +150,7 @@ public function eS512SignVerify(): void static::assertTrue($ecdsa->verify($key, $data, $signature)); } - /** - * @test - */ + #[Test] public function badSignature(): void { $key = new JWK([ diff --git a/tests/SignatureAlgorithm/EdDSA/EdDSASignatureTest.php b/tests/SignatureAlgorithm/EdDSA/EdDSASignatureTest.php index cc5a6d727..96d284ce0 100644 --- a/tests/SignatureAlgorithm/EdDSA/EdDSASignatureTest.php +++ b/tests/SignatureAlgorithm/EdDSA/EdDSASignatureTest.php @@ -10,6 +10,7 @@ use Jose\Component\Signature\JWSBuilder; use Jose\Component\Signature\JWSVerifier; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -19,9 +20,8 @@ final class EdDSASignatureTest extends TestCase { /** * @see https://tools.ietf.org/html/rfc8037#appendix-A.5 - * - * @test */ + #[Test] public function edDSAVerifyAlgorithm(): void { $key = new JWK([ @@ -42,9 +42,8 @@ public function edDSAVerifyAlgorithm(): void /** * @see https://tools.ietf.org/html/rfc8037#appendix-A.5 - * - * @test */ + #[Test] public function edDSASignAndVerifyAlgorithm(): void { $key = new JWK([ diff --git a/tests/SignatureAlgorithm/Experimental/Blake2bTest.php b/tests/SignatureAlgorithm/Experimental/Blake2bTest.php index e45a2aba2..2c7ada6eb 100644 --- a/tests/SignatureAlgorithm/Experimental/Blake2bTest.php +++ b/tests/SignatureAlgorithm/Experimental/Blake2bTest.php @@ -8,6 +8,8 @@ use Jose\Component\Core\JWK; use Jose\Component\Signature\Algorithm\Blake2b; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Before; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -31,9 +33,7 @@ final class Blake2bTest extends TestCase private string $expectedHashWithKeyOne; - /** - * @before - */ + #[Before] public function initializeKey(): void { $this->keyOne = new JWK([ @@ -47,9 +47,7 @@ public function initializeKey(): void $this->expectedHashWithKeyOne = Base64UrlSafe::decode(self::EXPECTED_HASH_WITH_KEY_ONE); } - /** - * @test - */ + #[Test] public function algorithmIdMustBeCorrect(): void { $algorithm = new Blake2b(); @@ -57,9 +55,7 @@ public function algorithmIdMustBeCorrect(): void static::assertSame('BLAKE2B', $algorithm->name()); } - /** - * @test - */ + #[Test] public function generatedSignatureMustBeSuccessfullyVerified(): void { $algorithm = new Blake2b(); @@ -68,9 +64,7 @@ public function generatedSignatureMustBeSuccessfullyVerified(): void static::assertTrue($algorithm->verify($this->keyOne, self::CONTENTS, $this->expectedHashWithKeyOne)); } - /** - * @test - */ + #[Test] public function signShouldRejectShortKeys(): void { $algorithm = new Blake2b(); @@ -85,9 +79,7 @@ public function signShouldRejectShortKeys(): void $algorithm->hash($key, self::CONTENTS); } - /** - * @test - */ + #[Test] public function verifyShouldReturnFalseWhenExpectedHashWasNotCreatedWithSameInformation(): void { $algorithm = new Blake2b(); diff --git a/tests/SignatureAlgorithm/Experimental/ExperimentalHMACSignatureTest.php b/tests/SignatureAlgorithm/Experimental/ExperimentalHMACSignatureTest.php index eb51cfc12..64ed27071 100644 --- a/tests/SignatureAlgorithm/Experimental/ExperimentalHMACSignatureTest.php +++ b/tests/SignatureAlgorithm/Experimental/ExperimentalHMACSignatureTest.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Component\Signature\Algorithm\HS1; use Jose\Component\Signature\Algorithm\HS256_64; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -14,9 +15,7 @@ */ final class ExperimentalHMACSignatureTest extends TestCase { - /** - * @test - */ + #[Test] public function hS1SignAndVerify(): void { $key = $this->getKey(); @@ -30,9 +29,7 @@ public function hS1SignAndVerify(): void static::assertTrue($hmac->verify($key, $data, $signature)); } - /** - * @test - */ + #[Test] public function hS256SignAndVerify(): void { $key = $this->getKey(); diff --git a/tests/SignatureAlgorithm/Experimental/P256KSignatureTest.php b/tests/SignatureAlgorithm/Experimental/P256KSignatureTest.php index 77437481f..aebe546c8 100644 --- a/tests/SignatureAlgorithm/Experimental/P256KSignatureTest.php +++ b/tests/SignatureAlgorithm/Experimental/P256KSignatureTest.php @@ -7,6 +7,7 @@ use Jose\Component\Core\JWK; use Jose\Component\Signature\Algorithm\ES256K; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -14,25 +15,19 @@ */ final class P256KSignatureTest extends TestCase { - /** - * @test - */ + #[Test] public function es256KVerify(): void { $key = $this->getKey(); $algorithm = new ES256K(); $data = 'Hello'; - static::assertTrue( - $algorithm->verify($key, $data, hex2bin( - '9c75b9d171d9690a37f2474d4bfab5c234911cb150950ea5cbfc9aedda5ec360725cc47978de95b4efb2a3ed617c7b36b1cd0a26b536662a79d0f3ae873a7924' - )) - ); + static::assertTrue($algorithm->verify($key, $data, hex2bin( + '9c75b9d171d9690a37f2474d4bfab5c234911cb150950ea5cbfc9aedda5ec360725cc47978de95b4efb2a3ed617c7b36b1cd0a26b536662a79d0f3ae873a7924' + ))); } - /** - * @test - */ + #[Test] public function es256KSignAndVerify(): void { $key = $this->getKey(); diff --git a/tests/SignatureAlgorithm/HMAC/HMACFromRFC7520Test.php b/tests/SignatureAlgorithm/HMAC/HMACFromRFC7520Test.php index 8128922a9..df9f500d9 100644 --- a/tests/SignatureAlgorithm/HMAC/HMACFromRFC7520Test.php +++ b/tests/SignatureAlgorithm/HMAC/HMACFromRFC7520Test.php @@ -12,8 +12,9 @@ use Jose\Component\Signature\Serializer\CompactSerializer; use Jose\Component\Signature\Serializer\JSONFlattenedSerializer; use Jose\Component\Signature\Serializer\JSONGeneralSerializer; -use const JSON_THROW_ON_ERROR; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use const JSON_THROW_ON_ERROR; /** * @see https://tools.ietf.org/html/rfc7520#section-4.4 @@ -27,9 +28,8 @@ final class HMACFromRFC7520Test extends TestCase { /** * @see https://tools.ietf.org/html/rfc7520#section-4.4 - * - * @test */ + #[Test] public function hS256(): void { /** @@ -101,9 +101,8 @@ public function hS256(): void /** * @see https://tools.ietf.org/html/rfc7520#section-4.5 - * - * @test */ + #[Test] public function hS256WithDetachedPayload(): void { /** @@ -176,9 +175,8 @@ public function hS256WithDetachedPayload(): void /** * @see https://tools.ietf.org/html/rfc7520#section-4.6 - * - * @test */ + #[Test] public function hS256WithUnprotectedHeader(): void { /** @@ -246,9 +244,8 @@ public function hS256WithUnprotectedHeader(): void /** * @see https://tools.ietf.org/html/rfc7520#section-4.7 - * - * @test */ + #[Test] public function hS256WithoutProtectedHeader(): void { /** diff --git a/tests/SignatureAlgorithm/HMAC/HMACSignatureTest.php b/tests/SignatureAlgorithm/HMAC/HMACSignatureTest.php index ee35b6d8c..d2a5147d4 100644 --- a/tests/SignatureAlgorithm/HMAC/HMACSignatureTest.php +++ b/tests/SignatureAlgorithm/HMAC/HMACSignatureTest.php @@ -9,6 +9,7 @@ use Jose\Component\Signature\Algorithm\HS256; use Jose\Component\Signature\Algorithm\HS384; use Jose\Component\Signature\Algorithm\HS512; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -16,9 +17,7 @@ */ final class HMACSignatureTest extends TestCase { - /** - * @test - */ + #[Test] public function invalidKey(): void { $this->expectException(InvalidArgumentException::class); @@ -33,9 +32,7 @@ public function invalidKey(): void $hmac->hash($key, $data); } - /** - * @test - */ + #[Test] public function signatureHasBadBadLength(): void { $key = new JWK([ @@ -48,9 +45,7 @@ public function signatureHasBadBadLength(): void static::assertFalse($hmac->verify($key, $data, hex2bin('326eb338c465d3587f3349df0b96ba81'))); } - /** - * @test - */ + #[Test] public function hS256SignAndVerify(): void { $key = new JWK([ @@ -66,9 +61,7 @@ public function hS256SignAndVerify(): void static::assertTrue($hmac->verify($key, $data, $signature)); } - /** - * @test - */ + #[Test] public function hS384SignAndVerify(): void { $key = new JWK([ @@ -87,9 +80,7 @@ public function hS384SignAndVerify(): void static::assertTrue($hmac->verify($key, $data, $signature)); } - /** - * @test - */ + #[Test] public function hS512SignAndVerify(): void { $key = new JWK([ @@ -101,12 +92,9 @@ public function hS512SignAndVerify(): void $signature = $hmac->hash($key, $data); - static::assertSame( - hex2bin( - 'e8b36712b6c6dc422eec77f31ce372ccac769450413238158bd702069630456a148d0c10dd3a661a774217fb90b0d5f94fa6c3c985438bade92ff975b9e4dc04' - ), - $signature - ); + static::assertSame(hex2bin( + 'e8b36712b6c6dc422eec77f31ce372ccac769450413238158bd702069630456a148d0c10dd3a661a774217fb90b0d5f94fa6c3c985438bade92ff975b9e4dc04' + ), $signature); static::assertTrue($hmac->verify($key, $data, $signature)); } } diff --git a/tests/SignatureAlgorithm/None/NoneSignatureTest.php b/tests/SignatureAlgorithm/None/NoneSignatureTest.php index 1a6870160..2c7a8bc05 100644 --- a/tests/SignatureAlgorithm/None/NoneSignatureTest.php +++ b/tests/SignatureAlgorithm/None/NoneSignatureTest.php @@ -10,6 +10,7 @@ use Jose\Component\Signature\Algorithm\None; use Jose\Component\Signature\JWSBuilder; use Jose\Component\Signature\Serializer\CompactSerializer; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -17,9 +18,7 @@ */ final class NoneSignatureTest extends TestCase { - /** - * @test - */ + #[Test] public function noneSignAndVerifyAlgorithm(): void { $key = new JWK([ @@ -35,9 +34,7 @@ public function noneSignAndVerifyAlgorithm(): void static::assertTrue($none->verify($key, $data, $signature)); } - /** - * @test - */ + #[Test] public function invalidKey(): void { $this->expectException(InvalidArgumentException::class); @@ -52,9 +49,7 @@ public function invalidKey(): void $none->sign($key, $data); } - /** - * @test - */ + #[Test] public function noneSignAndVerifyComplete(): void { $jwk = new JWK([ diff --git a/tests/SignatureAlgorithm/RSA/RSA15SignatureTest.php b/tests/SignatureAlgorithm/RSA/RSA15SignatureTest.php index 276cc2119..423266e09 100644 --- a/tests/SignatureAlgorithm/RSA/RSA15SignatureTest.php +++ b/tests/SignatureAlgorithm/RSA/RSA15SignatureTest.php @@ -12,8 +12,9 @@ use Jose\Component\Signature\Serializer\CompactSerializer; use Jose\Component\Signature\Serializer\JSONFlattenedSerializer; use Jose\Component\Signature\Serializer\JSONGeneralSerializer; -use const JSON_THROW_ON_ERROR; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use const JSON_THROW_ON_ERROR; /** * @see https://tools.ietf.org/html/rfc7520#section-4.1 @@ -22,9 +23,7 @@ */ final class RSA15SignatureTest extends TestCase { - /** - * @test - */ + #[Test] public function rS256(): void { /** diff --git a/tests/SignatureAlgorithm/RSA/RSAKeyWithoutAllPrimesTest.php b/tests/SignatureAlgorithm/RSA/RSAKeyWithoutAllPrimesTest.php index aa1717d6c..9364ed44b 100644 --- a/tests/SignatureAlgorithm/RSA/RSAKeyWithoutAllPrimesTest.php +++ b/tests/SignatureAlgorithm/RSA/RSAKeyWithoutAllPrimesTest.php @@ -15,6 +15,8 @@ use Jose\Component\Signature\JWSBuilder; use Jose\Component\Signature\JWSVerifier; use Jose\Component\Signature\Serializer\CompactSerializer; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -22,11 +24,8 @@ */ final class RSAKeyWithoutAllPrimesTest extends TestCase { - /** - * @dataProvider dataSignatureAlgorithms - * - * @test - */ + #[DataProvider('dataSignatureAlgorithms')] + #[Test] public function signatureAlgorithms(string $signature_algorithm): void { $algorithm = new $signature_algorithm(); diff --git a/tests/SignatureAlgorithm/RSA/RSAPSSSignatureTest.php b/tests/SignatureAlgorithm/RSA/RSAPSSSignatureTest.php index 636554231..28a142f8f 100644 --- a/tests/SignatureAlgorithm/RSA/RSAPSSSignatureTest.php +++ b/tests/SignatureAlgorithm/RSA/RSAPSSSignatureTest.php @@ -12,6 +12,7 @@ use Jose\Component\Signature\Serializer\CompactSerializer; use Jose\Component\Signature\Serializer\JSONFlattenedSerializer; use Jose\Component\Signature\Serializer\JSONGeneralSerializer; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; /** @@ -26,9 +27,8 @@ final class RSAPSSSignatureTest extends TestCase * always different). This test case create a signature and verifies it. Then the output given in the RFC is used * and verified. This way, we can say that the library is able to create/verify RSA-PSS signatures and verify * signature from test vectors. - * - * @test */ + #[Test] public function pS384(): void { /** diff --git a/tests/SignatureAlgorithm/RSA/RSASignatureTest.php b/tests/SignatureAlgorithm/RSA/RSASignatureTest.php index a10aef20a..145c80314 100644 --- a/tests/SignatureAlgorithm/RSA/RSASignatureTest.php +++ b/tests/SignatureAlgorithm/RSA/RSASignatureTest.php @@ -18,18 +18,17 @@ use Jose\Component\Signature\JWSVerifier; use Jose\Component\Signature\Serializer\CompactSerializer; use Jose\Component\Signature\Serializer\JSONGeneralSerializer; -use const JSON_THROW_ON_ERROR; use ParagonIE\ConstantTime\Base64UrlSafe; +use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; +use const JSON_THROW_ON_ERROR; /** * @internal */ final class RSASignatureTest extends TestCase { - /** - * @test - */ + #[Test] public function completeRS256Sign(): void { $key = new JWK([ @@ -74,9 +73,7 @@ public function completeRS256Sign(): void static::assertSame('RS256', $result->getSignature(0)->getProtectedHeaderParameter('alg')); } - /** - * @test - */ + #[Test] public function completeRS256SignWithDetachedPayload(): void { $key = new JWK([ @@ -121,9 +118,7 @@ public function completeRS256SignWithDetachedPayload(): void static::assertSame('RS256', $result->getSignature(0)->getProtectedHeaderParameter('alg')); } - /** - * @test - */ + #[Test] public function completeRS384Sign(): void { $key = new JWK([ @@ -168,9 +163,7 @@ public function completeRS384Sign(): void static::assertSame('RS384', $result->getSignature(0)->getProtectedHeaderParameter('alg')); } - /** - * @test - */ + #[Test] public function completeRS512Sign(): void { $key = new JWK([ @@ -216,9 +209,7 @@ public function completeRS512Sign(): void static::assertSame('RS512', $result->getSignature(0)->getProtectedHeaderParameter('alg')); } - /** - * @test - */ + #[Test] public function completePS256Sign(): void { $key = new JWK([ @@ -261,9 +252,7 @@ public function completePS256Sign(): void static::assertSame('PS256', $result->getSignature(0)->getProtectedHeaderParameter('alg')); } - /** - * @test - */ + #[Test] public function completePS384Sign(): void { $key = new JWK([ @@ -304,9 +293,7 @@ public function completePS384Sign(): void static::assertSame('PS384', $result->getSignature(0)->getProtectedHeaderParameter('alg')); } - /** - * @test - */ + #[Test] public function completePS512Sign(): void { $key = new JWK([ @@ -349,9 +336,8 @@ public function completePS512Sign(): void /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.4 - * - * @test */ + #[Test] public function loadJWSJSONSerialization(): void { $serializer = new JSONGeneralSerializer(); @@ -372,9 +358,8 @@ public function loadJWSJSONSerialization(): void /** * @see https://tools.ietf.org/html/rfc7516#appendix-A.4 - * - * @test */ + #[Test] public function loadJWSJSONSerializationWithDetachedPayload(): void { $jwsVerifier = new JWSVerifier(new AlgorithmManager([new RS256()])); @@ -396,9 +381,7 @@ public function loadJWSJSONSerializationWithDetachedPayload(): void ); } - /** - * @test - */ + #[Test] public function loadJWSJSONSerializationWithDetachedPayloadAndPayloadInJWS(): void { $this->expectException(InvalidArgumentException::class); @@ -420,9 +403,7 @@ public function loadJWSJSONSerializationWithDetachedPayloadAndPayloadInJWS(): vo ); } - /** - * @test - */ + #[Test] public function loadInvalidInput(): void { $this->expectException(InvalidArgumentException::class); @@ -433,9 +414,7 @@ public function loadInvalidInput(): void ); } - /** - * @test - */ + #[Test] public function loadInvalidInput2(): void { $this->expectException(InvalidArgumentException::class); @@ -448,9 +427,8 @@ public function loadInvalidInput2(): void /** * @see https://tools.ietf.org/html/rfc7515#appendix-A.1 - * - * @test */ + #[Test] public function loadIETFExample1(): void { $serializer = new CompactSerializer(); @@ -469,9 +447,8 @@ public function loadIETFExample1(): void /** * @see https://tools.ietf.org/html/rfc7515#appendix-A.2 - * - * @test */ + #[Test] public function loadIETFExample2(): void { $serializer = new CompactSerializer(); @@ -490,9 +467,8 @@ public function loadIETFExample2(): void /** * @see https://tools.ietf.org/html/rfc7515#appendix-A.3 - * - * @test */ + #[Test] public function loadIETFExample3(): void { $serializer = new CompactSerializer(); @@ -511,9 +487,8 @@ public function loadIETFExample3(): void /** * @see https://tools.ietf.org/html/rfc7515#appendix-A.4 - * - * @test */ + #[Test] public function loadIETFExample4(): void { $serializer = new CompactSerializer();