diff -u b/core/modules/file/src/Tests/FileFieldRevisionTest.php b/core/modules/file/src/Tests/FileFieldRevisionTest.php --- b/core/modules/file/src/Tests/FileFieldRevisionTest.php +++ b/core/modules/file/src/Tests/FileFieldRevisionTest.php @@ -10,7 +10,6 @@ * @group file */ class FileFieldRevisionTest extends FileFieldTestBase { - /** * Tests creating multiple revisions of a node and managing attached files. * reverted: --- b/core/modules/node/src/Tests/NodeAdminTest.php +++ a/core/modules/node/src/Tests/NodeAdminTest.php @@ -69,7 +69,7 @@ foreach (['dd', 'aa', 'DD', 'bb', 'cc', 'CC', 'AA', 'BB'] as $prefix) { $changed += 1000; $node = $this->drupalCreateNode(['title' => $prefix . $this->randomMachineName(6)]); + db_update('node_field_data') - \Drupal::database()->update('node_field_data') ->fields(['changed' => $changed]) ->condition('nid', $node->id()) ->execute(); reverted: --- b/core/modules/node/src/Tests/NodeBlockFunctionalTest.php +++ a/core/modules/node/src/Tests/NodeBlockFunctionalTest.php @@ -70,13 +70,13 @@ $node3 = $this->drupalCreateNode($default_settings); // Change the changed time for node so that we can test ordering. + db_update('node_field_data') - \Drupal::database()->update('node_field_data') ->fields([ 'changed' => $node1->getChangedTime() + 100, ]) ->condition('nid', $node2->id()) ->execute(); + db_update('node_field_data') - \Drupal::database()->update('node_field_data') ->fields([ 'changed' => $node1->getChangedTime() + 200, ]) diff -u b/core/modules/tracker/tracker.module b/core/modules/tracker/tracker.module --- b/core/modules/tracker/tracker.module +++ b/core/modules/tracker/tracker.module @@ -269,7 +269,7 @@ ]) ->execute(); // Update the times for all the other users tracking the post. - \Drupal::database()->update('tracker_user') + db_update('tracker_user') ->condition('nid', $nid) ->fields([ 'changed' => $changed, @@ -279,7 +279,7 @@ ]) ->execute(); // Update the times for all the other users tracking the post. - db_update('tracker_user') + \Drupal::database()->update('tracker_user') ->condition('nid', $nid) ->fields([ 'changed' => $changed, only in patch2: unchanged: --- a/core/includes/database.inc +++ b/core/includes/database.inc @@ -26,7 +26,7 @@ * instead. * * Do not use this function for INSERT, UPDATE, or DELETE queries. Those should - * be handled via db_insert(), db_update() and db_delete() respectively. + * be handled via db_insert(), \Drupal::database()->update() and db_delete() respectively. * * @param string|\Drupal\Core\Database\StatementInterface $query * The prepared statement query to run. Although it will accept both named and @@ -206,7 +206,7 @@ function db_merge($table, array $options = []) { * @see \Drupal\Core\Database\Connection::update() * @see \Drupal\Core\Database\Connection::defaultOptions() */ -function db_update($table, array $options = []) { +function \Drupal::database()->update($table, array $options = []) { if (empty($options['target']) || $options['target'] == 'replica') { $options['target'] = 'default'; } only in patch2: unchanged: --- a/core/modules/node/tests/src/Functional/NodeAdminTest.php +++ b/core/modules/node/tests/src/Functional/NodeAdminTest.php @@ -69,7 +69,7 @@ public function testContentAdminSort() { foreach (['dd', 'aa', 'DD', 'bb', 'cc', 'CC', 'AA', 'BB'] as $prefix) { $changed += 1000; $node = $this->drupalCreateNode(['title' => $prefix . $this->randomMachineName(6)]); - db_update('node_field_data') + \Drupal::database()->update('node_field_data') ->fields(['changed' => $changed]) ->condition('nid', $node->id()) ->execute(); only in patch2: unchanged: --- a/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php +++ b/core/modules/node/tests/src/Functional/NodeBlockFunctionalTest.php @@ -70,13 +70,13 @@ public function testRecentNodeBlock() { $node3 = $this->drupalCreateNode($default_settings); // Change the changed time for node so that we can test ordering. - db_update('node_field_data') + \Drupal::database()->update('node_field_data') ->fields([ 'changed' => $node1->getChangedTime() + 100, ]) ->condition('nid', $node2->id()) ->execute(); - db_update('node_field_data') + \Drupal::database()->update('node_field_data') ->fields([ 'changed' => $node1->getChangedTime() + 200, ])