'value'=>'The installed schema version meets the minimum.',
'description'=>'Schema version: '.$system_schema,
];
}
else{
$requirements['minimum schema']+=[
'value'=>'The installed schema version does not meet the minimum.',
'severity'=>RequirementSeverity::Error,
'description'=>'Your system schema version is '.$system_schema.'. Updating directly from a schema version prior to 8000 is not supported. You must upgrade your site to Drupal 8 (or later), see https://www.drupal.org/docs/upgrading-drupal.',
];
}
return$requirements;
@trigger_error(__FUNCTION__.'() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. Use \Drupal::service(DatabaseUpdate::class)->systemSchemaRequirements() instead. See https://www.drupal.org/node/3013060',E_USER_DEPRECATED);
@trigger_error(__FUNCTION__.'() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. Use \Drupal::service(DatabaseUpdate::class)->getRequirements() instead. See https://www.drupal.org/node/3013060',E_USER_DEPRECATED);
\Drupal::messenger()->addWarning(t('Schema information for module %module was missing from the database. You should manually review the module updates and your database to check if any updates have been skipped up to, and including, %last_update_hook.',$args));
\Drupal::logger('update')->warning('Schema information for module %module was missing from the database. You should manually review the module updates and your database to check if any updates have been skipped up to, and including, %last_update_hook.',$args);
}
}
@trigger_error(__FUNCTION__.'() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. This function was for internal use only and has no replacement. See https://www.drupal.org/node/3013060',E_USER_DEPRECATED);
@trigger_error(__FUNCTION__.'() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. Use \Drupal::service(DatabaseUpdate::class)->doOne() instead. See https://www.drupal.org/node/3013060',E_USER_DEPRECATED);
'value'=>'The installed schema version meets the minimum.',
'description'=>'Schema version: '.$system_schema,
];
}
else{
$requirements['minimum schema']+=[
'value'=>'The installed schema version does not meet the minimum.',
'severity'=>RequirementSeverity::Error,
'description'=>'Your system schema version is '.$system_schema.'. Updating directly from a schema version prior to 8000 is not supported. You must upgrade your site to Drupal 8 (or later), see https://www.drupal.org/docs/upgrading-drupal.',
];
}
return$requirements;
}
/**
* Checks update requirements and reports errors and (optionally) warnings.
$this->messenger->addWarning($this->t('Schema information for module %module was missing from the database. You should manually review the module updates and your database to check if any updates have been skipped up to, and including, %last_update_hook.',$args));
$this->loggerChannelFactory->get('update')->warning('Schema information for module %module was missing from the database. You should manually review the module updates and your database to check if any updates have been skipped up to, and including, %last_update_hook.',$args);
}
}
}
/**
* Performs one update and stores the results to display on the results page.
*
* If an update function completes successfully, it should return a message
* as a string indicating success, for example:
* @code
* return t('New index added successfully.');
* @endcode
*
* Alternatively, it may return nothing. In that case, no message
* will be displayed at all.
*
* If it fails for whatever reason, it should throw an instance of
* Drupal\Core\Utility\UpdateException with an appropriate error message, for
* example:
* @code
* use Drupal\Core\Utility\UpdateException;
* throw new UpdateException('Description of what went wrong');
* @endcode
*
* If an exception is thrown, the current update and all updates that depend
* on it will be aborted. The schema version will not be updated in this case,
* and all the aborted updates will continue to appear on update.php as
* updates that have not yet been run.
*
* If an update function needs to be re-run as part of a batch process, it
* should accept the $sandbox array by reference as its first parameter and
* set the #finished property to the percentage completed that it is, as a
* fraction of 1.
*
* @param string $module
* The module whose update will be run.
* @param int $number
* The update number to run.
* @param array $dependency_map
* An array whose keys are the names of all update functions that will be
* performed during this batch process, and whose values are arrays of other