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
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
Comment #2
amateescu commentedThis is a very interesting proposal. We'll need to carefully consider the implications for it though..
Comment #3
geek-merlinYes! 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.
Comment #4
geek-merlinAdded thoughts to the IS.
Comment #5
geek-merlinIs this the right tag? Correct me if not.
Comment #6
geek-merlinWondering, what is the planned upgrade path to populate the "provider" field?
Comment #7
geek-merlinComment #8
amateescu commentedIt's already populated by
workspaces_update_11303()with->setInitialValue(DefaultWorkspaceProvider::getId()):)Comment #9
geek-merlinAh 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.
Comment #10
catchI 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.
Comment #11
geek-merlinComment #13
amateescu commentedPosted 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..
Comment #14
geek-merlinDe-escalating as it is clear enough that it can be done and can be added later.
Comment #15
geek-merlinStill some tests to fix.
Comment #16
amateescu commentedThe remaining MR comment should get us a long way with test failures :)