function PendingUpdatesValidator::updatesExist

Checks if there are any pending update or post-update hooks.

Return value

bool TRUE if there are any pending update or post-update hooks, FALSE otherwise.

1 call to PendingUpdatesValidator::updatesExist()
PendingUpdatesValidator::validate in core/modules/package_manager/src/Validator/PendingUpdatesValidator.php
Validates that there are no pending database updates.

File

core/modules/package_manager/src/Validator/PendingUpdatesValidator.php, line 52

Class

PendingUpdatesValidator
Validates that there are no pending database updates.

Namespace

Drupal\package_manager\Validator

Code

public function updatesExist() : bool {
    require_once $this->appRoot . '/core/includes/install.inc';
    require_once $this->appRoot . '/core/includes/update.inc';
    drupal_load_updates();
    $hook_updates = update_get_update_list();
    $post_updates = $this->updateRegistry
        ->getPendingUpdateFunctions();
    return $hook_updates || $post_updates;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.