drupal_container() is deprecated, and all calls in the views_ui module need to be replaced with Drupal::service(), except for where the module_handler service is requested, which needs to be replaced with Drupal::moduleHandler() (see #1957154: Replace calls to drupal_container()->get('module_handler') service with Drupal::moduleHandler())

This task a part of #2001206: Replace drupal_container() with Drupal::service()

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kgoel’s picture

Assigned: Unassigned » kgoel
kgoel’s picture

Status: Active » Needs review
FileSize
1.86 KB
ddrozdik’s picture

Status: Needs review » Needs work

We should use \Drupal::request() instead \Drupal::service('request').

kgoel’s picture

Status: Needs work » Needs review
FileSize
1014 bytes
1.86 KB
dcam’s picture

Status: Needs review » Reviewed & tested by the community

#4 looks good. I didn't find any more instances of drupal_container() in the views_ui module.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

ddrozdik’s picture

Status: Fixed » Closed (fixed)