Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ 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:
php env does not have libsodium installed:

```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