From 98ecc6cfc32b21977ded118e6caeed9eb9f84b96 Mon Sep 17 00:00:00 2001 From: Kamil Wylegala Date: Thu, 19 Oct 2023 22:14:57 +0200 Subject: [PATCH] Removed usage of deprecated getKeys in favor of keys() from phpredis --- README.md | 9 +++++++-- lib/Cake/Cache/Engine/RedisEngine.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8648d64d3..968dedf09 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ Here are steps I took to migrate my project through all versions to PHP 8.1, may ## Before using this fork ⚠️ -- Tests of CakePHP framework aren't refactored yet to support PHP 8. Main issue is old version of PHPUnit that is tightly coupled to framework's tests. Issue for fixing this situation is here: https://github.com/kamilwylegala/cakephp2-php8/issues/7 -- Due to lack of tests ☝️ - **you need to rely** on tests in your application after integrating with this fork. +- ~~Tests of CakePHP framework aren't refactored yet to support PHP 8. Main issue is old version of PHPUnit that is tightly coupled to framework's tests. Issue for fixing this situation is here: https://github.com/kamilwylegala/cakephp2-php8/issues/7~~ Framework tests are migrated to PHPUnit 9.*. Github actions are running tests on PHP 8.0, 8.1. +- ~~Due to lack of tests ☝️~~ - **you also need to rely** on tests in your application after integrating with this fork. - If after integration you spot any issues related to framework please let me know by creating an issue or pull request with fix. ## Installation @@ -55,6 +55,11 @@ It means that composer will look at `master` branch of repository configured und ## Changelog + +### 2023-10-19 + +- Removed usage of deprecated `redis->getKeys()` in favor of `redis->keys()`. + ### 2023-09-18 - Fix for `ShellDispatcher` where `null` was passed to `strpos` function. diff --git a/lib/Cake/Cache/Engine/RedisEngine.php b/lib/Cake/Cache/Engine/RedisEngine.php index 6dd659944..405729227 100644 --- a/lib/Cake/Cache/Engine/RedisEngine.php +++ b/lib/Cake/Cache/Engine/RedisEngine.php @@ -187,7 +187,7 @@ class RedisEngine extends CacheEngine { if ($check) { return true; } - $keys = $this->_Redis->getKeys($this->settings['prefix'] . '*'); + $keys = $this->_Redis->keys($this->settings['prefix'] . '*'); $this->_Redis->del($keys); return true;