This PR was merged into the 2.x branch.
Discussion
----------
Bump minimum version to PHP 5.6
Twig 2.0 will be released really soon now (hopefully by the end of the year). So, it's time again to reconsider the minimum PHP version we want to support.
I would like to bump it to PHP 5.6 for the following reasons:
* PHP 5.5 is not supported anymore (not even security fixes now);
* the latest Ubuntu LTS is already using PHP 7!
* #2228 allows to improve performance significantly and having this without the `if`statement makes the optimization more interesting.
What do you think?
Commits
-------
af3b0a5 bumped minimum version to PHP 5.6
* 1.x:
updated CHANGELOG
bumped version to 1.28
added testing PHP 7.1
Enhance perf of Template::getAttribute()
added a note about the default escaping strategy
removed Xdebug on Travis
This PR was merged into the 1.x branch.
Discussion
----------
Enhance perf of Template::getAttribute()
Note that this is unproved statement for now :)
If someone has a benchmark and want to try, please do (and share results).
Commits
-------
bdbfb15 Enhance perf of Template::getAttribute()
This PR was merged into the 1.x branch.
Discussion
----------
added a note about the default escaping strategy
fixes#2061
Commits
-------
56556d7 added a note about the default escaping strategy
This PR was squashed before being merged into the 1.x branch (closes#2216).
Discussion
----------
Load templates from cache, even if they have just been compiled
Previously, when the cache was empty, the compiled template would be written to it, but `eval()`d from `$content`. In that case, it is not possible to step through (read: debug) the compiled template because at least xDebug does not have a clue where the code comes from.
With this change, PHP/xDebug can tell even on the first run (with an empty cache) where the code was loaded from.
Commits
-------
ff0abbb Load templates from cache, even if they have just been compiled
This PR was merged into the 1.x branch.
Discussion
----------
Allow construction without constructor arguments
Since we can dynamically add templates and its possible to not need to construct the loader without any initial templates. I've added the default argument to the constructor for simpler instantiation IE new Twig_Loader_Array();. This helps us on a project where we've extended the loader, and have no initial templates but need to add constructor parameters for no real reason.
Commits
-------
289f63c Allow construction without constructor arguments
* 1.x:
add machine-readable version constants
Fixing wrong function name in deprecation notice
bumped version to 1.27.1-DEV
prepared the 1.27.0 release
This PR was merged into the 1.x branch.
Discussion
----------
add machine-readable version constants
This will make it easier to implement version depending features (see https://github.com/symfony/symfony/pull/20440#discussion_r86840491 for an example).
Commits
-------
bf07db4 add machine-readable version constants
Since we can dynamically add templates and its possible to not need to construct the loader without any initial templates. I've added the default argument to the constructor for simpler instantiation IE new Twig_Loader_Array();. This helps us on a project where we've extended the loader, and have no initial templates but need to add constructor parameters for no real reason.
This PR was merged into the 1.x branch.
Discussion
----------
Fixing wrong function name in deprecation notice
Commits
-------
0a3d3c7 Fixing wrong function name in deprecation notice
This PR was merged into the 1.x branch.
Discussion
----------
Move tests handling in Twig_ParserExpression instead of Twig_Extension_Core
In my quest to better organize the layers in Twig, I've always find the way we deal with test a bit awkward. This PR moves the code from the Core extension to the Parser, where it belongs, even if if makes hardcoding 'is' and 'is not' twice, but I think SOC is more important here. Especially as I want to remove the `getEnvironment()` from the Parser class at some point. Having everything centralized helps a lot.
Commits
-------
4deb03a deprecated Twig_Parser::getEnvironment()
0d6686e moved tests handling in Twig_ParserExpression instead of Twig_Extension_Core
This PR was merged into the 2.x branch.
Discussion
----------
removed code specific to older versions of PHP
Commits
-------
273d0d3 removed code specific to older versions of PHP
* 1.x:
deprecated Twig_Compiler::addIndentation()
added a note about when to remove a workaround
deprecated Twig_Parser::addHandler() and Twig_Parser::addNodeVisitor()
This PR was merged into the 1.x branch.
Discussion
----------
deprecated Twig_Parser::addHandler() and Twig_Parser::addNodeVisitor()
I don't even understand why these methods are here. It looks like they never had any usage in the core.
Commits
-------
31c444b deprecated Twig_Parser::addHandler() and Twig_Parser::addNodeVisitor()
This PR was merged into the 1.x branch.
Discussion
----------
deprecated Twig_Compiler::addIndentation()
Commits
-------
bc499a4 deprecated Twig_Compiler::addIndentation()
This PR was merged into the 1.x branch.
Discussion
----------
fixed regression when registering two extensions with the same class
fixed#2165
Commits
-------
47432f3 fixed regression when registering two extensions having the same class name