I'm trying turn off translator cache by this way:
app/config/config.yml
services: translator.default: class: %translator.class% arguments: [ @service_container, @translator.selector, {}, { cache_dir: null, debug: %kernel.debug% }, @?session ]
The cached code in cache/dev/appDevDebugProjectContainer.php should be:
protected function getTranslator_DefaultService() { $this->services['translator.default'] = $instance = new \Symfony\Bundle\FrameworkBundle\Translation\Translator($this, new \Symfony\Component\Translation\MessageSelector(), array('translation.loader.php' => 'php', 'translation.loader.yml' => 'yml', 'translation.loader.xliff' => 'xliff'), array('cache_dir' => NULL, 'debug' => true), $this->get('session')); ... resources ... return $instance; }
But i get followed code:
protected function getTranslator_DefaultService() { return $this->services['translator.default'] = new \Symfony\Bundle\FrameworkBundle\Translation\Translator($this, new \Symfony\Component\Translation\MessageSelector(), array('translation.loader.db' => 'db', 'translation.loader.php' => 'php', 'translation.loader.yml' => 'yml', 'translation.loader.xliff' => 'xliff'), array('cache_dir' => NULL, 'debug' => true), $this->get('session')); }
So translator resources is empty.