Problem/Motivation

\Drupal\workspaces\WorkspaceAssociationInterface has accumulated a bit of cruft over the years, with method names varying between "associated entities" and "tracked entities".

Proposed resolution

Deprecate workspaces.association and introduce a new workspaces.tracker service with a clean interface.

Remaining tasks

Review.

User interface changes

Nope.

Introduced terminology

N/A

API changes

- the workspaces.association service is deprecated
- a new workspaces.tracker service is added

Data model changes

Nope.

Release notes snippet

TBD.

Issue fork drupal-3551446

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

amateescu created an issue. See original summary.

amateescu’s picture

Title: Rename the workspace association service to workspace tracker » [PP-1] Rename the workspace association service to workspace tracker
Status: Active » Postponed

The MR is written on top of #3550942: Add the ability to move content between workspaces, so postponing on that.

amateescu’s picture

Title: [PP-1] Rename the workspace association service to workspace tracker » Rename the workspace association service to workspace tracker
Status: Postponed » Needs review

This is ready now. The MR is easier to review locally with git diff 11.x --color-words.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Wasn't sure how to 100% test so did my generic workspaces test

Applied the MR
Switched to the stage space
Created some content
Switched back to live
Verified content is there but blocked (because it's in stage)
Verified publishing content from stage.
Created a sub-stage space off stage
Same process but between sub-stage and stage

Not seeing any issue and seems like a good deprecation.

All instances of WorkspaceAssociationInterface appear to be replaced.

  • catch committed 0bb58159 on 11.3.x
    Issue #3551446 by amateescu: Rename the workspace association service to...

catch’s picture

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

There are quite a few contructor changes here, but they're all in new code introduced in 11.3.x or @internal code to the workspaces module which we would not expect people to extend, so I think it's OK to skip the 'best effort' bc for those cases since code overriding them should be extremely rare (and if it does exist a very high chance it's maintained by @amateescu anyway).

Committed/pushed to 11.x and cherry-picked to 11.3.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.

  • catch committed 9de676ee on 11.x
    Issue #3551446 by amateescu: Rename the workspace association service to...
amateescu’s picture

Thanks! Updated and published the CR: https://www.drupal.org/node/3551450

Status: Fixed » Closed (fixed)

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