Commit Graph

2567 Commits

Author SHA1 Message Date
Fabien Potencier e5b7c0359d updated CHANGELOG 2015-08-12 17:44:22 +02:00
Tugdual Saunier 22500609b6 Fix the accessibility of Twig_Template::getEnvironment method in the C ext 2015-08-12 17:44:05 +02:00
Christophe Coevoet e000420096 Fix the handling of internal Twig_Template properties in the C ext 2015-08-12 17:44:05 +02:00
Christophe Coevoet a8a125ba9b Forbid access to the Twig environment from template instance
This also forbids access to other internal parts of the Twig_Template.
2015-08-12 17:44:05 +02:00
Fabien Potencier 30be07759a fixed sandbox security issue 2015-08-12 17:44:05 +02:00
Christophe Coevoet 7b6c0e971f Prevent importing or calling reserved macro names
This also fixes the logic detecting reserved macro names to account for
the fact that they are compiled prefixed with get() since a very long
time and the logic preventing conflicts was broken.
2015-08-12 17:44:05 +02:00
Fabien Potencier cfb0593028 feature #1757 deprecated Twig_Template::getEnvironment() (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

deprecated Twig_Template::getEnvironment()

Commits
-------

c9501b8 deprecated Twig_Template::getEnvironment()
2015-08-12 16:50:28 +02:00
Fabien Potencier c9501b80a1 deprecated Twig_Template::getEnvironment() 2015-08-12 16:49:10 +02:00
Fabien Potencier 1eb5fb26ef feature #1754 deprecated _self (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

deprecated _self

It never makes sense to use the `_self` variable in a template except for the special `from` and `import` usage. So, I propose to deprecate it in 2.x and remove the unexcepted possible usages in 3.0.

Commits
-------

5514c8e deprecated _self
2015-08-12 11:10:10 +02:00
Fabien Potencier 5514c8ee80 deprecated _self 2015-08-12 11:08:46 +02:00
Fabien Potencier 61d45b3e24 feature #1753 added a base node visitor to make compat between 1.x and 2.x possible (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

added a base node visitor to make compat between 1.x and 2.x possible

As suggested in #1644, that allows better compat between 1.x and 2.x

Commits
-------

881fb63 added a base node visitor to make compat between 1.x and 2.x possible
3f521d4 bumped to 1.20
2015-08-11 15:57:52 +02:00
Fabien Potencier 881fb63bf7 added a base node visitor to make compat between 1.x and 2.x possible 2015-08-11 15:38:01 +02:00
Fabien Potencier 3f521d483f bumped to 1.20 2015-08-11 15:22:12 +02:00
Fabien Potencier e375c9c562 added a mention of projects using Twig 2015-08-04 16:19:10 +02:00
Fabien Potencier 617eaa0009 bumped version to 1.19.1-DEV 2015-07-31 15:50:08 +02:00
Fabien Potencier edbeaf43b0 prepared the 1.19.0 release v1.19.0 2015-07-31 15:45:26 +02:00
Fabien Potencier b18bcfb390 updated CHANGELOG 2015-07-31 15:35:58 +02:00
Fabien Potencier b1385c056d bug #1746 Fixed error guessing in blocks in a child template (hason)
This PR was merged into the 1.x branch.

Discussion
----------

Fixed error guessing in blocks in a child template

Commits
-------

cfa1404 Fixed error guessing in blocks in a child template
2015-07-31 15:33:46 +02:00
Martin Hasoň cfa14046ab Fixed error guessing in blocks in a child template 2015-07-31 14:43:10 +02:00
Fabien Potencier 1ded65daeb fixed CS 2015-07-05 10:50:23 +02:00
Fabien Potencier 0828c0345a tweaked docs 2015-07-05 10:48:49 +02:00
Fabien Potencier e007c178ec feature #1699 Added variadic filters, tests, and functions (hason)
This PR was merged into the 1.x branch.

Discussion
----------

Added variadic filters, tests, and functions

Replaces #1317

```php
$env->addFunction(new Twig_SimpleFunction('foo', function ($a1, array $args = array()) {
}, array('is_variadic' => true));
```
```jinja
{{ foo(1, 2, a="a", b="b") }}
{# foo(1, array(0 => 2, "a" => "a", "b" => "b")); #}
```

Commits
-------

c78656a Added variadic filters, tests, and functions
2015-07-05 10:27:16 +02:00
Fabien Potencier 056bb5dade fixed CS 2015-07-05 10:26:11 +02:00
Fabien Potencier ea2648768e bumped version to 1.19 2015-07-05 10:14:03 +02:00
Fabien Potencier 5020747987 feature #1659 Added support for unconsumed macro arguments (hason)
This PR was merged into the 1.x branch.

Discussion
----------

Added support for unconsumed macro arguments

Fixes #1159 and supplements #1699

Commits
-------

7f00cb9 Added support for unconsumed macro arguments
2015-07-05 10:12:21 +02:00
Fabien Potencier 82636dc93d fixed PHP 5.2 compat 2015-07-03 12:11:52 +02:00
Fabien Potencier 641090378d tweaked previous merge 2015-07-03 11:46:19 +02:00
Fabien Potencier 35790250b8 bug #1666 add ignore_missing agrument to source function (vetruvet)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #1666).

Discussion
----------

add ignore_missing agrument to source function

This basically works the same way as `ignore_missing` on the `include` function/tag.

Commits
-------

afa9358 add ignore_missing agrument to source function
2015-07-03 11:44:24 +02:00
Valeriy Trubachev afa93586bc add ignore_missing agrument to source function 2015-07-03 11:44:24 +02:00
Fabien Potencier 793ea7e37d updated CHANGELOG 2015-07-03 11:41:40 +02:00
Fabien Potencier 849adeb85e fixed edge case where tests would fail because of a cache issue 2015-07-03 11:33:17 +02:00
Fabien Potencier d472fcc9bd tweaked docs to avoid using an internal method in an example 2015-07-03 11:30:18 +02:00
Fabien Potencier 61eb80b089 deprecated Twig_Environment::clearTemplateCache() 2015-07-03 11:29:18 +02:00
Fabien Potencier 1255e360e7 bug #1725 fixed sandbox disabling when using the include function (fabpot)
This PR was merged into the 1.x branch.

Discussion
----------

fixed sandbox disabling when using the include function

closes #1668

Commits
-------

af72894 fixed sandbox disabling when using the include function
2015-07-03 11:20:29 +02:00
Fabien Potencier af728947d6 fixed sandbox disabling when using the include function 2015-07-03 09:28:58 +02:00
Fabien Potencier 90026f3f99 minor #1720 Example about how to rename several blocks (pyguerder)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #1720).

Discussion
----------

Example about how to rename several blocks

It was unclear to me how to rename more than 1 imported block. I had to look into the source code to find that, so I add it to the documentation.

Commits
-------

8af1355 Example about how to rename several blocks
2015-07-03 09:00:14 +02:00
Pierre-Yves Guerder 8af1355e43 Example about how to rename several blocks
It was unclear to me how to rename more than 1 imported block. I had to look into the source code to find that, so I add it to the documentation.
2015-07-03 09:00:13 +02:00
Fabien Potencier 7823014351 fixed docs 2015-07-03 08:59:01 +02:00
Fabien Potencier 1ee34b4bd5 minor #1723 Update batch filter docs with arguments (alexeymalihin)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #1723).

Discussion
----------

Update batch filter docs with arguments

Changes based on https://github.com/twigphp/Twig/blob/1.x/test/Twig/Tests/Fixtures/filters/batch_float.test

Commits
-------

b66821e Update batch filter docs with arguments
2015-07-03 08:57:29 +02:00
Alexey Malihin b66821e861 Update batch filter docs with arguments 2015-07-03 08:57:29 +02:00
Fabien Potencier b0c41d42c4 fixed CS 2015-07-03 08:47:09 +02:00
Fabien Potencier d00943bb56 bug #1724 fix batch filter with zero items (Tobion)
This PR was merged into the 1.x branch.

Discussion
----------

fix batch filter with zero items

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

also added a test for preserving keys behavior

Commits
-------

8d6be28 fix batch filter with zero items
2015-07-03 08:37:27 +02:00
Tobias Schultze 8d6be28430 fix batch filter with zero items
also added a test for preserving keys behavior
2015-07-02 23:47:18 +02:00
Fabien Potencier ae448f3ae2 bug #1722 Fix PHP_FE_END value (remicollet)
This PR was merged into the 1.x branch.

Discussion
----------

Fix PHP_FE_END value

See explanation on rev c41d305

Commits
-------

a1eee07 Fix PHP_FE_END value
2015-07-01 16:40:16 +02:00
Remi Collet a1eee074e8 Fix PHP_FE_END value
See explanation on rev c41d305
2015-07-01 12:05:34 +02:00
Fabien Potencier 12bf70d9ad fixed CS 2015-06-24 18:24:09 +02:00
Fabien Potencier e22fb8728b bumped version to 1.18.3-DEV 2015-06-07 01:35:59 +02:00
Fabien Potencier e8e6575abf prepared the 1.18.2 release v1.18.2 2015-06-07 01:31:24 +02:00
Fabien Potencier 3e3aa8e26d updated CHANGELOG 2015-06-07 01:28:33 +02:00
Fabien Potencier b560a2c14f reverted unexpected change 2015-06-07 01:26:25 +02:00