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.
In drupal 8 we should not use the depreciated db_queries.
Comment | File | Size | Author |
---|---|---|---|
#4 | removed_depreciated-2869345-3.png | 67.89 KB | amit.drupal |
#2 | removed_depreciated-2869345-2.patch | 620 bytes | Munavijayalakshmi |
Comments
Comment #2
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound commentedComment #3
amit.drupal CreditAttribution: amit.drupal as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedDocumentation for how/when to use this new style?
https://api.drupal.org/api/drupal/core!includes!database.inc/function/db...
Get a database connection injected into your service from the container and call query() on it.
For example, $injected_database->query($query, $args, $options);
we are going to change this again and inject the service instead to use \Drupal::database()
That makes me wonder if this is worth it or if it would better to wait until move this into a service and do the change there?
Comment #4
amit.drupal CreditAttribution: amit.drupal as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedComment #6
Nitebreed