Follow-up of #1937600: Determine what services to register in the new Drupal class

I guess this one would be useful to have as well?

Look for drupal_container()->get('transliteration') or Drupal::service('transliteration') and replace with Drupal::transliteration() (needs to be added, with \ prepended if it's in classes).

Once done, the change notice at http://drupal.org/node/1842748 should be updated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ParisLiakos’s picture

havent grepped but i think there is no usage yet, since we have #1842718: Use new Transliteration functionality in core for machine names

ParisLiakos’s picture

Status: Active » Needs review
FileSize
679 bytes
$ grep -r "('transliteration')" core/
core/modules/system/lib/Drupal/system/Tests/Transliteration/TransliterationTest.php:    $transliterator_service = $this->container->get('transliteration');
core/modules/system/language.api.php: * $trans = drupal_container()->get('transliteration');

actually only one usage..and in a comment:) piece of cake!

Berdir’s picture

Status: Needs review » Needs work

Drupal::transliteration() doesn't exist yet :)

ParisLiakos’s picture

/me facepalms

ParisLiakos’s picture

Title: Replace calls to transliteration service with Drupal::transliteration() » Add Drupal::transliteration() and replace calls to transliteration service with Drupal::transliteration()

thats better

ParisLiakos’s picture

Title: Add Drupal::transliteration() and replace calls to transliteration service with Drupal::transliteration() » Add Drupal::transliteration() and replace calls to transliteration service with it

erm

mtift’s picture

So like this?

Berdir’s picture

Status: Needs work » Needs review

Yes.

Status: Needs review » Needs work

The last submitted patch, drupal-transliteration_service-1961542-7.patch, failed testing.

mtift’s picture

Status: Needs work » Needs review
FileSize
1.98 KB

Let's try that again.

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, didn't find any other places that need to be changed.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.