-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
d4fded7
to
1aa9788
Compare
@@ -34,7 +34,7 @@ class TemplateCacheCacheWarmer implements CacheWarmerInterface | |||
* @param ContainerInterface $container The dependency injection container | |||
* @param TemplateFinderInterface $finder The template paths cache warmer |
There was a problem hiding this comment.
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
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? |
1aa9788
to
e704ee4
Compare
👍 |
@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). |
👍 |
Thank you @tucksaun. |
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
…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
Alternative to #15034