This PR was squashed before being merged into the 1.18-dev branch (closes#1609).
Discussion
----------
get PHP version info once on construction
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
Hi,
I was profiling a project and noticed that `phpversion` was called 5000 times by Twig.
This patch reduces the amount of calls without breaking anything (I hope ;) )

Commits
-------
24ff698 get PHP version info once on construction
This PR was merged into the 1.18-dev branch.
Discussion
----------
fixed named args for static methods
This fixes an obscure reflection error that gets thrown if a functioned backed by a static method is called with named arguments.
Commits
-------
7868fe8 fixed named args for static methods
This PR was merged into the 1.18-dev branch.
Discussion
----------
Fixed wrong line numbers in error messages for multi-line statements
Partially fixes#1351
Commits
-------
08c5196 Fixed wrong line numbers in error messages for multi-line statements
This PR was merged into the 1.18-dev branch.
Discussion
----------
Improved named arguments
Commits
-------
e9b8bcc Fixed determining the necessary arguments for callable functions
5f4377b Improved an exception message for missing value of optional arguments
This PR was merged into the 1.18-dev branch.
Discussion
----------
Small cleanup to use already declared variable
Commits
-------
f60a8c4 Small cleanup to use already declared variable
This PR was merged into the 1.18-dev branch.
Discussion
----------
removed the special Sandbox Module class
This PR removes the need for the special Sandbox Module class. This approach can be generalized by adding more "empty" nodes in the Module class to allow third-party extension to easily add code to the generated class. But I think that hacking the module class is always never a good idea and should be avoided (so this "feature" should not even be documented :)).
This is an alternative for #1436, fixes#1402.
Commits
-------
57400e2 added more hooks in Module
3b12d55 removed the special Sandbox Module class
This PR was merged into the 1.18-dev branch.
Discussion
----------
added Twig_Environment::createTemplate()
fixes#1506
Commits
-------
6ec928e added Twig_Environment::createTemplate()
This PR was merged into the 1.17-dev branch.
Discussion
----------
added a profiler
This profiler allows to better understand what's going on when rendering templates. It should be used when debug is true only as it adds some overhead.
Here is a sample output in the text format:
```
main 567.04ms/100%
└ index 463.28ms/82%
└ base 463.24ms/82%
└ base::block(header)
└ index::block(content) 306.29ms/54%
│ └ included 50.18ms/9%
│ └ included 45.42ms/8%
│ └ included 35.42ms/6%
│ └ base::block(content) 104.97ms/19%
│ │ └ included 34.90ms/6%
│ └ included 35.84ms/6%
└ base::block(footer) 156.84ms/28%
└ included 38.96ms/7%
└ base::macro(foo)
```
You can also dump a profile in a Blackfire compatible format to [visualise the data as a graph](http://goo.gl/RwNGFH).
A profile is also a great way to be able to list all templates/blocks/macros that were used when rendering a template.
A PR on Symfony (symfony/symfony#13428) integrates this profiler in the Symfony web profiler to replace the current TimedTwigEngine and to add a new Twig panel.

Commits
-------
4408caa added a profiler
This PR was squashed before being merged into the 1.17-dev branch (closes#1565).
Discussion
----------
Update batch.rst
Commits
-------
403736f Update batch.rst
This PR was squashed before being merged into the 1.17-dev branch (closes#1598).
Discussion
----------
FIX#1596 FileSystem::findTemplate now applies realpath on the absolute ...
...path before returning it.
This is a purposal to fix the issue #1596.
Please make any feedback needed.
Commits
-------
5074114FIX#1596 FileSystem::findTemplate now applies realpath on the absolute ...
This PR was merged into the 1.17-dev branch.
Discussion
----------
Small things
Commits
-------
175a7c3 removed unneeded method
b7204f1 ensure that debug info are always sorted
This PR was merged into the 1.17-dev branch.
Discussion
----------
added some more tests for the filename autoescape strategy
Commits
-------
01ab6f3 added some more tests for the filename autoescape strategy
This PR was merged into the 1.16-dev branch.
Discussion
----------
added an escaping strategy based on the template filename extension
This PR introduces a new autoescaping strategy based on the template filename extension. This strategy has been extracted from Symfony, where we are using it for quite a long time now.
Commits
-------
4481bf5 added an escaping strategy based on the template filename extension
d6b2c89 fixed CS
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fixed regression for dynamic parent
Fixes#1578
Commits
-------
d2fc98d Fixed regression for dynamic parent
This PR was merged into the 1.16-dev branch.
Discussion
----------
Adding example with ``not`` for ``if``
I could not find an example with ``not``, so I added it here.
Commits
-------
4a75e40 Adding example with ``not`` for ``if``