Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
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:
Comments
Comment #2
godotislate CreditAttribution: godotislate at Digital Polygon commentedComment #4
godotislate CreditAttribution: godotislate at Digital Polygon commentedOpened merge request.
Comment #6
bluegeek9 CreditAttribution: bluegeek9 as a volunteer commentedI updated the minimum version to 9.1
Introduced in version: 9.1.0
Comment #8
heddnThanks for your contributions.