Problem/Motivation

class DateTimeDefaultWidget extends DateTimeWidgetBase implements ContainerFactoryPluginInterface {

and DateTimeWidgetBase class extends WidgetBase class

class DateTimeWidgetBase extends WidgetBase {

and , WidgetBase class implements ContainerFactoryPluginInterface

abstract class WidgetBase extends PluginSettingsBase implements WidgetInterface, ContainerFactoryPluginInterface {

Proposed resolution

Remove redundant ContainerFactoryPluginInterface from child classes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Hardik_Patel_12 created an issue. See original summary.

Hardik_Patel_12’s picture

Hardik_Patel_12’s picture

naresh_bavaskar’s picture

Status: Needs review » Reviewed & tested by the community

Code clean up looks good to me.

just tried to find why this code </code> ModerationOptOutUnpublish.php --> implements ContainerFactoryPluginInterface was added here. i think after fixing https://www.drupal.org/project/drupal/issues/3051633 this probably cleanup needed.

also for this cleanup DrupalSqlBase.php --> implements ContainerFactoryPluginInterface this issue https://www.drupal.org/project/drupal/issues/2548977 done that implements

Thanks!

  • catch committed 49dc61d on 9.1.x
    Issue #3155770 by Hardik_Patel_12, naresh_bavaskar: Parent class...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Good find and nice clean-up.

Committed 49dc61d and pushed to 9.1.x. Thanks!

Status: Fixed » Closed (fixed)

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