Inject logger service into SmsGatewayPluginBase instead of accessing global Drupal object.

May as well remove \Drupal\sms\Plugin\SmsGatewayPluginBase::logger(), use protected reference to service?

Comments

dpi created an issue. See original summary.

dpi’s picture

Actually apart from the logger gateway we are not using this.

Perhaps it makes sense to log failure of result and reports in the provider service?

dpi’s picture

Also OP is unlikely to happen now since it changes the signature of dependent constructors, making it a backwards incompatible change.

almaudoh’s picture

Well, we're still making changes to schema, etc. So we might as well clean this up as well.

On the other hand, do we really need the logger here?

dpi’s picture

Yeh i dont think so, we can inject the logger into the log gateway, remove it from base.

dpi’s picture

  • dpi committed 14ec30b on 8.x-1.x
    Issue #2792891 by dpi: Move logger service from gateway base to logger...
dpi’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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