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
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:
- 3551446-deprecate-workspace-association-service
changes, plain diff MR !13451
Comments
Comment #3
amateescu commentedThe MR is written on top of #3550942: Add the ability to move content between workspaces, so postponing on that.
Comment #4
amateescu commentedThis is ready now. The MR is easier to review locally with
git diff 11.x --color-words.Comment #5
smustgrave commentedWasn'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.
Comment #8
catchThere 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!
Comment #11
amateescu commentedThanks! Updated and published the CR: https://www.drupal.org/node/3551450