Deprecated function: Creation of dynamic property $where

Created on 21 March 2024, 9 months ago

Problem/Motivation

Error:

Deprecated function: Creation of dynamic property Drupal\elasticsearch_helper_views\Plugin\views\query\Elasticsearch::$where is deprecated in Drupal\views\Plugin\views\query\QueryPluginBase->setWhereGroup() (line 178 of core/modules/views/src/Plugin/views/query/QueryPluginBase.php).

Proposed resolution

Add $where property for a class Drupal\elasticsearch_helper_views\Plugin\views\query\Elasticsearch

  /**
   * @var string
   */
  protected $where;

-----

Diff:

diff --git a/src/Plugin/views/query/Elasticsearch.php b/src/Plugin/views/query/Elasticsearch.php
index 96c2a2b..f0ada5e 100644
--- a/src/Plugin/views/query/Elasticsearch.php
+++ b/src/Plugin/views/query/Elasticsearch.php
@@ -49,6 +49,11 @@ class Elasticsearch extends QueryPluginBase {
    */
   protected $queryBuilder;
 
+  /**
+   * @var string
+   */
+  protected $where;
+
   /**
    * Elasticsearch constructor.
    *
🐛 Bug report
Status

Active

Version

8.0

Component

Code

Created by

🇱🇻Latvia mr.valters Georgia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024