This PR was merged into the 1.x branch.
Discussion
----------
Fix the deprecation warning for functions and tests
Otherwise, when a function does not define any filter, the message looks like that:
```
Using an instance of "Twig_Environment" for function "nelmio_js_logger" is deprecated. Use Twig_SimpleFunction instead.
```
This happens because the notice about the undefined variable gets silenced too, and ``get_class(null)`` returns the current class.
Commits
-------
1687097 Fix the deprecation warning for functions and tests
This PR was merged into the 1.x branch.
Discussion
----------
Deprecation notices
Added a way to warn our users of deprecation features. This framework can be used for core features, but also for functions/tests/filters created by third-party. I haven't added something for tags as it can be done easily in the token parser class.
Fixes#1756 and #1767
Commits
-------
56c7382 added Twig_Util_DeprecationCollector to collect deprecation notices for a set of templates
2da6bae tweaked some deprecation messages
cc98028 added deprecation notices for deprecated classes
c6ab7de optimized legacy tests management
eebfdc7 added a way to manage legacy tests in fixtures
8c4291a removed usage of deprecated features, marked some tests as being legacy
b5db9dc added the Symfony PHPUnit bridge to better manage deprecation notices
23c3922 added deprecated notices for deprecated features
bd87ba8 added some documentation about deprecation notices
d16b7bf added a way to trigger deprecation notices for filters and functions
21f536b added deprecation for the raw tag
efcfe8e added deprecation notices for deprecated tests
65e70a2 fixed CS
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
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
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
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
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
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.
This PR was merged into the 1.x branch.
Discussion
----------
deprecated Twig_Template::getEnvironment()
Commits
-------
c9501b8 deprecated Twig_Template::getEnvironment()
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
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