This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/UPGRADE-2.8.md
2015-05-06 09:17:03 +00:00

25 lines
648 B
Markdown

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:
```php
$messages = $translator->getMessages();
```
After:
```php
$catalogue = $translator->getCatalogue($locale);
$messages = $catalogue->all();
while ($catalogue = $catalogue->getFallbackCatalogue()) {
$messages = array_replace_recursive($catalogue->all(), $messages);
}
```