Skip to content

Commit 47a1167

Browse files
committed
Compatability with php 8.4
Deprecate implicitly nullable parameter types https://wiki.php.net/rfc/deprecate-implicitly-nullable-types
1 parent e2c3944 commit 47a1167

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Phpfastcache/CacheContract.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(CacheItemPoolInterface $cacheInstance)
3232
/**
3333
* @throws InvalidArgumentException
3434
*/
35-
public function get(string|\Stringable $cacheKey, callable $callback, DateInterval|int $expiresAfter = null): mixed
35+
public function get(string|\Stringable $cacheKey, callable $callback, DateInterval|int|null $expiresAfter = null): mixed
3636
{
3737
$cacheItem = $this->cacheInstance->getItem((string) $cacheKey);
3838

@@ -54,7 +54,7 @@ public function get(string|\Stringable $cacheKey, callable $callback, DateInterv
5454
/**
5555
* @throws InvalidArgumentException
5656
*/
57-
public function __invoke(string $cacheKey, callable $callback, DateInterval|int $expiresAfter = null): mixed
57+
public function __invoke(string $cacheKey, callable $callback, DateInterval|int|null $expiresAfter = null): mixed
5858
{
5959
return $this->get($cacheKey, $callback, $expiresAfter);
6060
}

0 commit comments

Comments
 (0)