Skip to content

Commit

Permalink
chore: drop support for PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Feb 20, 2024
1 parent 1b9e871 commit e8b252f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
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
6 changes: 3 additions & 3 deletions composer.json
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
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

0 comments on commit e8b252f

Please sign in to comment.