Follow up to #1890502: WYSIWYG: Add CKEditor module to core.

Method names get*Plugins() imply that what is returned are plugins (i.e., either plugin definitions or instances). However, these methods currently return file names and button arrays. I think we should have these methods return the $plugin instances, and let calling code call getFile() or getButtons() as desired. But, if we want these methods returning what they currently return, then let's adjust their method names accordingly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

What about get(Enabled|Buttons)PluginsMetadata()?

Wim Leers’s picture

Component: other » ckeditor.module
Assigned: Unassigned » Wim Leers
Status: Postponed » Needs review
Issue tags: +sprint, +Spark
FileSize
9.81 KB

In this patch:

  • getEnabledPlugins()getEnabledPluginFiles()
  • getButtonsPlugins()getButtons()
Wim Leers’s picture

Issue tags: -sprint, -Spark, -CKEditor in core

#2: 1905018-2.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +sprint, +Spark, +CKEditor in core

The last submitted patch, 1905018-2.patch, failed testing.

Wim Leers’s picture

Status: Needs work » Needs review
FileSize
11.02 KB

Straight reroll of #2. This one should pass tests.

Wim Leers’s picture

#5: 1905018-5.patch queued for re-testing.

webchick’s picture

Issue tags: +API change

Hm. Not sure we can do this anymore now that we're post-API freeze? At least not without leaving the old versions in with a @deprecated tag, if I'm reading http://buytaert.net/drupal-8-api-freeze correctly.

Should we just postpone to D9?

effulgentsia’s picture

Status: Needs review » Needs work
Issue tags: -API change

Sigh. My bad for not RTBCing #5 when it was posted, which was before the (timezone adjusted) API freeze deadline. I still think we should do this, but yeah, let's keep the old methods as wrappers to the new ones, and add a @deprecated to them.

Should we just postpone to D9?

I think it's a DX improvement to have (and within core, use) the new names. The D8 plugin system will be pretty foundational to many D8 contrib modules, so I'd like to minimize confusion that could arise from overloading the word with extraneous meanings.

Wim Leers’s picture

Status: Needs work » Needs review
FileSize
3.21 KB
12.87 KB

#7/#8: I understand the rules, and I've followed them in this reroll. But, really … there's nobody out there who has implemented it yet. Plus, it's not even the plugin interface, it's the plugin manager, and that should only very rarely be used by any code outside the CKEditor module itself. Somebody having written an alternative CKEditorPluginManager is even less plausible.
So … do we really want to retain the old deprecated functions? :)

If the answer is as simple as "we don't want to start making exceptions", then that's fine. But this is a rather ridiculous way of renaming functions, of course :)

effulgentsia’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
3.16 KB
11.39 KB

This just removes redundant docs from the deprecated functions. Otherwise, RTBC.

I agree with #9 that there's probably no D8 module out there yet that's invoking the deprecated functions, so I leave it to a core committer to decide on whether to leave them deprecated (this patch), or remove them entirely (#5).

Wim Leers’s picture

#10: okay, great, I already found it extremely silly to duplicate all docs, very happy to be wrong :)

webchick’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +Approved API change

All right, since this was ready before the API freeze deadline, I guess it can go in. Let's go with #5 then, because I agree that it's unlikely there are CKEditor plugin modules for D8 yet.

Committed and pushed to 8.x.

Wim Leers’s picture

Issue tags: -sprint

.

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