-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Replace twig extensions with twig extra bundle #5865
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
Conversation
31f0090
to
3342157
Compare
There is a problem I didn't realised, it looks like the And we are using it in list_html.html.twig and show_html.html.twig. Looking at the symfony issues, I haven't found anything about this, maybe there is another way to specify this in the String Component, I'm going to take a look. |
I removed the double backticks from your changelog, since this is markdown. |
The String component is still experimental. Perhaps it is not too late to try to make the |
Yes, I created this morning an issue in Symfony, let's see how it goes and if not, we can do as you say and copy/create a function for that. |
For the record symfony/symfony#35567 |
It's merged symfony/symfony#35649 but we need symfony 5.1 to use it. Does it mean we have to write a sonata_truncate filter with a comment |
IMO we just need to require symfony/string:^5.1 which is fine, as its standalone usable, isn't it? |
Could you please rebase your PR and fix merge conflicts? |
Closed in favor of #5973 |
Subject
Twig/extensions is deprecated. I have only found that we use
truncate
andtrans
filters.trans
is insymfony/twig-bridge
that we already use and for thetruncate
filter I addedtwig/string-extra
.To make it work we can or define a service with the
StringExtension
or tell the user to define that service (but it would be BC break asu.truncate
won't work without it) or I decided to usetwig/extra-bundle
that will load the extensions used (right now it is only the StringExtension, but we would probably use IntlExtension as well).I am targeting this branch, because this is BC.
Changelog