You are here

protected function PendingDbUpdates::areDbUpdatesPending in Automatic Updates 8

Checks if there are pending database updates.

Return value

bool TRUE if there are pending updates, otherwise FALSE.

1 call to PendingDbUpdates::areDbUpdatesPending()
PendingDbUpdates::run in src/ReadinessChecker/PendingDbUpdates.php
Run check.
1 method overrides PendingDbUpdates::areDbUpdatesPending()
TestPendingDbUpdates::areDbUpdatesPending in tests/src/Kernel/ReadinessChecker/PendingDbUpdatesTest.php
Checks if there are pending database updates.

File

src/ReadinessChecker/PendingDbUpdates.php, line 49

Class

PendingDbUpdates
Pending database updates checker.

Namespace

Drupal\automatic_updates\ReadinessChecker

Code

protected function areDbUpdatesPending() {
  require_once DRUPAL_ROOT . '/core/includes/install.inc';
  require_once DRUPAL_ROOT . '/core/includes/update.inc';
  drupal_load_updates();
  $hook_updates = update_get_update_list();
  $post_updates = $this->updateRegistry
    ->getPendingUpdateFunctions();
  return (bool) array_merge($hook_updates, $post_updates);
}