This PR was merged into the 3.x branch.
Discussion
----------
[String] Add singularize and pluralize filter
This PR follows up this one in Symfony https://github.com/symfony/symfony/pull/57245.
It adds 2 new filters `singularize` and `pluralize`. It uses the String component, especially `EnglishInflector` and `FrenchInflector`.
Examples:
```php
{{ 'person'|pluralize('en') }} // persons
{{ 'person'|pluralize('en', false) }} // ['persons', 'people']
{{ 'personne'|pluralize('fr') }} // personnes
{{ 'personne'|pluralize('fr', false) }} // ['personnes']
{{ 'persons'|singluarize('en') }} // person
{{ 'people'|singluarize('en') }} // person
{{ 'persons'|singluarize('en', false) }} // ['person']
{{ 'personnes'|singluarize('fr') }} // personne
{{ 'personnes'|singluarize('fr', false) }} // ['personne']
{{ 'persona'|pluralize('it') }} // \InvalidArgumentException('Language "it" is not supported.')
{{ 'persone'|singluarize('it') }} // \InvalidArgumentException('Language "it" is not supported.')
```
Commits
-------
8c969d40 Tweak code and docs
cb392489 feat(string-extra): Add singularize and pluralize filter
This PR was merged into the 3.x branch.
Discussion
----------
[Doc] Modernize Class name in examples
From "Project_Twig_Extension" to "CustomExtension"
Just a suggestion, feel free to close if you want to keep it like this :)
I found those namings only in "advanced"
Commits
-------
4a8e8ee1 [Doc] Modernize Class name in examples
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
[Doc] Replace http links with https
Commits
-------
ae429bd5 [Doc] Replace http links with https
From "Project_Twig_Extension" to "CustomExtension"
Just a suggestion, feel free to close if you want to keep it like this :)
I found those namings only in "advanced"
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Issue #3828: Add sequence and mapping tests
Add sequence and mapping tests from Jinja.
Commits
-------
c5c95a2d Issue #3828: Add sequence and mapping tests
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Rename hash to mapping and array to sequence
Commits
-------
bc19f2f4 Tweak
c44be99a Rename array to sequence
5157402a Rename hash to mapping
This PR was merged into the 3.x branch.
Discussion
----------
Optimize sprintf() calls for PHP 8.4
Commits
-------
b63bde30 Optimize sprintf() calls for PHP 8.4
This PR was merged into the 3.x branch.
Discussion
----------
Deprecate the second argument of CallExpression::compileArguments
Commits
-------
71d6c82d Deprecate CallExpression::compileArguments
This PR was merged into the 3.x branch.
Discussion
----------
Fix old escaper signature + add docs
Closes#4087Closes#4088
Commits
-------
04b1ad3c Fix old escaper signature + add docs
This PR was merged into the 3.x branch.
Discussion
----------
Fix BC break on escaper extension
Closes#4082
`@tacman` Can you test that this fixes your issue?
Commits
-------
1953f778 Fix BC break on escaper extension
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Fix blocks not available under some circumstancies
Fix#4079
Commits
-------
55ae2149 Add more tests
d30b72c3 Fix blocks not available under some circumstancies