Skip to content
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

Consider renaming Twig filters into something more appropriate #3298

Closed
Chi-teck opened this issue Mar 20, 2020 · 2 comments
Closed

Consider renaming Twig filters into something more appropriate #3298

Chi-teck opened this issue Mar 20, 2020 · 2 comments

Comments

@Chi-teck
Copy link

I think "filter" term is misused. A filter is something that filters out incoming input but Twig filters are more than that. They may change the incoming data and even create new data. I suppose they are more like converters or transformers.

@fabpot
Copy link
Contributor

fabpot commented Mar 22, 2020

A filter should not change the input and should never create new data.
In any case, we won't change the name now as it would be a major BC break.
The term filter is also used in many other Twig-like templating system in other languages,

@fabpot fabpot closed this as completed Mar 22, 2020
@Chi-teck
Copy link
Author

A filter should not change the input

Well, most of core Twig filters do change the input. Technically filters like html_to_markdown are converters not filters. And filters like default do create new data.
Anyway I agree changing the name without BC break would be really hard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants