By martin107 on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
9.2.x
Introduced in version:
9.2.0
Description:
The following functions from schema.inc have been deprecated:
drupal_install_schema()drupal_uninstall_schema()_drupal_schema_initialize()drupal_get_module_schema()
No direct replacement is provided, as these functions were only intended for use by the module installer service.
Tests that previously called drupal_get_module_schema() to inspect schema specifications can use a new static helper:
$schema = drupal_get_module_schema($module, $table);
becomes
use Drupal\TestTools\Extension\SchemaInspector;
$module_handler = $this->container->get('module_handler');
$specification = SchemaInspector::getTablesSpecification($module_handler, $module);
$schema = $specification[$table];
Impacts:
Module developers