Problem/Motivation
Convert the schema.inc functions to a service so it can be injected, unit tested and swapped. Affected functions:
- drupal_get_schema_versions()
- drupal_get_module_schema()
- drupal_schema_get_field_value()
The following functions should fall into the scope of extension services and should be moved in #2908886: Split off SchemaInstaller from schema.inc
- drupal_get_installed_schema_version()
- drupal_set_installed_schema_version()
- drupal_install_schema()
- drupal_uninstall_schema()
- _drupal_schema_initialize()
Already removed in https://www.drupal.org/node/2467521
drupal_get_schema()drupal_get_complete_schema()drupal_get_schema_unprocessed()
Proposed resolution
Create a schema service with methods that replace the mentioned functions in schema.inc.
Remaining tasks
Deprecate the functions changed by this issue. https://www.drupal.org/core/deprecation#how-function
Move the extension-related functions into extension services. Follow-up or find child issue here: #2186491: [meta] D8 Extension System: Discovery/Listing/Info
User interface changes
None
API changes
New Schema service with the following methods:
- get
- getComplete
- getVersions
getInstalledVersionsetInstalledVersioninstalluninstall- getUnprocessed
- getFieldsSqlgetFieldValue