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.
Followup to #2875394: Replace all calls to db_query, which is deprecated
core/tests/Drupal/KernelTests/Core/Database/
replacemets in another issue - #2939387: Replace all calls to db_query [core/test/../Database]
grep -inr --exclude-dir=Database -e "db_query" core/tests/
Comment | File | Size | Author |
---|---|---|---|
#7 | interdiff-2939389-05-07.txt | 455 bytes | voleger |
#7 | replace_all_db_query_calls-2939389-07-8.6.x.patch | 10.51 KB | voleger |
#5 | interdiff-2939389-03-05.txt | 8.47 KB | voleger |
#5 | replace_all_db_query_calls-2939389-05-8.6.x.patch | 10.51 KB | voleger |
#3 | interdiff-2939389-02-03.txt | 6.6 KB | voleger |
Comments
Comment #2
volegerComment #3
volegerReformat changes
Comment #4
volegergrep -inr --exclude-dir=Database -e "db_query" core/tests/
Comment #5
volegerComment #7
volegerOops.
Comment #8
volegerTests are green. Ready for review.
Comment #9
joshmillerComment #10
alexpottcore/tests/Drupal/KernelTests/Core/Database/UpdateTest.php still has a usage.
This patch should be scripted. And done in one issue. See #2849669: Fix \Drupal\Component\Utility\Unicode() because of the Symfony mbstring polyfill and #2958429: Properly deprecate SafeMarkup::format(). The patch should also add an @trigger_error to db_query().
Putting at needs works so that everything can be migrated to #2875394: Replace all calls to db_query, which is deprecated. For more info on why this is the right approach see https://www.drupal.org/core/scope#examples specifically the example of entity_load()
Comment #11
alexpott@voleger forgot to say thanks for all the work here! Cleaning up the tech debt is something I'm really keen on too and it'll be amazing to get to a point where we're doing a lot less legacy stuff.
Comment #13
volegerSo we will work on the scripted patch.
Follow #2875394: Replace all calls to db_query, which is deprecated