8000 bug #28376 [TwigBundle] Fixed caching of templates in src/Resources/<… · symfony/symfony@2e85ef5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2e85ef5

Browse files
committed
bug #28376 [TwigBundle] Fixed caching of templates in src/Resources/<BundleName>/views on cache warmup (yceruto)
This PR was merged into the 2.8 branch. Discussion ---------- [TwigBundle] Fixed caching of templates in src/Resources/<BundleName>/views on cache warmup | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Same as #27764, but in this case the convention is wrong. Corrected according to: https://github.com/symfony/symfony/blob/992a174470fd557e1cddccd3a35447209602aea3/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php#L165 Commits ------- 83a75f4 Caching missed templates on cache warmup
2 parents c9bbc66 + 83a75f4 commit 2e85ef5

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

src/Symfony/Bundle/TwigBundle/TemplateIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function getIterator()
5757
$this->templates = array_merge(
5858
$this->templates,
5959
$this->findTemplatesInDirectory($bundle->getPath().'/Resources/views', $name),
60-
$this->findTemplatesInDirectory($this->rootDir.'/'.$bundle->getName().'/views', $name)
60+
$this->findTemplatesInDirectory($this->rootDir.'/Resources/'.$bundle->getName().'/views', $name)
6161
);
6262
}
6363

src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Resources/BarBundle/views/base.html.twig

Whitespace-only changes.

src/Symfony/Bundle/TwigBundle/Tests/TemplateIteratorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function testGetIterator()
3131
sort($sorted);
3232
$this->assertEquals(
3333
array(
34+
'@Bar/base.html.twig',
3435
'@Bar/index.html.twig',
3536
'@Foo/index.html.twig',
3637
'layout.html.twig',

0 commit comments

Comments
 (0)
0