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:
commit
f85ba5d74f
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user