Closed (fixed)
Project:
Drupal core
Version:
main
Component:
block.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Jan 2026 at 12:04 UTC
Updated:
15 Mar 2026 at 15:05 UTC
Jump to comment: Most recent
See #3566536: [meta] eliminate core .module files
Drupal\block\BlockThemeblock_theme_initialize() to \Drupal\block\BlockTheme::themeInitialize()block_theme_initialize()None.
None.
None.
Drupal\block\BlockTheme</code > with <code>::themeInitialize() method.block_theme_initialize() is deprecated for removal in 12.0.0None.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
claudiu.cristeaFix IS
Comment #3
claudiu.cristeaComment #5
nicxvan commentedAt a high level this looks good, I updated the change record to match what I usually see for deprecated functions.
Comment #6
claudiu.cristeaReady for review
Comment #7
claudiu.cristeaOK, went with the proposal from @berdir and @nicxvan. Ready for e new review round
Comment #8
nicxvan commentedGot sign off on deprecating this way from @tim.plunkett the block module maintainer.
This MR is now fairly minimal and I think looks good
I confirmed the CRs point to the right place, versions are correct too.
There are no uses in contrib that I could find.
Comment #9
berdirThere's also an issue that discusses removing this functionality completely, although I don't fully agree with that. Might want to make a decision on that first before moving it to avoid duplicate work: #3105597: Stop copying block configuration from active theme when enabling a new theme?
Comment #10
claudiu.cristeaI think #3105597: Stop copying block configuration from active theme when enabling a new theme is the kind of issue which will take more time to get a decision because it's a business/functional issue. This is just a deprecation and refactoring. I would not block on that.
Comment #11
nicxvan commentedThank you, I am aware of that issue, this issue only makes that easier to remove if that is the decision made. Let's not block this on that.
Comment #12
berdirThat's fine, the reason I brought it up is that I'm a bit concerned about the RTBC queue. It's long and these .module cleanup issues are adding quite a bit to that. The main bottleneck that we need to optimize for I think is the RTBC queue and less our own time.
But yes, that one needs a product or framework maintainer decision I guess and that's essentially the same people.
Comment #14
phenaproximaIs there any chance we could, instead, deprecate this function outright with no replacement?
I explained my rationale in this
rantcomment: #3105597-33: Stop copying block configuration from active theme when enabling a new themeLong story short, I think
block_theme_initialize()is an oudated, confusing function from another era, whose behavior looks like a bug, and we should just toss it. Thoughts?Comment #15
nicxvan commentedIt already is deprecated without replacement.
The functionality itself would be removed in the issue you linked.
See 9-12
Restoring status.
Comment #16
phenaproximaWell...yeah, the function is deprecated without a replacement, but if we proceed with this MR as-is, then we have a whole other protected method to deprecate when we want to remove the functionality itself. What I'm wondering is, what if we combined this issue with that one, moving the function into a protected method and deprecating that protected method?
But it seems like the decision has been made in #9-#12, so I'm not going to (no pun intended) block it.
Comment #17
nicxvan commentedProtected functions like that should be able to be removed outright.
The reason I didn't do that is I think there is an open question about whether we can drop it entirely.
If that one lands first it makes this moot, if this one lands first it makes the other easier.
Comment #19
longwaveYep if we decide we don't want that method any more we can just drop it in future now it's been moved inside the class.
Committed and pushed ac357941fe8 to main and 38f070c8b85 to 11.x. Thanks!
Comment #23
longwave