Problem/Motivation

In Drupal\name\Plugin\views\filter\Fulltext::op_word() , Condition object is instantiated.

Per Creating an instance of the class Drupal\Core\Database\Query\Condition with the new keyword is deprecated and an API addition with the method Drupal\Core\Database\Query\Query::getConnection():
'Creating an instance of this class is deprecated in drupal:9.1.0 and is removed in drupal:10.0.0. Use Database::getConnection()->condition() instead.'

Steps to reproduce

Proposed resolution

Replace

    $where = $this->operator == 'word' ? new Condition('OR') : new Condition('AND');

with

$where = $this->connection->condition($this->operator == 'word' ? 'OR' : 'AND');

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork name-3350735

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

godotislate created an issue. See original summary.

godotislate’s picture

Issue summary: View changes

godotislate’s picture

Status: Active » Needs review

Opened merge request.

bluegeek9 made their first commit to this issue’s fork.

bluegeek9’s picture

Status: Needs review » Reviewed & tested by the community

I updated the minimum version to 9.1

Introduced in version: 9.1.0

  • heddn committed a29ef35c on 8.x-1.x
    Issue #3350735 by bluegeek9, godotislate, heddn: Creating instance of...
heddn’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for your contributions.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.