This PR was submitted for the 3.x branch but it was merged into the 2.x branch instead.
Discussion
----------
Rename variables used in map method
As most people (including me) are lazy people to read text and mostly looks just at the code. Using `key` and `value` as variable make the map faster to understand which argument is which one :)
Commits
-------
b74cf2ae Rename variables used in map method
This PR was submitted for the 3.x branch but it was squashed and merged into the 2.x branch instead.
Discussion
----------
The deprecated null value for the method round has been changed to zero.
Commits
-------
7d0e5d6a The deprecated null value for the method round has been changed to zero.
This PR was merged into the 3.x branch.
Discussion
----------
[extra-bundle] add integration tests
Should hopefully prevent a repeat of the #3559 fiasco ;)
I chose to just add integration tests for markdown (and registering custom extensions). The others are pretty straight forward but can add tests for these if desired.
Commits
-------
5c63486a [extra-bundle] add integration tests
This PR was merged into the 3.x branch.
Discussion
----------
Fix Commonmark factory definition
_Really_ fixes#3620.
I had an invalid service factory definition.
Commits
-------
23f77bfb fix Commonmark factory definition
This PR was merged into the 2.x branch.
Discussion
----------
Allow null for `nl2br`
Same as https://github.com/twigphp/Twig/pull/3617
Fixes `Passing null to parameter #1 ($string) of type string is deprecated` on PHP 8.1
Commits
-------
e9cd55de Allow null for nl2br, striptags and format filters
This PR was merged into the 3.x branch.
Discussion
----------
[twig-extra-bundle] only use Commonmark extensions if markdown enabled
The feature introduced by #3559 should only be enabled if `markdown-extra` is enabled/available.
Fixes#3620.
Commits
-------
ed106096 [bug] only use Commonmark extensions if markdown enabled
This PR was merged into the 2.x branch.
Discussion
----------
Re-add compat with PHP 7.1
Closes#3613
Commits
-------
7389f48a Add compat with PHP 7.1 back
This PR was merged into the 2.x branch.
Discussion
----------
Allow null when Twig expects a string
To ease the transition to PHP 8.1, Twig now explicitly accepts `null` in addition to strings in filters that expect strings.
Closes#3615Closes#3557Closes#3610Closes#3609
Commits
-------
92bc110b Allow null when Twig expects a string
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Allow CommonMark extensions to easily be added
1. I discovered that commonmark 2 works just fine with `markdown-extra` so I added to the `require-dev` of `markdown-extra`'s `composer.json`
2. Added `LeagueMarkdownFactory` to `markdown-extra` as discussed in #3558
3. In `twig-extra-bundle`, if commonmark (and the above factory) is available, wire up the factory with extensions added via the `twig.markdown.league_extension` DI tag
If this PR would be acceptable, I can add some tests.
(closes#3558)
Commits
-------
4b86f5ef Allow CommonMark extensions to easily be added
This PR was merged into the 3.x branch.
Discussion
----------
Implement template annotation for `getExtension`
Hello there 🙂👋
my first PR here 😉
This change would help to improve static analysis with tools like PHPStan and Psalm.
Commits
-------
110871d1 Implement template annotation for `getExtension` and `getRuntime`
This PR was merged into the 2.x branch.
Discussion
----------
Allow symfony/translation-contracts:^3
However,
I am just wondering why this dependency is required since it's not used anywhere in `twig/string-extra`? Or I am wrong ?
Closing https://github.com/twigphp/Twig/issues/3607
Commits
-------
0c1e4edc allow translation-contracts:^3