Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
DateTimeDefaultWidget
contains a todo to this issue
Proposed resolution
Resolve @todo
Original report by @dawehner
#2034563: Switch field plugin managers to DefaultPluginManager
For all the logic needed in the current container factory maybe the createInstance method on the widget plugin manager should be different.
Comment | File | Size | Author |
---|---|---|---|
#14 | datetimedefaultwidget-2035317-14.patch | 2.23 KB | hussainweb |
#10 | 2035317-10.patch | 2.11 KB | andypost |
Comments
Comment #1
yched CreditAttribution: yched commentedThere was once a FormatterFactory too, which IIRC @tim.plunkett removed in the same patch that introduced the @FieldFormatter plugin annotation.
So maybe similarly this could be done in #2035315: Add a dedicated @FieldWidget annotation ?
Comment #2
yched CreditAttribution: yched commentedtagging
Comment #3
andypostis this issue still valid?
Comment #4
yched CreditAttribution: yched commentedNope, this was done in #2035315: Add a dedicated @FieldWidget annotation
Comment #5
andypostThere's @todo left
Comment #6
BerdirShouldn't we actually inject it then instead of just removing the @todo? Also, that @todo just says inject once this issue is in, so this issue was a blocker for that but there's no reason to do re-open this issue?
Comment #8
andypost@berdir so file new issue? suppose there's no reason to inject EM here, ince there's a method
Comment #9
andypost5: 2035317-5.patch queued for re-testing.
Comment #10
andypostProper title and summary -we need to resolve @todo
Comment #11
andypostComment #12
BerdirStill think this should have been a different issue, I'm sure there are other formatters and widgets that use global services too that are simply missing a corresponding @todo.
Comment #14
hussainwebI am rerolling the patch. There were conflicts from #2005434: Let 3rd party modules store extra configuration in EntityDisplay.
@Berdir, I will see if I can find more such widgets and create issues.
Comment #15
hussainwebComment #16
dawehnerPerfect
Comment #17
alexpottCommitted c679460 and pushed to 8.x. Thanks!