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_installed_schema_version()
drupal_set_installed_schema_version()
This functions are like a registry for last executed update function per module which is statically cached (clean-up of drupal_static()
is second win here
The remaining functions should fall into the scope of extension services and processed in #2908886: Split off schema management out of schema.inc
drupal_get_module_schema()
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()
Fixed in #3051981: Deprecate drupal_schema_get_field_value()drupal_schema_get_field_value()
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
- getAvailableUpdates
getInstalledVersionsetInstalledVersioninstalluninstall- getUnprocessed
- getFieldsSqlgetFieldValue