[TwigBundle] Document twig.safe_class resource tag#22319
Open
lacatoire wants to merge 2 commits intosymfony:8.1from
Open
[TwigBundle] Document twig.safe_class resource tag#22319lacatoire wants to merge 2 commits intosymfony:8.1from
lacatoire wants to merge 2 commits intosymfony:8.1from
Conversation
1b1fe97 to
bb70f6c
Compare
Member
|
Thanks for this contribution! 🙏 Unfortunately, this feature isn't available yet: it depends on twigphp/Twig#4795, which is still pending. This PR should be put on hold until the Twig PR is merged. Once it is, the documentation will also need to specify the minimum required Twig version. |
GromNaN
reviewed
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the new 8.1
twig.safe_classresource tag from symfony/symfony#63929: bundles can now mark a class as safe for Twig's escaper (per strategy:html,js,css, etc.) without decorating the environment configurator. Adds the entry toreference/dic_tags.rst, an anchor on the existing "Tagging Non-Service Classes" section inservice_container/tags.rst, and a cross-reference tip in thetemplates.rstoutput-escaping section.Fixes #22307