Remove magic property overloading from Extension class

Created on 23 August 2014, over 10 years ago
Updated 3 April 2023, almost 2 years ago

#2228093: Modernize theme initialization originally intended to eliminate the magic overloading of theme info properties on Extension objects, but did not.

The magically overloaded theme extension properties are still used:

Undefined property: Drupal\Core\Extension\Extension::$info

Drupal\Core\Extension\ThemeHandler->addTheme(Object)
Drupal\Core\Extension\ThemeHandler->listInfo()
list_themes()
_drupal_maintenance_theme()
drupal_maintenance_theme()
drupal_flush_all_caches()

The reason is:

#2228093: Modernize theme initialization only cleaned up theme initialization.

However, ThemeHandler::rebuildThemeData() is unrelated to initialization and still operates on Extension objects only.

Given that there is a use-case for instantiating a Theme domain object (including base themes) within that process, we should probably rename the ActiveTheme class into just Theme. — No change in behavior. It only doesn't have to be the currently active theme, you can instantiate it for any theme.

📌 Task
Status

Needs work

Version

10.1

Component
Extension 

Last updated about 21 hours ago

No maintainer
Created by

🇩🇪Germany sun Karlsruhe

Live updates comments and jobs are added and updated live.
  • API clean-up

    Refactors an existing API or subsystem for consistency, performance, modularization, flexibility, third-party integration, etc. May imply an API change. Frequently used during the Code Slush phase of the release cycle.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024