This PR was merged into the 1.x branch.
Discussion
----------
Fix length filter doc Add some return types
These return types preemptively tell consumers that Twig 4 / PHP 9 might add real return types here.
For `Profile`, we can add the return types right away because the class is `@final`.
Spotted by DebugClassLoader comparing return types of internal PHP base types / magic methods.
Commits
-------
50d032c4 Add some return types
This PR was submitted for the 3.x branch but it was squashed and merged into the 2.x branch instead.
Discussion
----------
Add slug filter (follow-up to PR #3386)
Hi,
This is a follow-up to PR #3386, in which @seb-jean had done most of the work.
I went ahead and implemented the remaining fixes for the pending comments/reviews, and added some documentation on the filter.
Let me know if anything else should be done before this can be merged, and I will get it done ASAP.
Cheers!
Commits
-------
0fd67941 Add slug filter (follow-up to PR #3386)
This PR was merged into the 1.x branch.
Discussion
----------
Adding link to the SymfonyCasts Twig tutorial
Hi!
We have (and have had) for a long time, a really nice Twig screencast on SymfonyCasts with interactive coding challenges so people can play with Twig. I thought a link from Twig's docs might be useful :). I was also thinking a link from https://twig.symfony.com/doc/3.x/ might make sense, but I think this isn't modifiable directly via the docs (but tell me if I'm wrong).
Here's the "look":
<img width="776" alt="Screen Shot 2021-01-13 at 1 07 40 PM" src="https://user-images.githubusercontent.com/121003/104491678-93ef6480-55a0-11eb-9dce-db24c0748267.png">
Thanks!
Commits
-------
500a7da9 Adding link to the SymfonyCasts Twig tutorial
This PR was merged into the 3.x branch.
Discussion
----------
Allow macro calls and definition inside cache tag
Solve #3466
Commits
-------
0bdad6fb Allow macro calls and definition inside cache tag
This PR was merged into the 2.x branch.
Discussion
----------
Fix compat with older Symfony versions
Commits
-------
f4e14292 Fix compat with older Symfony versions
This PR was merged into the 3.x branch.
Discussion
----------
Twig extra bundle now requires twig 3.2
Updated requirements of composer.json in twig/extra/twig-extra-bundle:
Due to the addition of `registerUndefinedTokenParserCallback ` in the file `Twig/extra/twig-extra-bundle/DependencyInjection/Compiler/MissingExtensionSuggestorPass.php`, version 3.2 of twig/twig is also required.
With older versions of twig/twig installed, an error is thrown:
```
Attempted to call an undefined method named "registerUndefinedTokenParserCallback" of class "Twig\Environment".
Did you mean to call e.g. "registerUndefinedFilterCallback" or "registerUndefinedFunctionCallback"?
```
Commits
-------
3dfcaec0 require twig/twig ^3.2
This PR was merged into the 2.x branch.
Discussion
----------
Move Extra Bundle config from XML to PHP
Commits
-------
b9712ce1 Move Extra Bundle config from XML to PHP