Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SITE-2632] Fix Relay support in check_client_dependencies #473

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ There's a known issue with WordPress `alloptions` cache design. Specifically, a
## Changelog ##

### 1.4.5-dev ###
* Support Relay in `check_client_dependencies()` correctly [[#471](https://github.com/pantheon-systems/wp-redis/pull/471)] (props @EarthlingDavey)

### 1.4.4 (November 27, 2023) ###
* Updates Pantheon WP Coding Standards to 2.0 [[#445](https://github.com/pantheon-systems/wp-redis/pull/445)]
Expand Down
7 changes: 6 additions & 1 deletion object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,12 @@ protected function _connect_redis() {
* not with a message describing the issue.
*/
public function check_client_dependencies() {
if ( ! class_exists( 'Redis' ) ) {
$class_to_check = 'Redis';
pwtyler marked this conversation as resolved.
Show resolved Hide resolved
if ( defined( 'WP_REDIS_USE_RELAY' ) && WP_REDIS_USE_RELAY ) {
$class_to_check = 'Relay\Relay';
}

if ( ! class_exists( $class_to_check ) ) {
return 'Warning! PHPRedis extension is unavailable, which is required by WP Redis object cache.';
}
return true;
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Please report security bugs found in the source code of the WP Redis plugin thro
== Changelog ==

= 1.4.5-dev =
* Support Relay in check_client_dependencies() with the WP_REDIS_USE_RELAY constant [[#471](https://github.com/pantheon-systems/wp-redis/pull/471)]

= 1.4.4 (November 27, 2023) =
* Updates Pantheon WP Coding Standards to 2.0 [[#445](https://github.com/pantheon-systems/wp-redis/pull/445)]
Expand Down
Loading