Change record: 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().

Since it’ll be a while until we depend on Drupal 9.1, probably doesn’t make sense to create a patch yet. (Also, pretty easy to do once we need it.)

Comments

drunken monkey created an issue. See original summary.

gabesullice’s picture

I think this should do it.

gabesullice’s picture

Status: Postponed » Needs review

Unlike many other deprecations, I think this is a case where the alternative method was already available. IOW, we don't need to wait to require 9.1 or drop support for Drupal 8.

drunken monkey’s picture

Status: Needs review » Fixed
Issue tags: -Drupal 9.1 dependency

Ah, yes, you’re right. Thanks!
While Connection::condition() was just added in 9.1, the old Select::conditionGroupFactory() method was indeed there long before that, and has now just been redirected, so using that should work perfectly.
Committed. Thanks again!

gabesullice’s picture

Thanks!

Status: Fixed » Closed (fixed)

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