This PR was submitted for the 1.x branch but it was merged into the 2.0-dev branch instead (closes#1969).
Discussion
----------
add hasser support to getAttribute()
This resolves#1750.
Commits
-------
d3c3c60 add hasser support to getAttribute()
This PR was merged into the 1.x branch.
Discussion
----------
marked some Twig_Environment methods as being internal
This PR marks some `Twig_Environment` methods as being internals:
* `getFunctions()`, `getFilters()`, `getTests()`, `getFunction()`, `getFilter()`, `getTest()`, `getTokenParsers()`, `getTags()`, `getNodeVisitors()`, `getUnaryOperators()`, `getBinaryOperators()` because I don't see how they can be used in any useful way and anyway, `getFunctions()` and `getFilters()` do not return all possible functions or filters. Moreover, I think that all this logic could be refactored and moved into its own class for 2.0 (could be done by deprecating those existing methods in 1.x if we agree to merge this PR).
* `getGlobals()` because it should only be called in a runtime context, not in a compilation one (so limiting its usage to internal use only allows for better control of usage).
* `initGlobals()`, `initExtensions()`, `initExtension()` because they are private in Twig 2.0.
Commits
-------
212730a marked some Twig_Environment methods as being internal
* 1.x:
adding support for the ?? operator
fixed the defined test when used on a constant, a map, or a sequence
updated CHANGELOG
compare charset strictly
This PR was merged into the 1.x branch.
Discussion
----------
fixed the defined test when used on a constant, a map, or a sequence
Commits
-------
62e8ee3 fixed the defined test when used on a constant, a map, or a sequence
This PR was merged into the 1.x branch.
Discussion
----------
Use strict comparison for charset
There is no reason not to use strict comparison here. Also some minor cs fixes.
Commits
-------
4f32737 compare charset strictly
* 1.x:
fixed CHANGELOG
undeprecated _self
Fix Parser context push on stack
bumped version to 1.23.4-DEV
prepared the 1.23.3 release
Fix typo.
bumped version to 1.23.3-DEV
prepared the 1.23.2 release
This PR was merged into the 2.0-dev branch.
Discussion
----------
reintroduced _self (returns the current template name)
fixes#1932, see #1964 fro the 1.x counterpart.
Commits
-------
1015a8f reintroduced _self (returns the current template name)
This PR was merged into the 1.x branch.
Discussion
----------
undeprecated _self
Un-deprecated `_self`. As mentioned in #1932, `_self` is sometimes used to get the current template name, which is a legitimate usage and almost always the user intent. Moreover, when `_self` is used in a template, it is mostly passed to Twig functions that are able to deal with Twig templates or Twig template names indifferently.
fixes#1932
Commits
-------
b490e65 undeprecated _self
This PR was squashed before being merged into the 1.x branch (closes#1930).
Discussion
----------
Fix Parser context push on stack
Hello,
With php7RC8, in Twig_Parser, parse method starts by saving current context in
copying self properties on stack. It sounds like get_object_vars returns now
references instead of copies of properties (at least for arrays). Consequently,
when reinitializing Parser for subparse line 92 to 99, the preserved context on
stack was also erased.
As a result, when calling {{ parent() }} after a {%embed%}{%endembed%}, the restored blockStack being empty, Twig throws a Twig_Error_Syntax('Calling "parent" outside a block is forbidden.'), despite the fact it is really in a block that extends another.
When calling {{ parent() }} before the embed tag, all works properly. (It seems that the empty context, resulting of subparses, is not a problem as far as you don't need to access it)
Commits
-------
07ebdfe Fix Parser context push on stack
* 1.x:
updated CHANGELOG
[DOC] Fixed typos in advanced.rst
Improve deprecations message Add the version in the message
Make file cache tolerant for trailing (back)slashes on directory configuration.
This PR was merged into the 1.x branch.
Discussion
----------
Improve deprecations message
This PR specifies the version in which some ``Twig_SimpleTest`` were deprecated to make it easier to upgrade a package.
Commits
-------
fdb1937 Improve deprecations message Add the version in the message
This PR was merged into the 1.x branch.
Discussion
----------
rtrim cache dir
@see #1951
Commits
-------
c3ec2fb Make file cache tolerant for trailing (back)slashes on directory configuration.
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes#1929).
Discussion
----------
[DOC] Fixed typos in advanced.rst
Hey,
there are two typos of `Interace`. Although it sounds cool, `Interface` works better for copy and paste.
Cheers
Matthais
Commits
-------
57cd302 [DOC] Fixed typos in advanced.rst
This PR was merged into the 2.0-dev branch.
Discussion
----------
Let PHP convert Twig_Markup to JSON instead of pre-filtering it
See http://blog.blackfire.io/blackfire-on-blackfire-twig-and-json.html for the reason to do this.
The bump of the requirement to PHP 5.5+ in Twig 2 makes it possible to rely on ``JsonSerializable``
Commits
-------
8bd96c1 Let PHP convert Twig_Markup to JSON instead of pre-filtering it
This PR was merged into the 1.x branch.
Discussion
----------
Removed usage of deprecated constant
Commits
-------
f19318d Removed usage of deprecated constant
This PR was merged into the 2.0-dev branch.
Discussion
----------
remove php 5.2 compatibility for filesystemhelper
#1945 for 2.x
Commits
-------
4ce9587 remove php 5.2 compatibility for filesystemhelper