bug #14301 [FrameworkBundle][Translation] skip warmUp when cache is not used. (aitboudad)

This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][Translation] skip warmUp when cache is not used.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Fixed tickets  | #13942
| Tests pass?   | yes
| License       | MIT

Commits
-------

efb10f6 [FrameworkBundle][Translation] skip warmUp when cache is not used.
This commit is contained in:
Abdellatif Ait boudad 2015-04-27 12:29:25 +01:00
commit f85ba5d74f

View File

@ -77,6 +77,11 @@ class Translator extends BaseTranslator implements WarmableInterface
*/
public function warmUp($cacheDir)
{
// skip warmUp when translator doesn't use cache
if (null === $this->options['cache_dir']) {
return;
}
foreach ($this->resourceLocales as $locale) {
$this->loadCatalogue($locale);
}