Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: drop support for PHP 7.4 #558

Merged
merged 3 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
bshaffer marked this conversation as resolved.
Show resolved Hide resolved

```bash
composer require paragonie/sodium_compat
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
Expand Down
8 changes: 4 additions & 4 deletions tests/CachedKeySetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ public function getKey(): string
return $this->key;
}

public function get()
public function get(): mixed
{
return $this->isHit() ? $this->value : null;
}
Expand All @@ -571,21 +571,21 @@ 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;

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;
Expand Down
Loading