Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
#2210197: Remove public access to Extension::$type, ::$name, ::$filename introduced some ugly, temporary code to work around Drush on testbots. 5 months later, Drush was hopefully updated.
#2228093: Modernize theme initialization eliminated the magic overloading of theme info properties on Extension
objects (replaced by a dedicated ActiveTheme
domain object).
Comment | File | Size | Author |
---|---|---|---|
#3 | interdiff.txt | 1.12 KB | sun |
#3 | extension.cleanup.3.patch | 3.97 KB | sun |
extension.cleanup.0.patch | 4.42 KB | sun | |
Comments
Comment #2
sunHm. The magically overloaded theme extension properties still appear to be used:
The reason is:
#2228093: Modernize theme initialization only cleaned up theme initialization. However,
ThemeHandler::rebuildThemeData()
is unrelated to initialization and still operates onExtension
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 theActiveTheme
class into justTheme
. — No change in behavior. It only doesn't have to be currently active theme, you can instantiate it for any theme.However, the good news is that Drush has indeed been updated on testbots, so the other public property workarounds in the
Extension
class are no longer necessary. :-)Comment #3
sunIn turn, let's defer that theme data rebuilding clean-up to a separate issue.
Comment #4
andypostLooks straightforward
Comment #5
dawehnerPerfect in its limited scope!
Comment #6
sunCreated #2326407: Remove magic property overloading from Extension class for cleaning up the serialization methods + refactoring the affected theme system functionality.
Comment #7
sunFWIW, this cleanup should not require a change notice.
The
Extension
class was only introduced in D8. The workarounds removed here only had to be added for Drush compatibility (on testbots). TheExtension
class has proper methods to retrieve all values of interest already.No code was supposed to use the temporarily added public properties. All of them were annotated with crystal clear
@todo
s.Comment #9
webchickNice clean-up.
Committed and pushed to 8.x. Thanks!