Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
workspaces.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Oct 2017 at 12:25 UTC
Updated:
7 Aug 2018 at 12:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
amateescu commentedComment #3
timmillwoodWe're aiming to provide an upgrade path from Multiversion, Workspace, etc in contrib to core. I'm not sure where this upgrade path will live yet but we might be able to mitigate any issues of having a core and contrib module with the same name.
I personally hit an issue where the Symfony class loader was cached in APC and it was trying to call the contrib workspace module when I enabled the core workspace module, even after I'd removed the module from the workspace. Clearing the APC cache fixed the issue.
It'd be nice to get the view of someone like @catch, @alexpott, or @plach on this.
Comment #4
fabianx commented+1 for workspaces instead of workspace - I missed that it was not called workspaces.module in the review as the issue was called workspaces.
Assigning to catch.
Comment #5
timmillwoodI've been giving this some thought and not sure we need to (or should) rename the module. I like singular module names, for example "Node" module allows you to create nodes (plural), but is still called Node (singular).
When "Workflows" module was added to core it was given a plural name not to conflict with the unrelated contrib module "Workflow", however with the contrib "Workspace" module we will be providing an upgrade path which we'd hope to allow a straight swap. Maybe this needs to wait until the upgrade path has a proof of concept?
Comment #6
gábor hojtsyIf the core module is beta then it will need to stay with that name. So "wait until the upgrade path has a proof of concept" only works if the module does not become beta and only stays in 8.7.x. (Unless the upgrade path proof of concept already exists, in which case that is not a blocker anymore.)
Comment #7
timmillwood@Gábor Hojtsy - True, I was hoping we may have been able to start testing this already, but we haven't had chance.
We have been discussing the upgrade path (https://www.millwoodonline.co.uk/blog/workspace-upgrade-path) the TL;DR is, uninstall the contrib module (which deletes all workspaces and non-live content), then install the core module. As @alexpott pointed out in Slack, this upgrade path is even easier if the modules have different names, because otherwise the uninstall part will need to be done before an update to 8.6, however with different names it can be done after a site has been updated to 8.6.
I do still like the singular name "Workspace", but I'm ambivalent.
Comment #8
amateescu commentedI started looking into how hard this rename would be, and here's how far I got. Some tests are failing so I probably missed a few places, but I didn't finish it because, while looking a bit through the code base after the rename, I think I would prefer keeping the singular form.
Comment #9
amateescu commentedA few fixes later, I think this should cover everything.
Comment #11
tim.plunkettI think a plural module name is better while retaining the singluar in most (if not all?) class names.
+1 to the latest patch
Comment #12
amateescu commentedRerolled after #2975334: Prevent changes that would leak into the Live workspace and fixed the remaining failures.
Comment #13
amateescu commentedDid a thorough line-by-line review and found only a comment that needed to be re-wrapped. I think this patch is good to go if we choose to rename the module.
Comment #14
timmillwood- It looks as though we agreed "workspaces" has it's advantages.
- Many people already refer to the module as "workspaces".
- Just changing the module name and namespace is fine.
- The patch passes all tests.
In that case, I think we're RTBC ready.
Comment #15
alexpottOne really good thing about not clashing with the contrib module name is that it makes upgrading simpler. If the names clash you don't just have to uninstall the contrib module you also have to completely remove the code - otherwise Drupal will not find the core module.
Another thing this will make simpler is if there are contrib or custom modules that depend on the contrib workspace module. Having a different namespace and module name means that we won't have to cope with incompatibilities or very hard to debug bugs caused by people using these module unexpectedly with the core module.
Comment #17
amateescu commentedRerolled after #2949991: Add workspace UI in top dialog.
Comment #18
plachI quickly scanned the code and it looks straightforward, @alexpott signed off in #15, so removing the tag.
Leaving this to @catch as it's assigned to him.
Comment #19
catchOK I don't have a strong opinion on singular vs. plural module names, but making the contrib -> core upgrade path easier is good, and it's nice that namespaces allow us to keep the class names singular, especially around entities - can't imagine what the first 10+ years of Drupal would have been like with nodes_load().
Patch looks fine to me but I only reviewed the first 60% of it, so just un-assigning for now.
Comment #22
amateescu commented@catch, I can assure you that the remaining 40% of the patch is as boring as the first part :D
Comment #23
timmillwoodComment #24
alexpottJust a note. I had to hotfix 8.6.x's \Drupal\Tests\config\Functional\ConfigImportAllTest because of the removal of the workspace module from that branch. Atm it has a hardcoded reference to the workspace module.
Comment #25
alexpottI think we can/need to add to this. As we have a different name we can declare the incompatibility with the contrib workspace module - and in the message we can tell people how to upgrade!
Comment #26
amateescu commented@alexpott, good point! I started a documentation page for this upgrade path (https://www.drupal.org/docs/8/core/modules/workspace/upgrading-from-the-...) and linked it in a new install requirement error.
Comment #27
amateescu commented@alexpott did a live review and found a few more things that should be renamed.
Comment #28
alexpott@amateescu nice work! #27 changes generic extension CSS rules from workspace to workspaces and tidies up other extension specific naming to use workspaces instead of workspace.
It's great that the new name allows us a hook_requirements implementation that actually helps people upgrade. RTBCing - hopefully this is green.
Comment #29
plachSaving credits
Comment #30
plachCommitted ab30572 and pushed to 8.7.x. Thanks!
Comment #32
gábor hojtsyFix component following module rename.
Comment #34
alexpottI backported this to 8.6.x so the shiny new Workspaces module is there.