From 16d89288588823b02e801fe425b9cb9a58d8b9c9 Mon Sep 17 00:00:00 2001 From: Kamil Tunkiewicz Date: Thu, 1 Jan 2026 13:45:40 +0100 Subject: [PATCH 1/3] Bumped PHP version to 8.1. Updated php-jwt package version. --- .gitignore | 1 + composer.json | 6 +++--- src/Client.php | 3 ++- test/ClientTest.php | 9 +++------ test/Response/JwtVerifyResponseTest.php | 4 ++-- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index d04695f..ae60653 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ vendor .idea *.iml clover.xml +.phpunit.result.cache \ No newline at end of file diff --git a/composer.json b/composer.json index 70ab64a..aa2d846 100755 --- a/composer.json +++ b/composer.json @@ -7,15 +7,15 @@ "Apple Jwt" ], "require": { - "php": ">=5.6", + "php": ">=8.1", "guzzlehttp/guzzle": "~6.5", - "firebase/php-jwt": "~5.2", + "firebase/php-jwt": "~6.11.1", "ext-json": "*", "ext-openssl": "*" }, "require-dev": { "mockery/mockery": "1.3.1", - "phpunit/phpunit": "5.7.27" + "phpunit/phpunit": "8.5.50" }, "autoload": { "psr-4": { diff --git a/src/Client.php b/src/Client.php index 92765c4..ecf9139 100644 --- a/src/Client.php +++ b/src/Client.php @@ -7,6 +7,7 @@ use Exception; use Firebase\JWT\JWK; use Firebase\JWT\JWT; +use Firebase\JWT\Key; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\RequestOptions; @@ -47,7 +48,7 @@ public function __construct(ClientInterface $httpClient, Config $config) public function verifyAndDecodeJwt($jwtToken) { return new JwtVerifyResponse( - JWT::decode($jwtToken, $this->getApplePublicKey(), ['RS256']) + JWT::decode($jwtToken, $this->getApplePublicKey()) ); } diff --git a/test/ClientTest.php b/test/ClientTest.php index a8197d1..3ab1fb9 100644 --- a/test/ClientTest.php +++ b/test/ClientTest.php @@ -13,13 +13,10 @@ class ClientTest extends m\Adapter\Phpunit\MockeryTestCase { - /** @var string */ - private $appleJwk; + private string|false $appleJwk; + private string|false $appleJwt; - /** @var string */ - private $appleJwt; - - protected function setUp() + protected function setUp(): void { $this->appleJwk = file_get_contents(__DIR__ . '/data/appleJwk.json'); $this->appleJwt = file_get_contents(__DIR__ . '/data/appleJwt'); diff --git a/test/Response/JwtVerifyResponseTest.php b/test/Response/JwtVerifyResponseTest.php index 0fda81c..b890429 100644 --- a/test/Response/JwtVerifyResponseTest.php +++ b/test/Response/JwtVerifyResponseTest.php @@ -9,9 +9,9 @@ class JwtVerifyResponseTest extends MockeryTestCase { /** @var stdClass */ - private $appleJwt; + private mixed $appleJwt; - protected function setUp() + protected function setUp(): void { $this->appleJwt = json_decode(file_get_contents(__DIR__ . '/../data/appleJwtDecoded.json')); parent::setUp(); From 887fec0b4c77db54861ef3f0422959c37b5623d4 Mon Sep 17 00:00:00 2001 From: Kamil Tunkiewicz Date: Tue, 28 Jul 2026 16:32:45 +0200 Subject: [PATCH 2/3] update guuzle --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index aa2d846..5944154 100755 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ ], "require": { "php": ">=8.1", - "guzzlehttp/guzzle": "~6.5", + "guzzlehttp/guzzle": "~7.15.2", "firebase/php-jwt": "~6.11.1", "ext-json": "*", "ext-openssl": "*" From cae3edcf7b223ce6225809cf014219703e4d84bd Mon Sep 17 00:00:00 2001 From: Kamil Tunkiewicz Date: Tue, 28 Jul 2026 16:38:50 +0200 Subject: [PATCH 3/3] update php-jwt --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5944154..90349db 100755 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "require": { "php": ">=8.1", "guzzlehttp/guzzle": "~7.15.2", - "firebase/php-jwt": "~6.11.1", + "firebase/php-jwt": "~7.1.0", "ext-json": "*", "ext-openssl": "*" },