Closed (fixed)
Project:
Datetime Extras
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 May 2018 at 14:09 UTC
Updated:
2 Mar 2019 at 21:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
eiriksmComment #3
heddnWe need a BC layer for this. Can we add a "LegacyDateTimeDatelistWidget" that still retains the old name. Then add a trigger_error? Similar to https://www.drupal.org/core/deprecation#how-method
That way folks who are using the old one in their config will get notified of the deprecation and can update to the new widget.
Comment #4
dwwAs we rename this, let's make sure we only have to do it once. ;)
Comment #5
dwwIf we agree @ #3026314: Standardize naming conventions for plugins, config IDs, classes, etc, then this widget should use:
id: datetime_configurable_list
class: DateTimeConfigurableListWidget
Obviously the legacy one needs the old ID. Maybe the classname should include "Deprecated" in the name? "Legacy" is perhaps not clear enough. Something like this?
id: datatime_extras_configurable_list
class: DeprecatedDateTimeConfigurableListWidget
Also, the recommended way to deprecate a plugin is here:
https://www.drupal.org/core/deprecation#how-plugin (#how-plugin not #how-method)
This recommends: "Add @trigger_error('...', E_USER_DEPRECATED) to the plugin constructor." and also suggests "no_ui = true" in the annotation.
Cheers,
-Derek
Comment #6
dww#3026314: Standardize naming conventions for plugins, config IDs, classes, etc is now in. We have a clear standard we can now follow.
@heddn: would you be willing to take care of this one? It was your typo in the first place. ;)
Thanks!
-Derek
Comment #7
heddnI'll work on this.
Comment #8
heddnSo, following our mantra for tests, here's one that does some minimal BC testing.
Comment #10
heddnComment #12
heddnNot sure what's going here. Build passed, no phpcs failures. Is this the testbots?
Comment #13
dwwExcellent, thanks! Almost there.
The new class name doesn't match what we say it should be in CONTRIBUTING.md:
Other nits/questions:
New class name should change. But for this, shouldn't we say "8.x-1.x and will be removed before 8.x-2.0"? "1.x" and "2.0" aren't meaningful contrib version strings (yet).
Probably out of scope, but since we're already moving this around, I wonder if we could come up with a better label for this widget. ;) I'm still not totally sure what it does and why it's here.
While you're at it, can you add a short section to README.md about this widget, too?
Per our conventions, this new class should be "DateTimeConfigurableListWidget" (with the "Widget" on the end). The plugin ID doesn't need it, but the class does.
Curious: why do we need this?
Stale comment? The code doesn't look like it has anything to do with storage backends nor the theme system.
Thanks again!
-Derek
p.s. x-post with your testbot woes. No immediate insights. I'll see if I can dig in later.
Comment #14
dwwp.p.s. Re-queued #10 for a few more testing configs, including PHP 7.2 and 8.6.x. Let's see if that makes any difference. I'm following a thread in #drupal-infrastructure in Slack on a related topic right now. Trying to gather more data points for that.
Comment #15
dwwOkay, yeah, word on the street is that we've got more than 2^32 entries in a table in PIFT and the testbot is blowing up. They're trying to alter this table in the DB. It's going to Take Awhile(tm). ;) Fun. So yeah, don't worry about re-queuing this or relying on d.o testbot results for now.
But, you're welcome to fix the concerns in #13 if you're feeling inspired. ;)
Cheers,
-Derek
Comment #16
dwwBot recovered. Once we address #13, a new patch should test just fine.
Thanks,
-Derek
Comment #17
heddn13.1: I think in terms of composer version strings. In those terms it is 1.x and 2.0. We also have precident in other contrib projects that use this type of versioning. See https://cgit.drupalcode.org/address/tree/src/Plugin/migrate/cckfield/Add... as an example.
The rest of the feedback in 13 is now addressed.
Comment #18
dwwThis comment needs to match your new class name.
Otherwise, looks RTBC to me. Feel free to commit if you're happy with the new names for this. Maybe @mpdonadio wants to weigh in?
Thanks!
-Derek
Comment #20
heddnComment #21
dwwThanks!
Comment #23
dwwPushed a commit for a tiny follow-up to remove stale references to "datetime_configurable_list" from CONTRIBUTING.md. ;)