Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
media system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Jan 2026 at 04:20 UTC
Updated:
23 Jul 2026 at 15:41 UTC
Jump to comment: Most recent
There are only two remaining functions in media.module
Let's move them and deprecate if necessary.
_media_get_add_url
media_filter_format_edit_form_validate
Open file
deprecate _media_get_add_url without replacement. Move to protected method on MediaHooks
deprecate media_filter_format_edit_form_validate. Move to public method on MediaHooks
Review
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 #3
claudiu.cristeaI have one remark and some suggestions. See the MR
Comment #4
nicxvan commentedI applied your suggestions and also updated the cr link to link to the joint one.
I added it here and marked the one I created obsolete.
I don't think we need to deprecate _add_url it's incredibly specific, marked internal and there are no contrib uses.
Comment #5
claudiu.cristeaThank you for fixing. Unfortunately, tests are red
Comment #6
nicxvan commentedYeah it's a real failure, I'll review.
Comment #7
nicxvan commentedThere was a missing return type for addUrl since it can return strings too.
I also reconsidered deprecating the _ function, it's not a huge deal to deprecate them so I added a section to the CR for remove without replacement.
Comment #8
nicxvan commentedComment #9
claudiu.cristeaLooks good to me. Thank you
Comment #10
nicxvan commentedI updated removals to 12 since they are underscore and form callbacks. Committers agreed to removal in 12 in this case.
Comment #11
longwaveAdded some feedback, also needs a rebase.
Comment #12
nicxvan commentedI addressed your feedback, but just a little differently since it's only used here and a string is easier since we don't have to then check for the object before calling toString.
Comment #13
claudiu.cristeaThe remark concerning the return typing was addressed and looks good. Back to RTBC
Comment #14
alexpottCommitted 305c107 and pushed to main. Thanks!
Committed 643d4cd and pushed to 11.x. Thanks!