The getMessages method of Translator has been removed in 3.0, and depreciated in 2.8, but the docs need to be changed to reflect that. The depreciation gives getCatalogue as a replacement, but they are not equivalent methods, so the example probably will need to be changed as well. Quick link: http://symfony.com/doc/current/components/translation/usage.html#retrieving-the-message-catalogue