Problem/Motivation

Aftermath of #3095414: Add the concept of workspace providers:
Last nicght it occured to me that design-pattern-wise, the added workspace.provider base field should really be the bundle key.

This might solve the question "where do providers store their custom payload" elegantly as "in bundle fields".

Setting critical as considering this after beta might have unforseeable costs.

Proposed resolution

- Make provider the bundle key of workspaces (or document why not)

Thoughts:
- I can't think of another reasonable use case for bundle.
- If bundle is not used for bundle fields, no harm is done
- It selves the EntityCreateAccess problem very elegantly, by using the existing mandatory bundle parameter

Remaining tasks

Consider, do it.

Issue fork drupal-3553638

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

geek-merlin created an issue. See original summary.

amateescu’s picture

Component: workflows.module » workspaces.module

This is a very interesting proposal. We'll need to carefully consider the implications for it though..

geek-merlin’s picture

Yes! Just cried wolf because I do not know enough about the cost of doing that later.
Feel free to PM me if time runs out and sth needs to be reviewed.

geek-merlin’s picture

Issue summary: View changes

Added thoughts to the IS.

geek-merlin’s picture

Issue tags: +beta blocker

Is this the right tag? Correct me if not.

geek-merlin’s picture

Issue summary: View changes

Wondering, what is the planned upgrade path to populate the "provider" field?

geek-merlin’s picture

amateescu’s picture

Wondering, what is the planned upgrade path to populate the "provider" field?

It's already populated by workspaces_update_11303() with ->setInitialValue(DefaultWorkspaceProvider::getId()) :)

geek-merlin’s picture

Ah yes, i remember. Looking it up, it is default value AND initial value. Then this works with whatever that ID is. And if we decide to implement this issue, the bundle is guaranteed to be in place correctly.

catch’s picture

I don't yet have a strong opinion on this, but that includes that I can't think of an obvious reason not to do it.

geek-merlin’s picture

Issue summary: View changes

amateescu’s picture

Status: Active » Needs work

Posted a few review items. Still not sure how I feel about this, but it's not a lot of code to maintain, and I guess we can undo it in the future if a good arguments against it comes up..

geek-merlin’s picture

Title: Make provider the bundle key of workspaces (or document why not) » Make provider the bundle key of workspaces
Priority: Critical » Normal
Issue tags: -beta blocker

De-escalating as it is clear enough that it can be done and can be added later.

geek-merlin’s picture

Still some tests to fix.

amateescu’s picture

The remaining MR comment should get us a long way with test failures :)

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.