Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 648 Bytes

UPGRADE-2.8.md

File metadata and controls

24 lines (18 loc) · 648 Bytes

UPGRADE FROM 2.7 to 2.8

Translator

  • The getMessages() method of the Symfony\Component\Translation\Translator was deprecated and will be removed in Symfony 3.0. You should use the getCatalogue() method of the Symfony\Component\Translation\TranslatorBagInterface.

    Before:

    $messages = $translator->getMessages();

    After:

     $catalogue = $translator->getCatalogue($locale);
     $messages = $catalogue->all();
    
     while ($catalogue = $catalogue->getFallbackCatalogue()) {
         $messages = array_replace_recursive($catalogue->all(), $messages);
     }