Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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()
Comment | File | Size | Author |
---|---|---|---|
#4 | views-ui-2014049-4.patch | 1.86 KB | kgoel |
#4 | interdiff.txt | 1014 bytes | kgoel |
#2 | views-ui-2014049-2.patch | 1.86 KB | kgoel |
Comments
Comment #1
kgoel CreditAttribution: kgoel commentedComment #2
kgoel CreditAttribution: kgoel commentedComment #3
ddrozdik CreditAttribution: ddrozdik commentedWe should use \Drupal::request() instead \Drupal::service('request').
Comment #4
kgoel CreditAttribution: kgoel commentedComment #5
dcam CreditAttribution: dcam commented#4 looks good. I didn't find any more instances of drupal_container() in the views_ui module.
Comment #6
webchickCommitted and pushed to 8.x. Thanks!
Comment #7
ddrozdik CreditAttribution: ddrozdik commented