Skip to content

[TwigBundle] Fix Twig cache is not properly warmed #16262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2015

Conversation

tucksaun
Copy link
Contributor

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

Alternative to #15034

@@ -34,7 +34,7 @@ class TemplateCacheCacheWarmer implements CacheWarmerInterface
* @param ContainerInterface $container The dependency injection container
* @param TemplateFinderInterface $finder The template paths cache warmer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|null and please add explanation why null it allowed

@Tobion
Copy link
Contributor

Tobion commented Oct 16, 2015

What I don't get is why are templates not beeing warmed if the templating component is not used? I mean we have the goal to use twig without templating, but the warmup should still compile all templates ideally, or not?

@tucksaun tucksaun force-pushed the fix-twig-cache-warmer-bis branch from 1aa9788 to e704ee4 Compare October 17, 2015 13:10
@fabpot
Copy link
Member

fabpot commented Oct 17, 2015

👍

@fabpot
Copy link
Member

fabpot commented Oct 17, 2015

@Tobion That's not the purpose of this PR but to answer your question: simply because nobody ever implemented it. In the past, it was not really needed as the templating component was mandatory. Now that it's not anymore, we need another cache warmer (I will submit a PR this week-end to fill the gap).

@Tobion
Copy link
Contributor

Tobion commented Oct 17, 2015

👍

@fabpot
Copy link
Member

fabpot commented Oct 17, 2015

Thank you @tucksaun.

@fabpot fabpot merged commit e704ee4 into symfony:2.7 Oct 17, 2015
fabpot added a commit that referenced this pull request Oct 17, 2015
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBundle] Fix Twig cache is not properly warmed

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

Alternative to #15034

Commits
-------

e704ee4 [TwigBundle] Fix Twig cache is not properly warmed
fabpot added a commit that referenced this pull request Oct 19, 2015
…ting is disabled (fabpot)

This PR was merged into the 2.8 branch.

Discussion
----------

[TwigBundle] added a Twig templates warmer when templating is disabled

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

When disabling the templating component, Twig templates are not warmed up as the warmer depends on the template finder which needs the templating component. This PR adds a new cache warmer that covers this case.

see #16262

Commits
-------

bd3701b [TwigBundle] added a Twig templates warmer when templating is disabled
@tucksaun tucksaun deleted the fix-twig-cache-warmer-bis branch October 25, 2015 16:34
@fabpot fabpot mentioned this pull request Oct 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants