mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-08 01:26:31 +02:00
Fix deprecations (#4636)
* Fix PHP 8.4 deprecation Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead * [github workflow] Add additional php versions
This commit is contained in:
@@ -23,7 +23,7 @@ class ArrayCache implements CacheInterface
|
||||
return $default;
|
||||
}
|
||||
|
||||
public function set(string $key, $value, int $ttl = null): void
|
||||
public function set(string $key, $value, ?int $ttl = null): void
|
||||
{
|
||||
$this->data[$key] = [
|
||||
'key' => $key,
|
||||
|
@@ -45,7 +45,7 @@ class FileCache implements CacheInterface
|
||||
return $default;
|
||||
}
|
||||
|
||||
public function set($key, $value, int $ttl = null): void
|
||||
public function set($key, $value, ?int $ttl = null): void
|
||||
{
|
||||
$item = [
|
||||
'key' => $key,
|
||||
|
@@ -9,7 +9,7 @@ class NullCache implements CacheInterface
|
||||
return $default;
|
||||
}
|
||||
|
||||
public function set(string $key, $value, int $ttl = null): void
|
||||
public function set(string $key, $value, ?int $ttl = null): void
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -77,7 +77,7 @@ class SQLiteCache implements CacheInterface
|
||||
return $default;
|
||||
}
|
||||
|
||||
public function set(string $key, $value, int $ttl = null): void
|
||||
public function set(string $key, $value, ?int $ttl = null): void
|
||||
{
|
||||
$cacheKey = $this->createCacheKey($key);
|
||||
$blob = serialize($value);
|
||||
|
Reference in New Issue
Block a user