Closed (fixed)
Project:
Drupal core
Version:
main
Component:
media system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Jan 2026 at 19:50 UTC
Updated:
6 Apr 2026 at 16:05 UTC
Jump to comment: Most recent
There are only four remaining functions in media.module
Let's move them and deprecate if necessary.
_media_library_views_form_media_library_after_build
_media_library_media_type_form_submit
_media_library_configure_form_display
_media_library_configure_view_display
N/A
Move to hook class and mark internal. They need to be public because they are form callbacks.
Move to helper class that is internal. Make static so install can use them as well.
Review
Got signoff from a subsystem maintainer
N/A
N/A
N/A
N/A
N/A
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
nicxvan commentedComment #4
nicxvan commentedComment #5
phenaproximaLooks straightforward, just a couple of questions. I approve as a subsystem maintainer.
Comment #6
nicxvan commentedWe resolved those questions!
Needs work due to an unrelated failure on HEAD: #3570848: AssetAggregationAcrossPagesTest::testNodeAddPagesAuthor fails locally on main
Comment #7
nicxvan commentedThis is ready for review now!
Comment #8
nicxvan commentedComment #9
phenaproximaFine with me.
Comment #10
nicxvan commentedJust noting here we might be getting new direction on underscore functions to just delete them outright like we usually do.
Once I confirm I'll update this if necessary.
Comment #11
nicxvan commentedgot new direction to just delete underscore functions per the policy.
Comment #12
nicxvan commentedComment #13
dcam commentedAll declarations and usages of the underscore functions have been removed from Core.
Comment #14
nicxvan commentedSorry for the ping pong - we got confirmation that callbacks and underscore can be deprecated for removal in 12.
Just waiting on tests.
Comment #15
dcam commentedOne of the docblocks didn't get edited. I left a suggestion.
Comment #16
nicxvan commentedComment #17
dcam commentedThe deprecated functions have been restored. There are no usages of these functions remaining in Core, only their declarations. All of the restored functions have proper deprecations. LGTM.
Comment #18
longwaveNeeds rebase.
Comment #21
nicxvan commentedI rebased, I think it's fine to self rtbc.
Comment #22
longwaveThink we're going to need separate MRs here as this now applies to main but not 11.x.
Comment #24
nicxvan commentedDone, not sure I can self rtbc this, but they are identical.
Comment #25
nicxvan commentedI can't look at the tests on 11.x but I'd be surprised if they were not random.
Comment #26
nicxvan commentedSince we have split MRs now I asked in slack if we should just outright remove the functions on main, @longwave confirmed we should so I did.
Comment #27
nicxvan commentedGotta fix phpstan.
Comment #29
berdirRebased both MRs through the UI, the 11.x was 190 commits behind but there were no conflicts. Back to RTBC.
Comment #31
godotislateThis is close, but let's try strict types on the new class for both MRs.
Comment #32
nicxvan commentedI think it's safe to self RTBC.
Comment #37
godotislateCommitted 9ea78be and pushed to main.
Committed bc6fedf and pushed to 11.x. Thanks!