* 3.x:
Fix tiny typo in CI workflow label
Fix typo
Fix opcache preload warning for unlinked anonymous class
Bump version
Prepare the 3.22.2 release
Add .gitignore & .gitattributes to all .gitattributes
* 3.x:
Simplify enum usage in docs
Forbid adding Nodes to EmptyNode
Add phpstan analysis
Fix the intl-extra tests
Fix the string-extra tests when running with older symfony/string
Fix the exception message to match the expected one for not ready nodes
Add missing import
Add BC break note in CHANGELOG for 3.15
Fix CHANGELOG
Update CHANGELOG
Bump version
Prepare the 3.15.0 release
* 3.x:
Remove obsolete code
Update CHANGELOG
Sandbox ArrayAccess and do sandbox checks before isset() checks
Fix sandbox handling for __toString()
Fix mistake in docs for `keys` filter
Update CHANGELOG
[String] Add SpanishInflector support for singular and plural
Add `find` to `Filters` docs
Remove duplicate test case
Revert "minor #4411 Add return type to getDebugInfo (ruudk)"
Add `$this` return type to Template::unwrap
Add link to TwigQI in docs "You might also be interested in" section
Add return type to compiled macro
* 3.x:
Validate the input of CoreExtension::map()
Rename AbstractTest to ProfilerTestCase
Make data providers static
Prepare IntegrationTestCase for static data providers
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
* 3.x:
Bump version to 3.9.4-DEV
Fix a warning
Use ::class everywhere
Auto-close PRs on subtree-splits
Bump version
Prepare the 3.9.3 release
Update CHANGELOG
Ensure Lexer:: is always initialized
fix: #4033 add missing unwrap call when a TemplateWrapper instance can be present
change extended DI extension class
fix: #4029 when use_yield is true CaptureNode use iterator_to_array preserveKeys argument to false