Commit Graph

4023 Commits

Author SHA1 Message Date
Fabien Potencier 0fc3341a39 minor #3473 Fix length filter documentation about computation (VincentLanglet)
This PR was merged into the 1.x branch.

Discussion
----------

Fix length filter documentation about computation

According to https://github.com/twigphp/Twig/blob/1.x/src/Extension/CoreExtension.php#L1317

Commits
-------

473f73ef Fix length filter doc
2021-01-15 14:14:47 +01:00
Vincent Langlet 473f73ef2e Fix length filter doc 2021-01-15 12:57:47 +01:00
Fabien Potencier 91e1a3cd56 minor #3472 Adding link to the SymfonyCasts Twig tutorial (weaverryan)
This PR was merged into the 1.x branch.

Discussion
----------

Adding link to the SymfonyCasts Twig tutorial

Hi!

We have (and have had) for a long time, a really nice Twig screencast on SymfonyCasts with interactive coding challenges so people can play with Twig. I thought a link from Twig's docs might be useful :). I was also thinking a link from https://twig.symfony.com/doc/3.x/ might make sense, but I think this isn't modifiable directly via the docs (but tell me if I'm wrong).

Here's the "look":

<img width="776" alt="Screen Shot 2021-01-13 at 1 07 40 PM" src="https://user-images.githubusercontent.com/121003/104491678-93ef6480-55a0-11eb-9dce-db24c0748267.png">

Thanks!

Commits
-------

500a7da9 Adding link to the SymfonyCasts Twig tutorial
2021-01-14 08:57:08 +01:00
Ryan Weaver 500a7da999 Adding link to the SymfonyCasts Twig tutorial 2021-01-13 13:07:49 -05:00
Fabien Potencier 31adc5e157 Bump version to ${NEXT_VERSION}-DEV 2021-01-05 11:10:47 +01:00
Fabien Potencier 138c493c5b Prepare the 1.44.2 release v1.44.2 2021-01-05 11:10:05 +01:00
Fabien Potencier c04c68f2d3 Update CHANGELOG 2021-01-05 11:09:30 +01:00
Fabien Potencier d6cbc70064 Bump copyright year 2020-12-30 09:16:13 +01:00
Fabien Potencier 2f0947e1af Fix typo 2020-11-27 14:05:10 +01:00
Fabien Potencier 0feba1ade4 minor #3442 Typo (OlafvdSpek)
This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.

Discussion
----------

Typo

Commits
-------

43f382ba Typo
2020-11-27 14:04:49 +01:00
Olaf van der Spek 43f382ba1b Typo 2020-11-27 14:04:41 +01:00
Fabien Potencier 311e8ce4ac minor #3432 Enhancement: Use no_explicit_use_of_code_block_php rule (OskarStark)
This PR was merged into the 1.x branch.

Discussion
----------

Enhancement: Use no_explicit_use_of_code_block_php rule

Commits
-------

87eb1396 Enhancement: Use no_explicit_use_of_code_block_php rule
2020-11-05 18:27:08 +01:00
Oskar Stark 87eb1396ba Enhancement: Use no_explicit_use_of_code_block_php rule 2020-11-05 13:36:29 +01:00
Fabien Potencier 22cdd19189 minor #3431 Fix: Highlighting (OskarStark)
This PR was merged into the 1.x branch.

Discussion
----------

Fix: Highlighting

Commits
-------

0df7ddcf Fix: Highlighting
2020-11-05 13:36:13 +01:00
Oskar Stark 0df7ddcf4f Fix: Highlighting 2020-11-05 13:18:52 +01:00
Fabien Potencier 960e3e1fa3 minor #3430 Enhancement: Introduce DOCtor-RST config + Sphinx build + GithubActions (OskarStark)
This PR was squashed before being merged into the 1.x branch.

Discussion
----------

Enhancement: Introduce DOCtor-RST config + Sphinx build + GithubActions

Commits
-------

c9328ad6 Enhancement: Introduce DOCtor-RST config + Sphinx build + GithubActions
2020-11-05 13:09:12 +01:00
Oskar Stark c9328ad613 Enhancement: Introduce DOCtor-RST config + Sphinx build + GithubActions 2020-11-05 13:09:07 +01:00
Fabien Potencier da30f5d939 minor #3429 Enhancement: Use GithubActions instead of Travis for tests (OskarStark)
This PR was merged into the 1.x branch.

Discussion
----------

Enhancement: Use GithubActions instead of Travis for tests

You can see the first run here: https://github.com/OskarStark/Twig/pull/3

Commits
-------

4438d4c1 Enhancement: Use GithubActions instead of Travis for tests
2020-11-05 13:06:13 +01:00
Oskar Stark 4438d4c1bb Enhancement: Use GithubActions instead of Travis for tests 2020-11-05 13:04:03 +01:00
Fabien Potencier 10ebf0c4d3 bug #3425 Fix odd not working for negative numbers (harrybournis)
This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.

Discussion
----------

Fix `odd` not working for negative numbers

Fixes https://github.com/twigphp/Twig/issues/3424

Commits
-------

53a3ccd2 Fix `odd` not working for negative numbers
2020-11-05 11:55:51 +01:00
Harry Bournis 53a3ccd2d2 Fix odd not working for negative numbers 2020-11-05 11:55:45 +01:00
Fabien Potencier cb4cd888ca Bump version to 1.44.2-DEV 2020-10-27 20:23:26 +01:00
Fabien Potencier 04b15d4c0b Prepare the 1.44.1 release v1.44.1 2020-10-27 20:22:48 +01:00
Fabien Potencier 9fb2deee6e bug #3413 Fix "include(template_from_string())" when not using a sandbox (fabpot)
This PR was squashed before being merged into the 1.x branch.

Discussion
----------

Fix "include(template_from_string())" when not using a sandbox

Closed #3411

Commits
-------

df9c9f21 Fix "include(template_from_string())"
3d91e335 Fix PHPUnit config
2020-10-27 15:14:35 +01:00
Fabien Potencier 3078be718c Fix CS 2020-10-27 13:53:45 +01:00
Fabien Potencier df9c9f2165 Fix "include(template_from_string())" 2020-10-27 13:39:31 +01:00
Fabien Potencier 3d91e33522 Fix PHPUnit config 2020-10-27 13:37:42 +01:00
Fabien Potencier 18f9309f35 Bump version to 1.44.1-DEV 2020-10-21 14:33:23 +02:00
Fabien Potencier e7c93a4af5 Prepare the 1.44.0 release v1.44.0 2020-10-21 14:32:35 +02:00
Fabien Potencier b1c9faa33e Fix PHP 8 support 2020-10-21 14:08:16 +02:00
Fabien Potencier d46aeb0724 Fix PHP 8 support 2020-10-21 13:43:26 +02:00
Fabien Potencier 4058579e9b feature #3410 Drop support for PHP 7.1 (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Drop support for PHP 7.1

Commits
-------

83d8e431 Drop support for PHP 7.1
2020-10-21 12:23:09 +02:00
Fabien Potencier 83d8e43136 Drop support for PHP 7.1 2020-10-21 12:11:02 +02:00
Fabien Potencier 4fa38c37f7 Update CHANGELOG 2020-10-21 11:56:12 +02:00
Fabien Potencier 545f399f47 minor #3406 [Documentation] Emphase the fact that the include tag outputs data (nstCactus)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead.

Discussion
----------

[Documentation] Emphase the fact that the include tag outputs data

Commits
-------

ef6debec Emphase the fact that the include tag outputs data
2020-10-07 10:01:49 +02:00
nstCactus ef6debec55 Emphase the fact that the include tag outputs data 2020-10-07 10:01:43 +02:00
Fabien Potencier 437c86db9b Update ChANGELOG 2020-09-27 07:04:55 +02:00
Fabien Potencier b67eb715f2 bug #3401 Fix missing delimiter for preg_quote in lexer (waitxd)
This PR was submitted for the 3.x branch but it was merged into the 1.x branch instead.

Discussion
----------

Fix missing delimiter for preg_quote in lexer

Is is a really edge case (PHP < 7.3 and '#' as whitespace_trim symbol), but for the sake of consistency here's a proper fix.

Commits
-------

41605057 Fix missing delimiter for preg_quote in lexer
2020-09-27 06:58:47 +02:00
wait 41605057a4 Fix missing delimiter for preg_quote in lexer 2020-09-27 06:58:41 +02:00
Fabien Potencier 67eea1843b Backport #3397 2020-09-14 15:17:28 +02:00
Fabien Potencier b22771177c minor #3393 [Doc][Minor]Update block.rst (l-vo)
This PR was merged into the 1.x branch.

Discussion
----------

[Doc][Minor]Update block.rst

Commits
-------

6b9bc9a0 Update block.rst
2020-09-03 17:23:09 +02:00
Laurent VOULLEMIER 6b9bc9a049 Update block.rst 2020-09-03 16:49:52 +02:00
Fabien Potencier 11e429d23d bug #3349 Add test to verify that filter is not working when template_from_string (Bozhidar Hristov, fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

Add test to verify that filter is not working when template_from_string

When using {{ include(sandboxed = true) }} in  conjunction with {{ template_from_string() }} - sandbox is not active.

Commits
-------

c7be1bb3 Fix sandbox support when using include(template_from_string())
04431228 Add test to verify that filter is not working when template_from_string is used.
2020-08-23 17:53:39 +02:00
Fabien Potencier c7be1bb3c4 Fix sandbox support when using include(template_from_string()) 2020-08-23 17:48:34 +02:00
Bozhidar Hristov 04431228af Add test to verify that filter is not working when template_from_string is used. 2020-08-23 17:46:12 +02:00
Fabien Potencier 54eff0d96e bug #3341 In |filter(), |map(), and |reduce(), throw a RuntimeError instead of a TypeError (thijzert)
This PR was squashed before being merged into the 1.x branch.

Discussion
----------

In |filter(), |map(), and |reduce(), throw a RuntimeError instead of a TypeError

If a template accidentally performs `|filter(...)` on a variable that isn't traversable (e.g. `null`), the calling code will encouter the raw `TypeError` that results from Twig trying to construct an `IteratorIterator` on that variable. This means that context information (e.g., in which exact template the error occurred, and on which line) is discarded, which makes it very difficult to debug your templates.

This commit adds code to throw a `RuntimeError` if Twig encounters a situation where there's no valid way to filter an array.

Commits
-------

567b1e2a In |filter(), |map(), and |reduce(), throw a RuntimeError instead of a TypeError
2020-08-23 16:40:19 +02:00
Thijs van Dijk 567b1e2a06 In |filter(), |map(), and |reduce(), throw a RuntimeError instead of a TypeError 2020-08-23 16:40:13 +02:00
Fabien Potencier 80a4a1f31e Remove tests that do not make sense 2020-08-23 14:46:38 +02:00
Fabien Potencier df5d4c3aad Update CHANGELOG 2020-08-23 14:20:00 +02:00
Fabien Potencier d14dab78ce Fix previous merge 2020-08-23 14:19:17 +02:00