-
Notifications
You must be signed in to change notification settings - Fork 7
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
Some of the functions provided here should be filters to respect the Twig semantic #15
Comments
I understand for
However, I was not aware of the possibility to deprecate filters. That's really good news as at least half the functions here have been added a bit carelessly... :s I'm gonna deprecate a bunch of them right now! |
@moufmouf the translation key would be the filtered value, and substitution parameters would be filter parameters. Twig filters are taking parameters. |
Ok, I was not aware that filters could accept parameters (it might be obvious, but there is no sample in the Twig doc: http://twig.sensiolabs.org/doc/advanced.html#filters I'll change the |
One of the examples in the doc is using them: {{ now|date('d/m/Y') }} |
tourl
,toHtml
andt
at least should be filters rather than functions.Note that it is possible to keep the function but deprecate it, to avoid breaking BC.
The text was updated successfully, but these errors were encountered: