Caching missed templates on cache warmup

This commit is contained in:
Yonel Ceruto 2018-09-05 20:27:19 -04:00
parent 40fff43ea9
commit 83a75f4313
3 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,7 @@ class TemplateIterator implements \IteratorAggregate
$this->templates = array_merge(
$this->templates,
$this->findTemplatesInDirectory($bundle->getPath().'/Resources/views', $name),
$this->findTemplatesInDirectory($this->rootDir.'/'.$bundle->getName().'/views', $name)
$this->findTemplatesInDirectory($this->rootDir.'/Resources/'.$bundle->getName().'/views', $name)
);
}

View File

@ -31,6 +31,7 @@ class TemplateIteratorTest extends TestCase
sort($sorted);
$this->assertEquals(
array(
'@Bar/base.html.twig',
'@Bar/index.html.twig',
'@Foo/index.html.twig',
'layout.html.twig',