Skip to content

[TwigBundle] Describe the new behaviour of twig.cache config #20951

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

Open
wants to merge 1 commit into
base: 7.3
Choose a base branch
from

Conversation

Okhoshi
Copy link
Contributor

@Okhoshi Okhoshi commented May 10, 2025

Update the description of the twig.cache config to follow the changes implemented in symfony/symfony#54384.

Fixes #20948

cc @alexandre-daubois

Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
@carsonbot carsonbot added this to the 7.3 milestone May 10, 2025
``auto_reload`` option is not enabled and ``%kernel.build_dir`` is configured
to be different than ``%kernel.cache_dir``, the cache is stored in
``%kernel.build_dir%/twig``.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a versionadded directive here, thanks

Comment on lines +85 to +89
Set this option to the path where the cache should be stored. If set to
``true``, the cache is stored in ``%kernel.cache_dir%/twig``. However, if the
``auto_reload`` option is not enabled and ``%kernel.build_dir`` is configured
to be different than ``%kernel.cache_dir``, the cache is stored in
``%kernel.build_dir%/twig``.
Copy link
Member

Choose a reason for hiding this comment

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

I've rewritten this paragraph trying to simplify the wording and logic.
"not enabled" is "disabled"

Suggested change
Set this option to the path where the cache should be stored. If set to
``true``, the cache is stored in ``%kernel.cache_dir%/twig``. However, if the
``auto_reload`` option is not enabled and ``%kernel.build_dir`` is configured
to be different than ``%kernel.cache_dir``, the cache is stored in
``%kernel.build_dir%/twig``.
Specify the path where the cache should be stored. If set to `true`, the cache
defaults to `%kernel.cache_dir%/twig`. However, if the `auto_reload` option is
disabled and `%kernel.build_dir%` is different from `%kernel.cache_dir%`,
the cache will instead be stored in `%kernel.build_dir%/twig`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants