Problem/Motivation

Contextual .module only has a couple remaining functions.

See #3566536: [meta] eliminate core .module files.

Proposed resolution

Create new ContextualLinksSerializer service.
Add linkToId and idToLinks methods

Replace calls to deprecated methods.

Remaining tasks

N/A

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-3568087

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

claudiu.cristea created an issue. See original summary.

claudiu.cristea’s picture

Assigned: claudiu.cristea » Unassigned
Status: Active » Needs review

Ready for review.

dcam’s picture

Status: Needs review » Reviewed & tested by the community

The MR looks good to me, as does the change record. I wondered if the controller needed the backward compatibility, but @longwave requested it in #3398528: Add support for autowiring to controller methods, so it's probably a good idea.

nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

I updated the issue summary.

I think this looks great but one question that I know will come up is these functions were not api before but are with this change.

Should we mark the service as internal?

I think it's fine to keep contained in a small service since it's used in two places.

larowlan’s picture

Status: Reviewed & tested by the community » Needs review

Just one minor question, feel free to self RTBC/reject

claudiu.cristea’s picture

Status: Needs review » Reviewed & tested by the community

Injected the service.

  • larowlan committed 317ec5e3 on main
    task: #3568087 Deprecate procedural code from contextual.module
    
    By:...

  • larowlan committed 4cf50a24 on 11.x
    task: #3568087 Deprecate procedural code from contextual.module
    
    By:...

larowlan’s picture

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

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

Status: Fixed » Closed (fixed)

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