\Drupal calls should be avoided in classes, use dependency injection instead.

CommentFileSizeAuthor
#2 3121074-2.patch3.89 KBneelam_wadhwani
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

neelam_wadhwani created an issue. See original summary.

neelam_wadhwani’s picture

Assigned: neelam_wadhwani » Unassigned
Status: Needs work » Needs review
FileSize
3.89 KB

KIndly review patch.

  • Tom.Camp committed f00b384 on 8.x-1.x
    Issue #3121074 by neelam_wadhwani: Removing calls to \Drupal.
    
Tom.Camp’s picture

Status: Needs review » Fixed

Thank you neelam_wadhwani. Your patch had a conflict with another patch that I had applied, but I corrected this issue by adding `'@config.factory'` to the drush.services.yml and using the ConfigFactoryInterface to get the settings.

Tom.Camp’s picture

Status: Fixed » Closed (fixed)