This PR was squashed before being merged into the 1.x branch (closes#2637).
Discussion
----------
Fix C ext
Commits
-------
bffc117f simplified code
a0c24242 fixed C ext
64e85689 fixed Travis config
This PR was merged into the 2.x branch.
Discussion
----------
Improve performance by inlining constants
This one was suggested by @nicolas-grekas and it is similar to what we've done for the Symfony container. That improves performance **a lot**. Combined with my previous pull request, method calls are now twice as fast as the current stable 2.x release.
Commits
-------
6a946960 improved performance by inlining constants
This PR was squashed before being merged into the 2.x branch (closes#2635).
Discussion
----------
Optimize the performance of the dot operator
This is an alternative to #2359 and #2361, and closes#2326.
Basically, we don't need to call `hasExtension()` at runtime for the sandbox check when calling the dot operator as we know if it's enabled at compile time (the cache hash depends on enables extensions).
My benchmarks shows a *huge* performance improvement (**around 20%**) by doing so (especially when not using the sandbox, which is almost always the case).
Commits
-------
c917d352 fixed resetting options hash when overriding all extensions
89876d23 optimized the . operator performance
This PR was squashed before being merged into the 1.x branch (closes#2411).
Discussion
----------
Exception for use of "===" instead of "same as"
As mentioned in #2358
Hope this is the right location for this Exception
Commits
-------
194d51a4 Exception for use of "===" instead of "same as"
* 1.x:
Update .travis.yml
Fix possible array to string conversion concealing actual error
Make variable names deterministic
Be able to count on iterator
made it clear that placeholders are free-forms for the replace filter
contents -> content
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes#2633).
Discussion
----------
Update .travis.yml to test on PHP 7.2
Commits
-------
8e7527ec Update .travis.yml
This PR was merged into the 1.x branch.
Discussion
----------
Fix possible array to string conversion concealing actual error
This is a 1.x branch backport of #2613
Commits
-------
7ba3b5a5 Fix possible array to string conversion concealing actual error
This PR was merged into the 1.x branch.
Discussion
----------
Make variable names deterministic
Variables should be deterministic to support reproducible builds as outlined in https://github.com/symfony/symfony/issues/25958
Commits
-------
6ab5fe9b Make variable names deterministic
This PR was merged into the 1.x branch.
Discussion
----------
Be able to count on iterator
This PR allows to count on `\Traversable` Objects. Not sure if I made the change to the correct branch. Tell me please if I should target 2.x or master.
Commits
-------
be2c32cc Be able to count on iterator
This PR was merged into the 2.x branch.
Discussion
----------
Remove old class
This class does not exist in Twig 2.x.
Commits
-------
398d826d removed old class
This PR was squashed before being merged into the 2.x branch (closes#2618).
Discussion
----------
Optimized compilation for arrays when using a['b'] notation
Under certain conditions, and thanks to the `??` operator, it's possible to optimize array calls (and avoid the call to `twig_get_attribute()`).
On my local machine, code is almost twice as fast, which is nice if you are using a lot of `a["b"]` calls of nested ones.
refs #2547
Commits
-------
6f7ea45c optimized nested array calls
f3b8f4a8 added some tests
d501e0e5 optimized compilation for arrays when using a['b'] notation under certain conditions
This PR was merged into the 2.x branch.
Discussion
----------
Performance optimization
This PR avoids calling `$this->getSourceContext()` whenever we call `twig_get_attribute()`. That saves one method call and one object creation.
Commits
-------
89cbb5c4 optimized twig_get_attribute (avoid calling getSourceContext())
This PR was merged into the 1.x branch.
Discussion
----------
English tweak contents -> content
The most minor PR ever :).
Made to the 1.x branch, also applies to 2.x obviously.
Commits
-------
19e3fb8c contents -> content
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes#2611).
Discussion
----------
Update license year
TO DO:
- [x] Wait to the next year (100% done, depends on timezone)
- [ ] Merge!
:octocat:
Commits
-------
012ca796 Update license year
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes#2598).
Discussion
----------
Update advanced.rst
I noticed that the rot13Provider wasn't called correctly as it was trying to access a local variable instead of calling $this
Commits
-------
b42fd643 Update advanced.rst
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes#2586).
Discussion
----------
Environment::resolveTemplate now accepts instances of TemplateWrapper
The [documentation on the include function](https://twig.symfony.com/doc/2.x/functions/include.html) states (on the template expression):
> And if the expression evaluates to a Twig_Template or a Twig_TemplateWrapper instance, Twig will use it directly […]
This is currently broken, as `twig_include` [relies on `resolveTemplate`](https://github.com/twigphp/Twig/blob/31b577863b5ae8d19e2cefd174e95a433f16491f/lib/Twig/Extension/Core.php#L1304), which doesn't handle instances of `TemplateWrapper`. This PR fixes that.
For the sake of completeness: the `include` tag doesn't have this problem, as it relies on the `loadTemplate` method of the `Template` class which _does_ handle this case.
Commits
-------
78a4f2fb Environment::resolveTemplate now accepts instances of TemplateWrapper
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes#2562).
Discussion
----------
Change typo in documentation
In example of use for test_iterable function there is a typo
Commits
-------
8607f13d Change typo in documentation
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes#2570).
Discussion
----------
fix grammar
Commits
-------
d4309898 fix grammar