chcę wstrzykiwać moje tłumaczenia ciąg do służby, więc użyłem tego w definicji usługi:Symfony: LoggingTranslator vs Tłumacz
arguments: [@doctrine.orm.entity_manager, @translator]
Kiedyś to w konstruktorze:
public function __construct(\Doctrine\ORM\EntityManager $entityManager, \Symfony\Component\Translation\Translator $translator)
Ale Otrzymuję ten błąd:
.... __construct() must be an instance of Symfony\Component\Translation\Translator, instance of Symfony\Component\Translation\LoggingTranslator given...
Jaka jest różnica między tymi dwoma?
Proszę rozważyć ten [dokumentacja] (http://symfony.com/blog/new-in-symfony-2-6-ulepszenia-do-tłumaczenia-komponentu) – falinsky
spróbuj wstrzyknąć tę usługę: 'translator.default' – Matteo
Dzięki. translator.default działa :) – b85411