From e8b252ff63f5621a3a077889616a32dcf64eaef7 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Tue, 20 Feb 2024 10:20:41 -0800 Subject: [PATCH 1/3] chore: drop support for PHP 7.4 --- .github/workflows/tests.yml | 2 +- composer.json | 6 +++--- tests/CachedKeySetTest.php | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7e576e04..13fc947f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [ "7.4", "8.0", "8.1", "8.2", "8.3" ] + php: [ "8.0", "8.1", "8.2", "8.3" ] name: PHP ${{matrix.php }} Unit Test steps: - uses: actions/checkout@v2 diff --git a/composer.json b/composer.json index e23dfe37..816cfd0b 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ ], "license": "BSD-3-Clause", "require": { - "php": "^7.4||^8.0" + "php": "^8.0" }, "suggest": { "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present", @@ -32,10 +32,10 @@ } }, "require-dev": { - "guzzlehttp/guzzle": "^6.5||^7.4", + "guzzlehttp/guzzle": "^7.4", "phpspec/prophecy-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "psr/cache": "^1.0||^2.0", + "psr/cache": "^2.0||^3.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0" } diff --git a/tests/CachedKeySetTest.php b/tests/CachedKeySetTest.php index 2e4e1f62..e5d3aa86 100644 --- a/tests/CachedKeySetTest.php +++ b/tests/CachedKeySetTest.php @@ -553,7 +553,7 @@ public function getKey(): string return $this->key; } - public function get() + public function get(): mixed { return $this->isHit() ? $this->value : null; } @@ -571,7 +571,7 @@ public function isHit(): bool return $this->currentTime()->getTimestamp() < $this->expiration->getTimestamp(); } - public function set($value) + public function set(mixed $value): static { $this->isHit = true; $this->value = $value; @@ -579,13 +579,13 @@ public function set($value) return $this; } - public function expiresAt($expiration) + public function expiresAt($expiration): static { $this->expiration = $expiration; return $this; } - public function expiresAfter($time) + public function expiresAfter($time): static { $this->expiration = $this->currentTime()->add(new \DateInterval("PT{$time}S")); return $this; From bc9924021452ba8017bb10b08d67c4f3f65149d0 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 8 May 2024 10:13:33 -0700 Subject: [PATCH 2/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 701de23a..684d13ad 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ Use composer to manage your dependencies and download PHP-JWT: composer require firebase/php-jwt ``` -Optionally, install the `paragonie/sodium_compat` package from composer if your -php is < 7.2 or does not have libsodium installed: +Optionally, install the `paragonie/sodium_compat` package from composer if you +do not have libsodium installed: ```bash composer require paragonie/sodium_compat From 5a1fea7960a61af5e7026e78b8536369b9fc53e4 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Fri, 17 May 2024 10:32:47 -0700 Subject: [PATCH 3/3] Update README.md Co-authored-by: Vishwaraj Anand --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 684d13ad..4fd14074 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ Use composer to manage your dependencies and download PHP-JWT: composer require firebase/php-jwt ``` -Optionally, install the `paragonie/sodium_compat` package from composer if you -do not have libsodium installed: +Optionally, install the `paragonie/sodium_compat` package from composer if your +php env does not have libsodium installed: ```bash composer require paragonie/sodium_compat