Problem/Motivation
After #3487971: Convert system_page_attachments to OOP system_theme will be the last procedural hook in core that supports OOP implementations for.
This is complicated by install calling system before the module is registered.
Steps to reproduce
Convert system_theme
Try installing Drupal
Proposed resolution
Move theme array in system_theme and drupal_common_theme to ThemeCommonElements in Core/lib/Theme
Call ThemeCommonElements from the OOP version of SystemTheme.
Update registry to check if it's being called from install.
If it is load the ThemeCommonElements manually otherwise proceed as usual.
If populating the theme registry during install confirm we are not in a test.
Remaining tasks
N/A
User interface changes
N/A
Introduced terminology
N/A
API changes
system_theme has been converted to a method in a hook class
drupal_common_theme no longer exists
ThemeCommonElements has the common theme items
Data model changes
N/A
Release notes snippet
N/A