Problem/Motivation
Overriding \Drupal\Core\Theme\Registry is dangerous because it could break many assumptions made in the theme system. Theme registry contents should be frozen but the way it's generated shouldn't. We should also be able to add features to Registry in minor releases and this isn't really possible right now because unknown places (custom/contrib/core themes and modules) trust the way it works. This logic shouldn't be overrideable (or we should tell people to not do it) because it's connected very tightly to the whole theme system.
Why this is RC eligible
This only changes documentation by marking a class internal.
Proposed resolution
Mark \Drupal\Core\Theme\Registry internal.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#12 | mark-2600228-12.patch | 685 bytes | lauriii |
#8 | interdiff.txt | 608 bytes | lauriii |
#8 | mark-2600228-8.patch | 659 bytes | lauriii |
#6 | interdiff.txt | 585 bytes | lauriii |
#6 | mark-2600228-6.patch | 656 bytes | lauriii |
Comments
Comment #2
lauriiiComment #3
star-szrLooks good, added some rationale to the IS.
Comment #4
webchickThis is RC eligible since it's just docs, but I'm not sure the rules around marking stuff @internal or not. And since this seems like a framework manager decision, assigning to alexpott, who I guess already talked to lauriii about this a bit.
Comment #5
alexpottI think there should be an explanation.
Comment #6
lauriiiComment #7
dawehnerThe last word is a little bit odd. I would have expected 'internal' ...
Comment #8
lauriiiComment #9
alexpottComment #10
alexpottI think this is a good move to make this internal.
Comment #11
dawehnerAccording to @jhodgdon @internal should stand for itself. Additional information can be provided afterwards
Comment #12
lauriiiComment #13
joelpittetThis is RTBC as long as the request in #11 meant "Stand by itself" instead of "stand for itself"
Comment #14
catchThis needs a short change record since we're doing it within a stable release now - just gives people less excuses if they actually did subclass this to complain later.
Comment #16
lauriiiCreated change record
Comment #17
joelpittetHas the CR, rational seems reasonable to me, back to RTBC
Comment #18
alexpottCommitted 7acb0de and pushed to 8.1.x. Thanks!
Comment #21
fgmIs it not inconsistent to have a hook part of our public API ( hook_theme_registry_alter() ) access an @internal class ?
Comment #22
cilefen CreditAttribution: cilefen commentedhook_theme_registry_alter is modifying a discovered array, not calling functions. No?
Comment #23
fgmIndeed, but it contains a @see referencing this @internal structure.
Comment #24
cilefen CreditAttribution: cilefen commentedThe @see is a reference to documentation explaining the array structure passed to hook_theme_registry_alter. I do not see how this could be a problem.