[Twig] Move AsTwigFilter/AsTwigFunction attribute rules to the Twig composer-based set - #1011
Open
TomasVotruba wants to merge 1 commit into
Open
[Twig] Move AsTwigFilter/AsTwigFunction attribute rules to the Twig composer-based set#1011TomasVotruba wants to merge 1 commit into
TomasVotruba wants to merge 1 commit into
Conversation
…omposer-based set Both rules are bound to twig/twig >=3.21, not to any Symfony package, so they belong to the Twig set. The attribute they add, #[AsTwigFilter] and #[AsTwigFunction], comes from Twig itself; Symfony 7.3 only made it usable in Twig extensions. Rule namespace stays Symfony73 to keep the classes and their tests in place.
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.
GetFiltersToAsTwigFilterAttributeRectorandGetFunctionsToAsTwigFunctionAttributeRectorwere registered in the Symfony composer-based set, while both are bound totwig/twig:The attributes they add come from Twig itself — Symfony 7.3 only made them usable in Twig extensions. A project on Twig 3.21 without
symfony/twig-bundleshould still get the rewrite:So both move to
config/sets/twig/composer-based.php, under a// twig/twig 3.21group. No rule behavior changes — the version bond was already correct, only the set registration was in the wrong file.The rule namespace stays
Symfony73so the classes and their tests stay where they are.