Commit Graph

2587 Commits

Author SHA1 Message Date
Fabien Potencier 23c392212e added deprecated notices for deprecated features 2015-08-18 13:34:46 +02:00
Fabien Potencier bd87ba8ad0 added some documentation about deprecation notices 2015-08-18 13:34:46 +02:00
Fabien Potencier d16b7bf0a7 added a way to trigger deprecation notices for filters and functions 2015-08-18 09:47:53 +02:00
Fabien Potencier 21f536bc0a added deprecation for the raw tag 2015-08-18 09:47:53 +02:00
Fabien Potencier efcfe8e0d7 added deprecation notices for deprecated tests 2015-08-18 09:47:53 +02:00
Fabien Potencier 65e70a2c87 fixed CS 2015-08-17 21:43:54 +02:00
Fabien Potencier 5f253f77a8 minor #1772 Optimize the retrieval of reserved macro names (stof)
This PR was merged into the 1.x branch.

Discussion
----------

Optimize the retrieval of reserved macro names

The list of reserved names does not need to be reset for each template compilation.

Commits
-------

c267257 Optimize the retrieval of reserved macro names
2015-08-17 21:42:30 +02:00
Fabien Potencier 66c32e0974 minor #1770 Remove dead code (stof)
This PR was merged into the 1.x branch.

Discussion
----------

Remove dead code

Array keys cannot be objects in PHP.

Commits
-------

a07ac6a Remove dead code
2015-08-17 21:41:22 +02:00
Christophe Coevoet c267257ccf Optimize the retrieval of reserved macro names
The list of reserved names does not need to be reset for each template
compilation.
2015-08-17 11:47:30 +02:00
Christophe Coevoet a07ac6a0a8 Remove dead code
Array keys cannot be objects in PHP.
2015-08-17 11:33:49 +02:00
Fabien Potencier c27b04c9d6 added the raw tag as being deprecated 2015-08-15 23:53:21 +02:00
Fabien Potencier 39885c9140 replaced obsolete raw tag by verbatim in tests 2015-08-15 23:50:57 +02:00
Fabien Potencier 499d4e7d60 bug #1763 Remove broken code (stof)
This PR was merged into the 1.x branch.

Discussion
----------

Remove broken code

https://github.com/twigphp/Twig/commit/651613c32c315bbeb330b2a6354b34c288e9ea0a#diff-841d1051670799376e88c87114d2caf0 broke the code of ``Twig_Node_Module::compileLoadTemplate`` when passing a non-constant node (it triggers a fatal error)
Trait templates can only be constant expression nodes, so fixing the broken is not actually needed and it can be removed.
Given it is a protected method, I haven't changed the signature to typehint the node as a Twig_Node_Expression_Constant

Commits
-------

e6ae0d0 Remove broken code
2015-08-15 21:53:40 +02:00
Fabien Potencier af129b2f75 fixed typos and CS 2015-08-13 14:50:40 +02:00
Fabien Potencier 5f5d8b0647 minor #1762 [doc/recipes] Added OPcache support (iKwinto)
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes #1762).

Discussion
----------

[doc/recipes] Added OPcache support

OPcache enabled by default cache sinse PHP 5.5.

Commits
-------

1f3fb9a [doc/recipes] Added OPcache support
2015-08-13 14:49:08 +02:00
Alexander Vasilyev 1f3fb9a178 [doc/recipes] Added OPcache support 2015-08-13 14:49:08 +02:00
Christophe Coevoet e6ae0d0caa Remove broken code
Trait templates can only be constant expression nodes, so fixing the
broken is not actually needed and it can be removed.
2015-08-13 10:32:03 +02:00
Fabien Potencier 37553291e6 bumped version to 1.20.1-DEV 2015-08-12 18:01:39 +02:00
Fabien Potencier 1ea4e5f81c prepared the 1.20.0 release v1.20.0 2015-08-12 17:56:39 +02:00
Fabien Potencier 8b5ac1c86b security #1759 Some various changes (fabpot, stof, tucksaun)
This PR was merged into the 1.x branch.

Discussion
----------

Some various changes

Commits
-------

e5b7c03 updated CHANGELOG
2250060 Fix the accessibility of Twig_Template::getEnvironment method in the C ext
e000420 Fix the handling of internal Twig_Template properties in the C ext
a8a125b Forbid access to the Twig environment from template instance
30be077 fixed sandbox security issue
7b6c0e9 Prevent importing or calling reserved macro names
2015-08-12 17:53:26 +02:00
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