Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2e85ef5

Browse filesBrowse 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
Copy full SHA for 2e85ef5

File tree

Expand file treeCollapse file tree

3 files changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+2
-1
lines changed

‎src/Symfony/Bundle/TwigBundle/TemplateIterator.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/TemplateIterator.php
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Tests/Fixtures/templates/Resources/BarBundle/views/base.html.twig
Whitespace-only changes.

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Tests/TemplateIteratorTest.php
+1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.