33 * Plugin Name: Redis Object Cache Drop-In
44 * Plugin URI: https://wordpress.org/plugins/redis-cache/
55 * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
6- * Version: 2.6.2
6+ * Version: 2.6.3
77 * Author: Till Krüss
88 * Author URI: https://objectcache.pro
99 * License: GPLv3
@@ -518,10 +518,8 @@ public function __construct( $fail_gracefully = false ) {
518518
519519 $ this ->cache_group_types ();
520520
521- if ( function_exists ( '_doing_it_wrong ' ) ) {
522- if ( defined ( 'WP_REDIS_TRACE ' ) && WP_REDIS_TRACE ) {
523- _doing_it_wrong ( __FUNCTION__ , 'Tracing feature was removed. ' , '2.1.2 ' );
524- }
521+ if ( defined ( 'WP_REDIS_TRACE ' ) && WP_REDIS_TRACE ) {
522+ trigger_error ('Tracing feature was removed ' , E_USER_DEPRECATED );
525523 }
526524
527525 $ client = $ this ->determine_client ();
@@ -758,9 +756,7 @@ protected function connect_using_phpredis( $parameters ) {
758756 if ( defined ( 'WP_REDIS_SERIALIZER ' ) && ! empty ( WP_REDIS_SERIALIZER ) ) {
759757 $ this ->redis ->setOption ( Redis::OPT_SERIALIZER , WP_REDIS_SERIALIZER );
760758
761- if ( function_exists ( '_doing_it_wrong ' ) ) {
762- _doing_it_wrong ( __FUNCTION__ , 'The `WP_REDIS_SERIALIZER` configuration constant has been deprecated, use `WP_REDIS_IGBINARY` instead. ' , '2.3.1 ' );
763- }
759+ trigger_error ('The `WP_REDIS_SERIALIZER` configuration constant has been deprecated in favor of `WP_REDIS_IGBINARY` ' , E_USER_DEPRECATED );
764760 }
765761 }
766762
@@ -834,9 +830,7 @@ protected function connect_using_relay( $parameters ) {
834830 if ( defined ( 'WP_REDIS_SERIALIZER ' ) && ! empty ( WP_REDIS_SERIALIZER ) ) {
835831 $ this ->redis ->setOption ( Relay \Relay::OPT_SERIALIZER , WP_REDIS_SERIALIZER );
836832
837- if ( function_exists ( '_doing_it_wrong ' ) ) {
838- _doing_it_wrong ( __FUNCTION__ , 'The `WP_REDIS_SERIALIZER` configuration constant has been deprecated, use `WP_REDIS_IGBINARY` instead. ' , '2.3.1 ' );
839- }
833+ trigger_error ('The `WP_REDIS_SERIALIZER` configuration constant has been deprecated in favor of `WP_REDIS_IGBINARY` ' , E_USER_DEPRECATED );
840834 }
841835 }
842836
@@ -948,11 +942,11 @@ protected function connect_using_predis( $parameters ) {
948942 * @param array $parameters Connection parameters built by the `build_parameters` method.
949943 * @throws \Exception If the Credis library was not found or is unreadable.
950944 * @throws \Exception If redis sharding should be configured as Credis does not support sharding.
951- * @throws \Exception If more than one seninel is configured as Credis does not support multiple sentinel servers.
945+ * @throws \Exception If more than one sentinel is configured as Credis does not support multiple sentinel servers.
952946 * @return void
953947 */
954948 protected function connect_using_credis ( $ parameters ) {
955- _doing_it_wrong ( __FUNCTION__ , 'Credis support will be removed in future versions. ' , ' 2.0.26 ' );
949+ trigger_error ( 'Credis support is deprecated and will be removed in the future ' , E_USER_DEPRECATED );
956950
957951 $ client = 'Credis ' ;
958952
@@ -1079,7 +1073,7 @@ protected function connect_using_credis( $parameters ) {
10791073 }
10801074
10811075 $ this ->diagnostics = array_merge (
1082- [ 'client ' => sprintf ( '%s (v %s) ' , $ client , Credis_Client:: VERSION ) ],
1076+ [ 'client ' => sprintf ( '%s (%s) ' , $ client , ' bundled ' ) ],
10831077 $ args
10841078 );
10851079 }
@@ -1091,7 +1085,7 @@ protected function connect_using_credis( $parameters ) {
10911085 * @return void
10921086 */
10931087 protected function connect_using_hhvm ( $ parameters ) {
1094- _doing_it_wrong ( __FUNCTION__ , 'HHVM support will be removed in future versions. ' , ' 2.0.26 ' );
1088+ trigger_error ( 'HHVM support is deprecated and will be removed in the future ' , E_USER_DEPRECATED );
10951089
10961090 $ this ->redis = new Redis ();
10971091
0 commit comments