diff --git a/composer.json b/composer.json index cddf89d0..43c5e20d 100644 --- a/composer.json +++ b/composer.json @@ -23,16 +23,16 @@ "psr/clock": "^1.0" }, "require-dev": { - "infection/infection": "^0.29", - "lcobucci/clock": "^3.2", - "lcobucci/coding-standard": "^11.0", - "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.2", - "phpstan/phpstan": "^2.0.0", - "phpstan/phpstan-deprecation-rules": "^2.0.0", - "phpstan/phpstan-phpunit": "^2.0.0", - "phpstan/phpstan-strict-rules": "^2.0.0", - "phpunit/phpunit": "^11.1" + "infection/infection": "^0.29.10", + "lcobucci/clock": "^3.3.1", + "lcobucci/coding-standard": "^11.1", + "phpbench/phpbench": "^1.4", + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.1.2", + "phpstan/phpstan-deprecation-rules": "^2.0.1", + "phpstan/phpstan-phpunit": "^2.0.4", + "phpstan/phpstan-strict-rules": "^2.0.3", + "phpunit/phpunit": "^11.5.4" }, "suggest": { "lcobucci/clock": ">= 3.2" diff --git a/composer.lock b/composer.lock index 18f9aad2..ac8f3bab 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9d23ae078ef8d43eedb8a2af65edb0d6", + "content-hash": "f8ce6c963e804837409928e776f7ab4b", "packages": [ { "name": "psr/clock", @@ -171,13 +171,13 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - }, "phpstan": { "includes": [ "extension.neon" ] + }, + "branch-alias": { + "dev-main": "3.x-dev" } }, "autoload": { @@ -1686,16 +1686,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.31.0", + "version": "1.33.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "249f15fb843bf240cf058372dad29e100cee6c17" + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/249f15fb843bf240cf058372dad29e100cee6c17", - "reference": "249f15fb843bf240cf058372dad29e100cee6c17", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/82a311fd3690fb2bf7b64d5c98f912b3dd746140", + "reference": "82a311fd3690fb2bf7b64d5c98f912b3dd746140", "shasum": "" }, "require": { @@ -1727,9 +1727,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.31.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.33.0" }, - "time": "2024-09-22T11:32:18+00:00" + "time": "2024-10-13T11:25:22+00:00" }, { "name": "phpstan/phpstan", @@ -2260,16 +2260,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.5.3", + "version": "11.5.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "30e319e578a7b5da3543073e30002bf82042f701" + "reference": "e0da3559ec50a91f6a6a201473b607b5ccfd9a1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/30e319e578a7b5da3543073e30002bf82042f701", - "reference": "30e319e578a7b5da3543073e30002bf82042f701", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e0da3559ec50a91f6a6a201473b607b5ccfd9a1b", + "reference": "e0da3559ec50a91f6a6a201473b607b5ccfd9a1b", "shasum": "" }, "require": { @@ -2341,7 +2341,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.3" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.4" }, "funding": [ { @@ -2357,7 +2357,7 @@ "type": "tidelift" } ], - "time": "2025-01-13T09:36:00+00:00" + "time": "2025-01-28T15:03:46+00:00" }, { "name": "psr/cache", @@ -3632,16 +3632,16 @@ }, { "name": "shish/safe", - "version": "v2.6.3", + "version": "v2.6.4", "source": { "type": "git", "url": "https://github.com/shish/safe.git", - "reference": "88c2cf506c6b497cd2a961c5e8116a18c5c272c0" + "reference": "482e6227330a70b21c1c9e9301cc99b5658ccb89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/shish/safe/zipball/88c2cf506c6b497cd2a961c5e8116a18c5c272c0", - "reference": "88c2cf506c6b497cd2a961c5e8116a18c5c272c0", + "url": "https://api.github.com/repos/shish/safe/zipball/482e6227330a70b21c1c9e9301cc99b5658ccb89", + "reference": "482e6227330a70b21c1c9e9301cc99b5658ccb89", "shasum": "" }, "require": { @@ -3672,6 +3672,7 @@ "deprecated/mysqli.php", "generated/apache.php", "generated/apcu.php", + "generated/array.php", "generated/bzip2.php", "generated/calendar.php", "generated/classobj.php", @@ -3762,19 +3763,23 @@ "description": "PHP core functions that throw exceptions instead of returning FALSE on error (a less-abandoned fork of thecodingmachine/safe)", "support": { "issues": "https://github.com/shish/safe/issues", - "source": "https://github.com/shish/safe/tree/v2.6.3" + "source": "https://github.com/shish/safe/tree/v2.6.4" }, "funding": [ + { + "url": "https://github.com/OskarStark", + "type": "github" + }, { "url": "https://github.com/shish", "type": "github" }, { - "url": "https://ko-fi.com/shish2k", - "type": "ko_fi" + "url": "https://github.com/staabm", + "type": "github" } ], - "time": "2024-10-08T20:21:12+00:00" + "time": "2024-12-18T13:36:07+00:00" }, { "name": "slevomat/coding-standard", @@ -3843,16 +3848,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.3", + "version": "3.11.3", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" + "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", - "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10", + "reference": "ba05f990e79cbe69b9f35c8c1ac8dca7eecc3a10", "shasum": "" }, "require": { @@ -3917,9 +3922,13 @@ { "url": "https://opencollective.com/php_codesniffer", "type": "open_collective" + }, + { + "url": "https://thanks.dev/phpcsstandards", + "type": "thanks_dev" } ], - "time": "2024-09-18T10:38:58+00:00" + "time": "2025-01-23T17:04:15+00:00" }, { "name": "staabm/side-effects-detector", diff --git a/src/Signer/Key/InMemory.php b/src/Signer/Key/InMemory.php index 749fa03e..b0a9524c 100644 --- a/src/Signer/Key/InMemory.php +++ b/src/Signer/Key/InMemory.php @@ -31,7 +31,7 @@ public static function plainText( #[SensitiveParameter] string $passphrase = '', ): self { - self::guardAgainstEmptyKey($contents); + self::guardAgainstEmptyKey($contents); // @phpstan-ignore staticMethod.alreadyNarrowedType return new self($contents, $passphrase); } @@ -48,7 +48,7 @@ public static function base64Encoded( SodiumBase64Polyfill::SODIUM_BASE64_VARIANT_ORIGINAL, ); - self::guardAgainstEmptyKey($decoded); + self::guardAgainstEmptyKey($decoded); // @phpstan-ignore staticMethod.alreadyNarrowedType return new self($decoded, $passphrase); } diff --git a/src/Token/Builder.php b/src/Token/Builder.php index 9eedcf34..0592b17a 100644 --- a/src/Token/Builder.php +++ b/src/Token/Builder.php @@ -36,10 +36,6 @@ public static function new(Encoder $encoder, ClaimsFormatter $claimFormatter): s return new self($encoder, $claimFormatter); } - /** - * @inheritDoc - * @pure - */ public function permittedFor(string ...$audiences): BuilderInterface { $configured = $this->claims[RegisteredClaims::AUDIENCE] ?? []; @@ -48,64 +44,36 @@ public function permittedFor(string ...$audiences): BuilderInterface return $this->newWithClaim(RegisteredClaims::AUDIENCE, array_merge($configured, $toAppend)); } - /** - * @inheritDoc - * @pure - */ public function expiresAt(DateTimeImmutable $expiration): BuilderInterface { return $this->newWithClaim(RegisteredClaims::EXPIRATION_TIME, $expiration); } - /** - * @inheritDoc - * @pure - */ public function identifiedBy(string $id): BuilderInterface { return $this->newWithClaim(RegisteredClaims::ID, $id); } - /** - * @inheritDoc - * @pure - */ public function issuedAt(DateTimeImmutable $issuedAt): BuilderInterface { return $this->newWithClaim(RegisteredClaims::ISSUED_AT, $issuedAt); } - /** - * @inheritDoc - * @pure - */ public function issuedBy(string $issuer): BuilderInterface { return $this->newWithClaim(RegisteredClaims::ISSUER, $issuer); } - /** - * @inheritDoc - * @pure - */ public function canOnlyBeUsedAfter(DateTimeImmutable $notBefore): BuilderInterface { return $this->newWithClaim(RegisteredClaims::NOT_BEFORE, $notBefore); } - /** - * @inheritDoc - * @pure - */ public function relatedTo(string $subject): BuilderInterface { return $this->newWithClaim(RegisteredClaims::SUBJECT, $subject); } - /** - * @inheritDoc - * @pure - */ public function withHeader(string $name, mixed $value): BuilderInterface { $headers = $this->headers; @@ -119,10 +87,6 @@ public function withHeader(string $name, mixed $value): BuilderInterface ); } - /** - * @inheritDoc - * @pure - */ public function withClaim(string $name, mixed $value): BuilderInterface { if (in_array($name, RegisteredClaims::ALL, true)) {