Problem/Motivation

The 8.x-2.x branch of the contrib Workspace module has been committed to Drupal core 8.6.x. In order to prevent naming clashes with the existing contrib version of the module we should rename it.

Proposed resolution

Rename to "Workspaces".

Remaining tasks

Discuss, agree, do it :)

User interface changes

Nope.

API changes

Nope.

Data model changes

Nope.

Comments

timmillwood created an issue. See original summary.

amateescu’s picture

Project: Workspace » Drupal core
Version: 8.x-2.x-dev » 8.6.x-dev
Component: Code » workspace.module
Issue tags: +Workflow Initiative
timmillwood’s picture

We'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.

fabianx’s picture

Assigned: Unassigned » catch

+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.

timmillwood’s picture

I'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?

gábor hojtsy’s picture

If 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.)

timmillwood’s picture

@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.

amateescu’s picture

StatusFileSize
new109.34 KB

I 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.

amateescu’s picture

Status: Active » Needs review
StatusFileSize
new118.28 KB
new13.47 KB

A few fixes later, I think this should cover everything.

Status: Needs review » Needs work

The last submitted patch, 9: 2916780-9.patch, failed testing. View results

tim.plunkett’s picture

I think a plural module name is better while retaining the singluar in most (if not all?) class names.

+1 to the latest patch

amateescu’s picture

Status: Needs work » Needs review
StatusFileSize
new125.29 KB
new1.08 KB

Rerolled after #2975334: Prevent changes that would leak into the Live workspace and fixed the remaining failures.

amateescu’s picture

Issue summary: View changes
StatusFileSize
new125.44 KB
new1011 bytes

Did 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.

timmillwood’s picture

Status: Needs review » Reviewed & tested by the community

- 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.

alexpott’s picture

One 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.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 13: 2916780-13.patch, failed testing. View results

amateescu’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new125.86 KB
plach’s picture

I 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.

catch’s picture

Assigned: catch » Unassigned

OK 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.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 17: 2916780-17.patch, failed testing. View results

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

amateescu’s picture

@catch, I can assure you that the remaining 40% of the patch is as boring as the first part :D

timmillwood’s picture

Status: Needs work » Reviewed & tested by the community
alexpott’s picture

Just 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.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/workspaces/workspaces.install
@@ -2,15 +2,15 @@
-function workspace_requirements($phase) {
+function workspaces_requirements($phase) {

I 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!

amateescu’s picture

Status: Needs work » Needs review
StatusFileSize
new127.07 KB
new2.23 KB

@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.

amateescu’s picture

StatusFileSize
new131.26 KB
new8.65 KB

@alexpott did a live review and found a few more things that should be renamed.

alexpott’s picture

Status: Needs review » Reviewed & tested by the community

@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.

plach’s picture

Saving credits

plach’s picture

Version: 8.7.x-dev » 8.6.x-dev

Committed ab30572 and pushed to 8.7.x. Thanks!

  • plach committed ab30572 on 8.7.x
    Issue #2916780 by amateescu, timmillwood, alexpott: Rename to "...
gábor hojtsy’s picture

Component: workspace.module » workspaces.module

Fix component following module rename.

  • alexpott committed c8afb67 on 8.6.x authored by plach
    Issue #2916780 by amateescu, timmillwood, alexpott: Rename to "...
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

I backported this to 8.6.x so the shiny new Workspaces module is there.

Status: Fixed » Closed (fixed)

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