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

Files: 
CommentFileSizeAuthor
#12 2011102-replace-drupal_container-locale-module-12.patch5.75 KBDmitryDrozdik
PASSED: [[SimpleTest]]: [MySQL] 57,699 pass(es).
[ View ]
#10 2011102-replace-drupal_container-locale-module.patch6.36 KBDmitryDrozdik
PASSED: [[SimpleTest]]: [MySQL] 56,486 pass(es).
[ View ]
#6 locale-2011102-6.patch2.9 KBkgoel
PASSED: [[SimpleTest]]: [MySQL] 55,852 pass(es).
[ View ]
#6 interdiff.txt2.9 KBkgoel
#4 locale-2011102-4.patch2.98 KBkgoel
FAILED: [[SimpleTest]]: [MySQL] 54,530 pass(es), 45 fail(s), and 12 exception(s).
[ View ]
#2 locale-2011102-2.patch2.98 KBkgoel
FAILED: [[SimpleTest]]: [MySQL] 54,721 pass(es), 45 fail(s), and 12 exception(s).
[ View ]

Comments

kgoel’s picture

Assigned:Unassigned» kgoel
kgoel’s picture

Status:Active» Needs review
StatusFileSize
new2.98 KB
FAILED: [[SimpleTest]]: [MySQL] 54,721 pass(es), 45 fail(s), and 12 exception(s).
[ View ]

Status:Needs review» Needs work

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

kgoel’s picture

Status:Needs work» Needs review
StatusFileSize
new2.98 KB
FAILED: [[SimpleTest]]: [MySQL] 54,530 pass(es), 45 fail(s), and 12 exception(s).
[ View ]

Status:Needs review» Needs work

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

kgoel’s picture

Status:Needs work» Needs review
StatusFileSize
new2.9 KB
new2.9 KB
PASSED: [[SimpleTest]]: [MySQL] 55,852 pass(es).
[ View ]

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.

DmitryDrozdik’s picture

Assigned:kgoel» DmitryDrozdik

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

DmitryDrozdik’s picture

StatusFileSize
new6.36 KB
PASSED: [[SimpleTest]]: [MySQL] 56,486 pass(es).
[ View ]
dcam’s picture

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

#10 does not apply locally.

DmitryDrozdik’s picture

Status:Needs work» Needs review
StatusFileSize
new5.75 KB
PASSED: [[SimpleTest]]: [MySQL] 57,699 pass(es).
[ View ]
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!

DmitryDrozdik’s picture

Status:Fixed» Closed (fixed)