Remove magic property overloading from Extension class

Created on 23 August 2014, almost 10 years ago
Updated 3 April 2023, about 1 year 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 3 days 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.69.0 2024