Commit Graph

5306 Commits

Author SHA1 Message Date
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
Nicolas Grekas 8f0f071681 minor #3338 Minor fixes (nicolas-grekas)
This PR was merged into the 1.x branch.

Discussion
----------

Minor fixes

Commits
-------

5dc36446 Minor fixes
2020-05-21 11:11:52 +02:00
Nicolas Grekas 5dc364469b Minor fixes 2020-05-21 11:01:36 +02:00
Fabien Potencier 8d81259b9c Fix Travis config 2020-05-21 08:35:19 +02:00
Fabien Potencier 090a7d86a7 Merge branch '2.x' into 3.x
* 2.x:
  Fix extra package deps
2020-05-21 08:01:55 +02:00
Fabien Potencier 74f3ffe4b6 Fix extra package deps 2020-05-21 08:01:43 +02:00
Fabien Potencier 4a83b339dd Fix tests 2020-05-21 07:43:29 +02:00
Fabien Potencier 70dc998309 Merge branch '2.x' into 3.x
* 2.x:
  Tweak PHP constraint
  Remove boilerplate to run tests on PHP 8
2020-05-21 07:43:16 +02:00
Fabien Potencier 997dc9c192 Merge branch '1.x' into 2.x
* 1.x:
  Tweak PHP constraint
  Remove boilerplate to run tests on PHP 8
2020-05-21 07:38:18 +02:00
Fabien Potencier f59c2596ad Tweak PHP constraint 2020-05-21 07:36:43 +02:00
Fabien Potencier 9b710b9cf0 minor #3336 Remove boilerplate to run tests on PHP 8 (nicolas-grekas)
This PR was merged into the 1.x branch.

Discussion
----------

Remove boilerplate to run tests on PHP 8

Follows https://github.com/symfony/symfony/pull/36882

Commits
-------

dd3defb9 Remove boilerplate to run tests on PHP 8
2020-05-21 07:35:01 +02:00
Nicolas Grekas dd3defb982 Remove boilerplate to run tests on PHP 8 2020-05-20 19:48:43 +02:00
Fabien Potencier d81a7448ec Merge branch '2.x' into 3.x
* 2.x:
  Fix typo
  Fix Travis config
  Fix Travis config
  Remove deprecated option
  Bypass tests for extra packages on PHP 8
  fix constructor argument types
2020-05-19 16:06:04 +02:00
Fabien Potencier 663b8fa832 Fix typo 2020-05-19 16:03:12 +02:00
Fabien Potencier 4c2687b1cf Merge branch '1.x' into 2.x
* 1.x:
  Remove deprecated option
2020-05-19 16:00:56 +02:00
Fabien Potencier 37f953956e minor #3334 Remove deprecated option (dbrumann)
This PR was merged into the 1.x branch.

Discussion
----------

Remove deprecated option

See: https://docs.travis-ci.com/user/reference/overview/#deprecated-virtualization-environments

> If you’re trying to use sudo: false or dist: precise keys in your travis.yml, we recommend you remove them and switch to our current Xenial Linux infrastructure.

Commits
-------

b003d737 Remove deprecated option
2020-05-19 16:00:38 +02:00
Fabien Potencier e0b897ddcf Fix Travis config 2020-05-19 16:00:04 +02:00
Fabien Potencier 43797e76d6 Fix Travis config 2020-05-19 15:43:57 +02:00
Denis Brumann b003d73762 Remove deprecated option
See: https://docs.travis-ci.com/user/reference/overview/#deprecated-virtualization-environments

> If you’re trying to use sudo: false or dist: precise keys in your travis.yml, we recommend you remove them and switch to our current Xenial Linux infrastructure.
2020-05-19 15:40:58 +02:00
Fabien Potencier 1abefdef5a Merge branch '1.x' into 2.x
* 1.x:
  fix constructor argument types
2020-05-19 15:37:24 +02:00
Fabien Potencier aa3f8997d1 bug #3333 fix constructor argument types (xabbuh)
This PR was merged into the 1.x branch.

Discussion
----------

fix constructor argument types

Commits
-------

fcaa9991 fix constructor argument types
2020-05-19 15:35:32 +02:00
Fabien Potencier 90c38edac9 Bypass tests for extra packages on PHP 8 2020-05-19 15:25:58 +02:00
Fabien Potencier d57e50d778 Merge branch '2.x' into 3.x
* 2.x:
  Allow dev versions
  Allow PHP 8 for extra packages
  Fix Travis
  Bump version to 2.13
  Fix integration tests
  Fix PHP 8 compat
  Install the phpunit-bridge with PHP 7.4 when testing nightly
  Add PHP 8 / nightly in Travis matrix
  Drop support for PHP 7.0
2020-05-19 15:23:33 +02:00
Christian Flothmann fcaa9991b1 fix constructor argument types 2020-05-19 15:18:10 +02:00
Fabien Potencier 9270d3e0e0 Allow dev versions 2020-05-19 15:17:30 +02:00
Fabien Potencier 2d58a54b4a Allow PHP 8 for extra packages 2020-05-19 15:12:25 +02:00
Fabien Potencier 655c7a531b Fix Travis 2020-05-19 15:09:00 +02:00
Fabien Potencier 36be0cd585 Bump version to 2.13 2020-05-19 15:07:44 +02:00
Fabien Potencier 2d5e36b759 Merge branch '1.x' into 2.x
* 1.x:
  Fix integration tests
  Fix PHP 8 compat
  Install the phpunit-bridge with PHP 7.4 when testing nightly
  Add PHP 8 / nightly in Travis matrix
  Drop support for PHP 7.0
2020-05-19 15:03:51 +02:00
Fabien Potencier 78348c0cc6 bug #3331 Fix PHP 8.0 compat (fabpot, nicolas-grekas)
This PR was merged into the 1.x branch.

Discussion
----------

Fix PHP 8.0 compat

Commits
-------

8b1f0c7f Fix integration tests
6a0ab744 Fix PHP 8 compat
b952011f Install the phpunit-bridge with PHP 7.4 when testing nightly
914d945e Add PHP 8 / nightly in Travis matrix
2020-05-19 14:57:25 +02:00
Nicolas Grekas 8b1f0c7f7e Fix integration tests 2020-05-19 14:52:37 +02:00
Fabien Potencier 6a0ab744d2 Fix PHP 8 compat 2020-05-19 14:22:31 +02:00
Nicolas Grekas b952011f95 Install the phpunit-bridge with PHP 7.4 when testing nightly 2020-05-19 14:20:19 +02:00
Fabien Potencier 914d945e94 Add PHP 8 / nightly in Travis matrix 2020-05-19 12:39:01 +02:00
Fabien Potencier dbbc1e9d26 minor #3332 Drop support for PHP 7.0 (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Drop support for PHP 7.0

Commits
-------

9810bf55 Drop support for PHP 7.0
2020-05-19 12:24:53 +02:00