db_query() should be replaced

CommentFileSizeAuthor
#2 3072415_2-replace-db-query.patch1.17 KBdpovshed

Comments

dpovshed created an issue. See original summary.

dpovshed’s picture

Status: Active » Needs review
StatusFileSize
new1.17 KB

Proposed patch attached.

dpovshed’s picture

sershevchyk’s picture

Status: Needs review » Needs work

Maybe we need to use Drupal\Core\Database\Database::getConnection() insteed \Drupal::database()
But Looks good

sershevchyk’s picture

Status: Needs work » Reviewed & tested by the community
andypost’s picture

There's no strict way, still discussion in #2991337: Document the recommended ways to obtain the database connection object
But here it's totally fine to use current container's service for database

dpovshed’s picture

Assigned: dpovshed » Unassigned

unassigned by maintainer's request

valthebald’s picture

Crediting @Shefarik for the code review

  • valthebald committed 61fc82b on 8.x-1.x
    Issue #3072415 by dpovshed, Shefarik: Replace obsolete db_query function...
valthebald’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x-1.x, thank you all!

Status: Fixed » Closed (fixed)

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