Problem/Motivation

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

Steps to reproduce

Open file

Proposed resolution

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

Remaining tasks

Review

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3568124

Command icon Show commands

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

nicxvan created an issue. See original summary.

claudiu.cristea’s picture

Status: Active » Needs work

I have one remark and some suggestions. See the MR

nicxvan’s picture

I 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.

claudiu.cristea’s picture

Thank you for fixing. Unfortunately, tests are red

nicxvan’s picture

Yeah it's a real failure, I'll review.

nicxvan’s picture

Issue summary: View changes

There 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.

nicxvan’s picture

Status: Needs work » Needs review
claudiu.cristea’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. Thank you

nicxvan’s picture

I updated removals to 12 since they are underscore and form callbacks. Committers agreed to removal in 12 in this case.

longwave’s picture

Status: Reviewed & tested by the community » Needs work

Added some feedback, also needs a rebase.

nicxvan’s picture

Status: Needs work » Needs review

I 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.

claudiu.cristea’s picture

Status: Needs review » Reviewed & tested by the community

The remark concerning the return typing was addressed and looks good. Back to RTBC

alexpott’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 305c107 and pushed to main. Thanks!
Committed 643d4cd and pushed to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • alexpott committed 643d4cd1 on 11.x
    task: #3568124 Deprecate remaining functions in media.module
    
    By:...

  • alexpott committed 69652b9c on main
    task: #3568124 Deprecate remaining functions in media.module
    
    By:...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.