Commit Graph

5340 Commits

Author SHA1 Message Date
Fabien Potencier 81e0746b95 Merge branch '2.x' into 3.x
* 2.x:
  Restrict callables to closures in filters
  Fix CS
  Update html_to_markdown.rst
2020-07-05 15:32:53 +02:00
Fabien Potencier d190c2e7f7 Merge branch '1.x' into 2.x
* 1.x:
  Restrict callables to closures in filters
2020-07-05 15:32:43 +02:00
Fabien Potencier 471e965e9e bug #3308 Restrict callables to closures in filters (jderusse)
This PR was squashed before being merged into the 1.x branch.

Discussion
----------

Restrict callables to closures in filters

When using filter in sandboxed mode, this PR requires the use of closure.

Commits
-------

d8259519 Restrict callables to closures in filters
2020-07-05 15:30:24 +02:00
Jérémy Derussé d8259519c0 Restrict callables to closures in filters 2020-07-05 15:30:15 +02:00
Fabien Potencier 5e1c4a63be Fix CS 2020-07-05 15:27:01 +02:00
Fabien Potencier 2505176e6d minor #3361 Update html_to_markdown.rst (ThomasLandauer)
This PR was squashed before being merged into the 2.x branch.

Discussion
----------

Update html_to_markdown.rst

Integrating some findings of https://github.com/twigphp/Twig/issues/3357

Commits
-------

4b8e1891 Update html_to_markdown.rst
2020-07-05 15:26:11 +02:00
Thomas Landauer 4b8e1891bd Update html_to_markdown.rst 2020-07-05 15:26:05 +02:00
Fabien Potencier bc91b0e14c bug #3353 [3.x] Fix twig_compare w.r.t. whitespace trimming (guilliamxavier)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

[3.x] Fix twig_compare w.r.t. whitespace trimming

Fixes #3352

Commits
-------

9d115f68 [3.x] Fix twig_compare w.r.t. whitespace trimming
2020-07-05 15:21:59 +02:00
Guilliam Xavier 9d115f6831 [3.x] Fix twig_compare w.r.t. whitespace trimming 2020-07-05 15:21:52 +02:00
Fabien Potencier b0638fa5c1 Bump version to 3.0.5-DEV 2020-07-05 15:19:13 +02:00
Fabien Potencier 582bdbdc17 Prepare the 3.0.4 release v3.0.4 2020-07-05 15:18:14 +02:00
Fabien Potencier 7265866c3f Update CHANGELOG 2020-07-05 15:17:47 +02:00
Fabien Potencier f3d7501533 Merge branch '2.x' into 3.x
* 2.x:
  Bump version to 2.13.0-DEV
  Prepare the 2.13.0 release
  Update CHANGELOG
  Bump version to 1.43.1-DEV
  Prepare the 1.43.0 release
  Update CHANGELOG
2020-07-05 15:10:18 +02:00
Fabien Potencier 92398cbd8d Bump version to 2.13.0-DEV 2020-07-05 15:09:13 +02:00
Fabien Potencier 46a612ba1b Prepare the 2.13.0 release v2.13.0 2020-07-05 15:08:05 +02:00
Fabien Potencier 6c5fbc7806 Update CHANGELOG 2020-07-05 15:07:40 +02:00
Fabien Potencier adc9b89b27 Merge branch '1.x' into 2.x
* 1.x:
  Bump version to 1.43.1-DEV
  Prepare the 1.43.0 release
  Update CHANGELOG
2020-07-05 15:03:06 +02:00
Fabien Potencier 7e08a97e0a Bump version to 1.43.1-DEV 2020-07-05 15:01:55 +02:00
Fabien Potencier 597a03e85a Prepare the 1.43.0 release v1.43.0 2020-07-05 15:00:49 +02:00
Fabien Potencier 71b4ebc929 Update CHANGELOG 2020-07-05 14:59:53 +02:00
Fabien Potencier c5ea009ef5 Merge branch '2.x' into 3.x
* 2.x:
  Add version in the docs for search engine
  Add version in the docs to be more search engine friendly
2020-06-22 17:25:37 +02:00
Fabien Potencier f32950c872 Add version in the docs for search engine 2020-06-22 17:25:21 +02:00
Fabien Potencier 054e4c9e3d Merge branch '1.x' into 2.x
* 1.x:
  Add version in the docs to be more search engine friendly
2020-06-22 17:25:11 +02:00
Fabien Potencier 636215f87c Add version in the docs to be more search engine friendly 2020-06-22 17:24:49 +02:00
Fabien Potencier 19345fcc1d minor #3355 Minimum version fix (pgorod)
This PR was merged into the 3.x branch.

Discussion
----------

Minimum version fix

I just tried this on Composer

Commits
-------

3db903e1 Minimum version fix
2020-06-22 17:24:02 +02:00
Fabien Potencier 0fb982ae1c Merge branch '2.x' into 3.x
* 2.x:
  Bump Drupal version in tests
  Fix Drupal tests
2020-06-22 09:23:21 +02:00
Fabien Potencier 62bd3cd7de Bump Drupal version in tests 2020-06-22 09:23:14 +02:00
Fabien Potencier 49df03b9ce Merge branch '1.x' into 2.x
* 1.x:
  Fix Drupal tests
2020-06-22 09:22:07 +02:00
Fabien Potencier 81aec49572 Fix Drupal tests 2020-06-22 09:21:52 +02:00
Fabien Potencier c83ede7fcd Merge branch '2.x' into 3.x
* 2.x:
  Fix CS
  Fix CS
2020-06-22 08:17:05 +02:00
Fabien Potencier c38f96318b Fix CS 2020-06-22 08:15:56 +02:00
Fabien Potencier c2019904bb Merge branch '1.x' into 2.x
* 1.x:
  Fix CS
2020-06-22 08:13:34 +02:00
Fabien Potencier e99363231b Fix CS 2020-06-22 08:11:03 +02:00
pgorod 3db903e198 Minimum version fix
I just tried this on Composer
2020-06-17 10:37:50 +01:00
Fabien Potencier 83d6a120ff bug #3256 Fix twig_compare float-string trailing whitespace + refactor (guilliamxavier)
This PR was squashed before being merged into the 3.x branch.

Discussion
----------

Fix twig_compare float-string trailing whitespace + refactor

Fixes #3345

Refs #2966 (and #3186)

(feel free to discard the "Factorize" commit if you favor performance over maintainability)

Commits
-------

d6822aeb Fix twig_compare float-string trailing whitespace + refactor
2020-06-08 12:43:20 +02:00
Guilliam Xavier d6822aebcf Fix twig_compare float-string trailing whitespace + refactor 2020-06-08 12:43:14 +02:00
Fabien Potencier 0b19a00138 Merge branch '2.x' into 3.x
* 2.x:
  Fix missing http_build_query function call
  Throw exception in case non-Traversable data is passed to "filter" filter
  Improve batch code example
2020-06-08 12:41:32 +02:00
Fabien Potencier 3beabd64bd Merge branch '1.x' into 2.x
* 1.x:
  Throw exception in case non-Traversable data is passed to "filter" filter
  Improve batch code example
2020-06-08 12:41:25 +02:00
Fabien Potencier 545989ed2b bug #3344 Fix the compilation of Twig comparison operators (stof)
This PR was merged into the 3.x branch.

Discussion
----------

Fix the compilation of Twig comparison operators

The new compilation implemented in Twig 3 for PHP 7 (to match the comparison semantic of PHP 8) was missing the surrounding braces (which are part of the AsbtractBinary compilation). This caused issues when the full expression would involve other operators (like the not operator), as things would then rely on having the correct precedence in PHP (which would not be the case).

Closes #3318

Commits
-------

bf24f136 Fix the compilation of Twig comparison operators
2020-06-05 15:59:44 +02:00
Christophe Coevoet bf24f136b9 Fix the compilation of Twig comparison operators
The new compilation implemented in Twig 3 for PHP 7 (to match the
comparison semantic of PHP 8) was missing the surrounding braces (which
are part of the AsbtractBinary compilation). This caused issues when the
full expression would involve other operators (like the not operator),
as things would then rely on having the correct precedence in PHP (which
would not be the case).
2020-06-05 15:54:17 +02:00
Fabien Potencier 13bb5d5df2 minor #3343 [Documentation] Fix url_encode missing func call (Korbeil)
This PR was merged into the 2.x branch.

Discussion
----------

[Documentation] Fix url_encode missing func call

Hi,

On [`url_encode` documentation](https://twig.symfony.com/doc/3.x/filters/url_encode.html) there is a missing function.

As you can see in https://github.com/twigphp/Twig/blob/3.x/src/Extension/CoreExtension.php#L578-L585, we use `http_build_query` when the input is an array.

This PR adds this missing function call for `2.x` branch (`1.x` is ok, this issue is on `2.x` and `3.x`)

Commits
-------

00dd492b Fix missing http_build_query function call
2020-06-05 14:09:16 +02:00
Baptiste Leduc 00dd492bbc Fix missing http_build_query function call 2020-06-03 18:52:35 +02:00
Fabien Potencier 3daadc5175 bug #3326 Throw exception in case non-Traversable data is passed to "filter" (Lustmored)
This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.

Discussion
----------

Throw exception in case non-Traversable data is passed to "filter"

In PHP 7.4 passing for example null to |filter generates TypeError. I was unsure how to proceed from there as filter could silently fall back to empty result, but instead I went with throwing RuntimeExceptions to be consistent with |batch and |column.

I got confused in structure of tests here, so if that should have some kind of test please push me in the right direction and I'll gladly add it.

Commits
-------

5311963e Throw exception in case non-Traversable data is passed to "filter" filter
2020-05-25 07:16:40 +02:00
Jakub Caban 5311963eb3 Throw exception in case non-Traversable data is passed to "filter" filter 2020-05-25 07:16:34 +02:00
Fabien Potencier fa94cc4934 minor #3340 Improve batch code example (y2keeper)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead.

Discussion
----------

Improve batch code example

The current example uses an array of 7 items, resulting in 3 arrays of 3 items each (with fill).

This can be misinterpreted at a glance as creating n arrays as opposed to arrays with n items.

We should therefore instead use an example array of 4 items resulting in 2 arrays of 3 items each (with fill).

I think this would make the functionality less ambiguous.

Commits
-------

feb93210 Improve batch code example
2020-05-25 07:15:31 +02:00
y2keeper feb9321022 Improve batch code example
The current example uses an array of 7 items, resulting in 3 arrays of 3 items each (with fill). 

This can be misinterpreted at a glance as creating n arrays as opposed to arrays with n items.

We should therefore instead use an example array of 4 items resulting in 2 arrays of 3 items each (with fill). 

I think this would make the functionality less ambiguous.
2020-05-25 07:15:25 +02:00
Nicolas Grekas 3aa40a42b3 Merge branch '2.x' into 3.x
* 2.x:
  Try running all tests on nightly
  Minor fixes
  Fix Travis config
2020-05-21 11:56:39 +02:00
Nicolas Grekas 5c6d495896 minor #3339 Try running all tests on nightly (nicolas-grekas)
This PR was merged into the 2.x branch.

Discussion
----------

Try running all tests on nightly

Commits
-------

4e0008cd Try running all tests on nightly
2020-05-21 11:55:12 +02:00
Nicolas Grekas 4e0008cd82 Try running all tests on nightly 2020-05-21 11:54:27 +02:00
Nicolas Grekas 791f001ae6 Merge branch '1.x' into 2.x
* 1.x:
  Minor fixes
2020-05-21 11:15:20 +02:00