Commit Graph

5838 Commits

Author SHA1 Message Date
Fabien Potencier 5981815757 Merge branch '2.x' into 3.x
* 2.x:
  Rename variables used in map method
  The deprecated null value for the method round has been changed to zero.
2022-01-14 12:47:50 +01:00
Fabien Potencier 9984a6ee55 minor #3628 Rename variables used in map method (alexander-schranz)
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
2022-01-14 12:47:31 +01:00
Alexander Schranz b74cf2ae6c Rename variables used in map method 2022-01-14 12:47:28 +01:00
Fabien Potencier e8068a9a6d bug #3626 The deprecated null value for the method round has been changed to zero. (v.arsentev)
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.
2022-01-11 16:12:47 +01:00
v.arsentev 7d0e5d6a1e The deprecated null value for the method round has been changed to zero. 2022-01-11 16:12:44 +01:00
Fabien Potencier 93d26f908c minor #3623 [extra-bundle] add integration tests (kbond)
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
2022-01-04 15:35:09 +01:00
Kevin Bond 5c63486adf [extra-bundle] add integration tests 2022-01-04 08:58:53 -05:00
Fabien Potencier 09c7f7dd9c Bump version 2022-01-03 22:16:33 +01:00
Fabien Potencier 8f168c6ffa Prepare the 3.3.7 release v3.3.7 2022-01-03 22:15:37 +01:00
Fabien Potencier 6624eb5861 Update CHANGELOG 2022-01-03 22:15:19 +01:00
Fabien Potencier 09515635ee Merge branch '2.x' into 3.x
* 2.x:
  Bump version
  Prepare the 2.14.10 release
  Update CHANGELOG
2022-01-03 22:14:43 +01:00
Fabien Potencier 4c225d504f Bump version 2022-01-03 22:14:18 +01:00
Fabien Potencier 95fb194cd4 Prepare the 2.14.10 release v2.14.10 2022-01-03 22:13:26 +01:00
Fabien Potencier 7f04784e82 Update CHANGELOG 2022-01-03 22:12:46 +01:00
Fabien Potencier 44cc03d74c bug #3622 Fix Commonmark factory definition (kbond)
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
2022-01-03 22:11:30 +01:00
Kevin Bond 23f77bfbc5 fix Commonmark factory definition 2022-01-03 16:04:59 -05:00
Fabien Potencier 1231fd4096 Merge branch '2.x' into 3.x
* 2.x:
  Allow null for nl2br, striptags and format filters
2022-01-03 17:03:55 +01:00
Fabien Potencier 9aa38454d5 bug #3619 Allow null for nl2br (ruudk)
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
2022-01-03 17:03:24 +01:00
Fabien Potencier 3cb664cc31 Bump version 2022-01-03 15:28:11 +01:00
Fabien Potencier bb07a77620 Prepare the release v3.3.6 2022-01-03 15:27:01 +01:00
Fabien Potencier 5cb4479aad bug #3621 [twig-extra-bundle] only use Commonmark extensions if markdown enabled (kbond)
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
2022-01-03 15:24:57 +01:00
Kevin Bond ed10609688 [bug] only use Commonmark extensions if markdown enabled 2022-01-03 08:59:31 -05:00
Ruud Kamphuis e9cd55def5 Allow null for nl2br, striptags and format filters
Same as https://github.com/twigphp/Twig/pull/3617
2022-01-03 14:28:28 +01:00
Fabien Potencier e5145f5022 Bump version 2022-01-03 12:38:04 +01:00
Fabien Potencier a0f614a192 Prepare the 3.3.5 release v3.3.5 2022-01-03 12:36:47 +01:00
Fabien Potencier d1fefdcc72 Update CHANGELOG 2022-01-03 12:36:03 +01:00
Fabien Potencier f25e59ecd9 Merge branch '2.x' into 3.x
* 2.x:
  Bump version
  Prepare the 2.14.9 release
  Update CHANGELOG
2022-01-03 12:03:14 +01:00
Fabien Potencier e155d8dcfc Bump version 2022-01-03 12:00:21 +01:00
Fabien Potencier d28b8d7390 Prepare the 2.14.9 release v2.14.9 2022-01-03 11:46:18 +01:00
Fabien Potencier c64d4855b9 Update CHANGELOG 2022-01-03 11:44:33 +01:00
Fabien Potencier e5a146fd8c This reverts commit 7389f48a1f. 2022-01-03 11:41:54 +01:00
Fabien Potencier e3eb9fcc42 Merge branch '2.x' into 3.x
* 2.x:
  Update CHANGELOG
  Add compat with PHP 7.1 back
2022-01-03 11:40:21 +01:00
Fabien Potencier f64f826751 Update CHANGELOG 2022-01-03 11:39:54 +01:00
Fabien Potencier 87ebcb0abb feature #3618 Re-add compat with PHP 7.1 (fabpot)
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
2022-01-03 11:39:12 +01:00
Fabien Potencier 7389f48a1f Add compat with PHP 7.1 back 2022-01-03 11:35:05 +01:00
Fabien Potencier ec23eba2ad Merge branch '2.x' into 3.x
* 2.x:
  Add 8.1 in tests
  Allow null when Twig expects a string
2022-01-02 17:23:10 +01:00
Fabien Potencier 5ff043214f bug #3617 Allow null when Twig expects a string (fabpot)
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 #3615
Closes #3557
Closes #3610
Closes #3609

Commits
-------

92bc110b Allow null when Twig expects a string
2022-01-02 17:21:19 +01:00
Fabien Potencier 3cefebac2b feature #3559 Allow CommonMark extensions to easily be added (kbond)
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
2022-01-02 16:32:49 +01:00
Kevin Bond 4b86f5efdc Allow CommonMark extensions to easily be added 2022-01-02 16:32:46 +01:00
Fabien Potencier 0ffdb3b94d minor #3616 Add 8.1 in tests (fabpot)
This PR was merged into the 2.x branch.

Discussion
----------

Add 8.1 in tests

Commits
-------

3deeb0b2 Add 8.1 in tests
2022-01-02 16:31:31 +01:00
Fabien Potencier ec1e739ef9 minor #3541 Implement template annotation for getExtension (mitelg)
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`
2022-01-02 16:29:57 +01:00
Fabien Potencier 3deeb0b2c0 Add 8.1 in tests 2022-01-02 16:26:34 +01:00
Fabien Potencier 92bc110bcf Allow null when Twig expects a string 2022-01-02 16:05:53 +01:00
Fabien Potencier 5aad8295af Merge branch '2.x' into 3.x
* 2.x:
  Bump license year
  Typo fix : "flexiblity" ➤ "flexibility"
  allow translation-contracts:^3
2022-01-02 11:02:25 +01:00
Fabien Potencier ce97157b43 Bump license year 2022-01-02 11:02:19 +01:00
Fabien Potencier 8b989ebc8a bug #3608 Allow symfony/translation-contracts:^3 (michaljusiega)
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
2021-12-26 18:56:12 +01:00
Fabien Potencier fa678e9244 minor #3611 Typo fix : "flexiblity" ➤ "flexibility" (Levure)
This PR was merged into the 2.x branch.

Discussion
----------

Typo fix : "flexiblity" ➤ "flexibility"

Commits
-------

ca1e79fc Typo fix : "flexiblity" ➤ "flexibility"
2021-12-26 18:49:51 +01:00
Bruno Baguette ca1e79fcec Typo fix : "flexiblity" ➤ "flexibility" 2021-12-26 18:41:09 +01:00
Michał Jusięga 0c1e4edc8b allow translation-contracts:^3 2021-12-22 17:41:26 +01:00
Fabien Potencier dd6c50835d Merge branch '2.x' into 3.x
* 2.x:
  Remove unneeded coments
  Optimize Environment::resolveTemplate() to be much faster when template overrides do not exist
2021-12-17 08:49:53 -08:00