Class StatsDLogger.php and StatsdEventSubscriber.php contain \Drupal::service() to get the service. Please use the Dependency Injection to access the service.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pratik_kamble created an issue. See original summary.

pratik_kamble’s picture

Working on fixing it.

pratik_kamble’s picture

Status: Active » Needs review
FileSize
4.88 KB

I have attached the patch to have dependency injection for Statsd Manager.

siddhant.bhosale’s picture

Status: Needs review » Reviewed & tested by the community

I have reviewed and tested the patch and looks good to be merged.

  • pratik_kamble committed 06132d7 on 8.x-1.x
    Issue #3083750 by pratik_kamble: Avoid use of \Drupal inside the classes
    
pratik_kamble’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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