-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TwigBundle] Use kernel.build_dir
to store the templates known at build time
#54384
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
fb68b3c
to
0bc3774
Compare
0bc3774
to
c5b4ab0
Compare
src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php
Outdated
Show resolved
Hide resolved
c5b4ab0
to
95b994c
Compare
src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php
Outdated
Show resolved
Hide resolved
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.
Very good idea.
src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php
Outdated
Show resolved
Hide resolved
0dbdd9b
to
40e485c
Compare
shouldn't this dual cache setup be disabled when autoReload is enabled ? Otherwise, any template cached in the readonly cache won't be reloaded (as the cache never writes the new content) which will break the DX |
I don't think it needs to. Looking at the |
40e485c
to
4289c16
Compare
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.
I tested it on a project and got some functional feedback.
src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheWarmer.php
Outdated
Show resolved
Hide resolved
1a38f61
to
a0bbca5
Compare
Tests are failing.
|
…uild time Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
a0bbca5
to
0f841d2
Compare
Fixed, I didn't realise the tests were using a smaller kernel. |
@GromNaN @fabpot @nicolas-grekas @OskarStark Could we still get this merged in 7.3 ? |
Thank you @Okhoshi. |
…ache config (Okhoshi) This PR was merged into the 7.3 branch. Discussion ---------- [Twig] [TwigBundle] Describe the new behaviour of twig.cache config Update the description of the `twig.cache` config to follow the changes implemented in symfony/symfony#54384. Fixes #20948 cc `@alexandre`-daubois Commits ------- 8c5f22b [TwigBundle] Describe the new behaviour of twig.cache config
Follow up to #50391, set up the Twig
TemplateCacheWarmer
to use thekernel.build_dir
instead ofkernel.cache_dir
. A new argument is added to its constructor to specify the directory to use for the cache.