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())

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
2.98 KB

Status: Needs review » Needs work

The last submitted patch, locale-2011102-2.patch, failed testing.

kgoel’s picture

Status: Needs work » Needs review
FileSize
2.98 KB

Status: Needs review » Needs work

The last submitted patch, locale-2011102-4.patch, failed testing.

kgoel’s picture

Status: Needs work » Needs review
FileSize
2.9 KB
2.9 KB

Status: Needs review » Needs work
Issue tags: -Novice

The last submitted patch, locale-2011102-6.patch, failed testing.

kgoel’s picture

Status: Needs work » Needs review
Issue tags: +Novice

#6: locale-2011102-6.patch queued for re-testing.

ddrozdik’s picture

Assigned: kgoel » ddrozdik

Last 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().

ddrozdik’s picture

dcam’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

#10 does not apply locally.

ddrozdik’s picture

Status: Needs work » Needs review
FileSize
5.75 KB
dcam’s picture

Status: Needs review » Reviewed & tested by the community

#12 looks good. The patch converts all uses of drupal_container() in the locale 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)