Problem/Motivation

_menu_link_content_update_path_alias is the only remaining function in menu_link_content.module
Let's deprecate it and move it to a protected method.

Steps to reproduce

N/A

Proposed resolution

Move function to MenuLinkContentHooks it should be protected since it is an underscore function
Since this is so minimal we can add DI at the same time
Add string parameter type

Remaining tasks

Review

User interface changes

N/A

Introduced terminology

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Issue fork drupal-3570863

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.

nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

Status: Active » Needs review
dcam’s picture

Status: Needs review » Needs work

It's looking good, but you forgot to replace the $menu_link_manager with the injected service in entityPredelete().

nicxvan’s picture

Good catch!

I also just outright deleted the .module file since we now have direction to just remove underscore functions and that was the last one.

nicxvan’s picture

Status: Needs work » Needs review
dcam’s picture

Status: Needs review » Reviewed & tested by the community

My feedback was addressed. I didn't find anything else to comment on. LGTM.

nicxvan’s picture

Sorry for the ping pong - we got confirmation that callbacks and underscore can be deprecated for removal in 12.

dcam’s picture

It's ok. When I was working on issues later yesterday evening that had underscore function removals I figured there would be others getting pulled back.

nicxvan’s picture

Status: Reviewed & tested by the community » Needs review

Just waiting on tests

dcam’s picture

Status: Needs review » Reviewed & tested by the community

The .module file and _menu_link_content_update_path_alias() were restored and deprecated. LGTM.

  • catch committed 69cf1d10 on 11.x
    task: #3570863 Deprecate _menu_link_content_update_path_alias
    
    By:...

  • catch committed 99d71d7d on main
    task: #3570863 Deprecate _menu_link_content_update_path_alias
    
    By:...

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and 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.

Status: Fixed » Closed (fixed)

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