Removed usage of deprecated getKeys in favor of keys() from phpredis

This commit is contained in:
Kamil Wylegala 2023-10-19 22:14:57 +02:00
parent 78e22f161c
commit 98ecc6cfc3
2 changed files with 8 additions and 3 deletions

View file

@ -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 ⚠️ ## 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 - ~~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 need to rely** on tests in your application after integrating with this fork. - ~~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. - If after integration you spot any issues related to framework please let me know by creating an issue or pull request with fix.
## Installation ## Installation
@ -55,6 +55,11 @@ It means that composer will look at `master` branch of repository configured und
## Changelog ## Changelog
### 2023-10-19
- Removed usage of deprecated `redis->getKeys()` in favor of `redis->keys()`.
### 2023-09-18 ### 2023-09-18
- Fix for `ShellDispatcher` where `null` was passed to `strpos` function. - Fix for `ShellDispatcher` where `null` was passed to `strpos` function.

View file

@ -187,7 +187,7 @@ class RedisEngine extends CacheEngine {
if ($check) { if ($check) {
return true; return true;
} }
$keys = $this->_Redis->getKeys($this->settings['prefix'] . '*'); $keys = $this->_Redis->keys($this->settings['prefix'] . '*');
$this->_Redis->del($keys); $this->_Redis->del($keys);
return true; return true;