From 16d89288588823b02e801fe425b9cb9a58d8b9c9 Mon Sep 17 00:00:00 2001 From: Kamil Tunkiewicz Date: Thu, 1 Jan 2026 13:45:40 +0100 Subject: [PATCH 1/5] 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/5] 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/5] 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": "*" }, From 543cf8a6e7fcfe5296d1e897c3a7e95f5b89f0ec Mon Sep 17 00:00:00 2001 From: Kamil Tunkiewicz Date: Wed, 16 Sep 2026 15:17:39 +0200 Subject: [PATCH 4/5] only run tests on php8.1 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 713e6a7..509917f 100755 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] + php-versions: ['8.1'] name: PHP ${{ matrix.php-versions }} Test on ubuntu-latest steps: - name: Checkout From bc7d3e3bcd32861498134ed5fc7c31cb4127fcb0 Mon Sep 17 00:00:00 2001 From: Kamil Tunkiewicz Date: Wed, 16 Sep 2026 15:20:45 +0200 Subject: [PATCH 5/5] updated phpunit --- composer.json | 4 ++-- phpunit.xml.dist | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 90349db..00ea86c 100755 --- a/composer.json +++ b/composer.json @@ -14,8 +14,8 @@ "ext-openssl": "*" }, "require-dev": { - "mockery/mockery": "1.3.1", - "phpunit/phpunit": "8.5.50" + "mockery/mockery": "^1.6.12", + "phpunit/phpunit": "^10.5" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 719a2b7..d47223e 100755 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,16 +1,20 @@ - + ./test - - + + ./src - - - - - + + + + + + +