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 locale 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())
Comment | File | Size | Author |
---|---|---|---|
#12 | 2011102-replace-drupal_container-locale-module-12.patch | 5.75 KB | ddrozdik |
#10 | 2011102-replace-drupal_container-locale-module.patch | 6.36 KB | ddrozdik |
#6 | locale-2011102-6.patch | 2.9 KB | kgoel |
#6 | interdiff.txt | 2.9 KB | kgoel |
#4 | locale-2011102-4.patch | 2.98 KB | kgoel |
Comments
Comment #1
kgoel CreditAttribution: kgoel commentedComment #2
kgoel CreditAttribution: kgoel commentedComment #4
kgoel CreditAttribution: kgoel commentedComment #6
kgoel CreditAttribution: kgoel commentedComment #8
kgoel CreditAttribution: kgoel commented#6: locale-2011102-6.patch queued for re-testing.
Comment #9
ddrozdik CreditAttribution: ddrozdik commentedLast patch is incorrect because we should use $this->container->get() in tests instead \Drupal::service().
And also in this file core/modules/locale/lib/Drupal/locale/Locale.php has been already replaced drupal_container().
Comment #10
ddrozdik CreditAttribution: ddrozdik commentedComment #11
dcam CreditAttribution: dcam commented#10 does not apply locally.
Comment #12
ddrozdik CreditAttribution: ddrozdik commentedComment #13
dcam CreditAttribution: dcam commented#12 looks good. The patch converts all uses of drupal_container() in the locale module.
Comment #14
webchickCommitted and pushed to 8.x. Thanks!
Comment #15
ddrozdik CreditAttribution: ddrozdik commented