From c3b40003b778a725e958cebee6446bcfd6a68b10 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 10 Apr 2025 16:19:22 +0700 Subject: [PATCH] fix(cache): Implicitly marking parameter `$name` as nullable is deprecated (#1877) --- src/Legacy/Cache/APCu.php | 2 +- src/Legacy/Cache/Memcached.php | 2 +- src/Legacy/Cache/Redis.php | 2 +- src/Legacy/Cache/Sqlite.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Legacy/Cache/APCu.php b/src/Legacy/Cache/APCu.php index 6e3b26fec..d7e4eb8ed 100644 --- a/src/Legacy/Cache/APCu.php +++ b/src/Legacy/Cache/APCu.php @@ -116,7 +116,7 @@ class APCu extends Common * @param string|null $name * @return bool */ - public function rm(string $name = null): bool + public function rm(?string $name = null): bool { $targetMethod = is_string($name) ? 'delete' : 'flush'; $name = is_string($name) ? $this->prefix . $name : null; diff --git a/src/Legacy/Cache/Memcached.php b/src/Legacy/Cache/Memcached.php index ddbc1b02c..4c5c5225b 100644 --- a/src/Legacy/Cache/Memcached.php +++ b/src/Legacy/Cache/Memcached.php @@ -172,7 +172,7 @@ class Memcached extends Common * @param string|null $name * @return bool */ - public function rm(string $name = null): bool + public function rm(?string $name = null): bool { if (!$this->connected) { $this->connect(); diff --git a/src/Legacy/Cache/Redis.php b/src/Legacy/Cache/Redis.php index d20c53aa8..08a6a16ab 100644 --- a/src/Legacy/Cache/Redis.php +++ b/src/Legacy/Cache/Redis.php @@ -174,7 +174,7 @@ class Redis extends Common * @param string|null $name * @return bool */ - public function rm(string $name = null): bool + public function rm(?string $name = null): bool { if (!$this->connected) { $this->connect(); diff --git a/src/Legacy/Cache/Sqlite.php b/src/Legacy/Cache/Sqlite.php index b6ba7f347..ae38a7699 100644 --- a/src/Legacy/Cache/Sqlite.php +++ b/src/Legacy/Cache/Sqlite.php @@ -126,7 +126,7 @@ class Sqlite extends Common * @param string|null $name * @return bool */ - public function rm(string $name = null): bool + public function rm(?string $name = null): bool { $targetMethod = is_string($name) ? 'delete' : 'flush'; $name = is_string($name) ? $this->prefix . $name : null;