function drupal_get_schema_versions in Drupal 9
Same name and namespace in other branches
- 8 core/includes/schema.inc \drupal_get_schema_versions()
- 4 includes/install.inc \drupal_get_schema_versions()
- 5 includes/install.inc \drupal_get_schema_versions()
- 6 includes/install.inc \drupal_get_schema_versions()
- 7 includes/install.inc \drupal_get_schema_versions()
Returns an array of available schema versions for a module.
Parameters
string $module: A module name.
Return value
array|bool If the module has updates, an array of available updates sorted by version. Otherwise, FALSE.
Deprecated
in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\SchemaDataInterface::getAvailableUpdates() instead.
See also
https://www.drupal.org/node/2444417
\Drupal\Core\Update\UpdateHookRegistry::getAvailableUpdates()
Related topics
1 call to drupal_get_schema_versions()
- UpdateDeprecationTest::testDrupalGetSchemaVersionsLegacyTest in core/
tests/ Drupal/ KernelTests/ Core/ Extension/ UpdateDeprecationTest.php - Deprecation testing for drupal_get_schema_versions function.
File
- core/
includes/ schema.inc, line 42 - Schema API handling functions.
Code
function drupal_get_schema_versions($module) {
@trigger_error('drupal_get_schema_versions() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \\Drupal\\Core\\Update\\UpdateHookRegistry::getAvailableUpdates() instead. See https://www.drupal.org/node/2444417', E_USER_DEPRECATED);
return \Drupal::service('update.update_hook_registry')
->getAvailableUpdates($module);
}