This PR was merged into the 1.16-dev branch.
Discussion
----------
The results of is_dir() are cached
If a production server uses statcache, the results of the first and second call of is_dir() is always the same.
So before calling is_dir() for the second time, use clearstatcache() to clear the results of the first call of is_dir().
Commits
-------
df0d813 The results of is_dir() are cached
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fix the For optimizer, "include" function was always optimized
A `for`with an in `include` function was always optimized, making it impossible to use the `loop` variable inside the include unless it was explicitly passed in the `include` function parameters.
Commits
-------
4319bb9 Fix the For optimizer, "include" function was always optimized
This PR was merged into the 1.16-dev branch.
Discussion
----------
Use int instead of invalid timestamp type in PhpDoc
Commits
-------
d64d2b0 Use int instead of invalid timestamp type in PhpDoc
This PR was merged into the 1.16-dev branch.
Discussion
----------
removed @covers annotations
I propose to remove the `@covers` annotations for the following main reasons:
* they were only used in a limited number of test cases;
* they limited the code coverage of nodes for no reasons (some other tests are as valid to test the nodes).
Commits
-------
4ba0789 removed @covers annotations
This PR was merged into the 1.16-dev branch.
Discussion
----------
fixed alphabetic order in lists of filters and tags
My eyes needed more time than expected to find the `upper` filter, so this should help. 😏
Commits
-------
ba04803 fixed alphabetic order in lists of filters and tags
This PR was merged into the 1.16-dev branch.
Discussion
----------
first argument of Twig_Loader_Array must be an array
Commits
-------
435534e first argument of Twig_Loader_Array must be an array
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fixed using of unary operators with default parameters
Fixes#1322
Commits
-------
5ba4e9c Fixed using of unary operators with default parameters
This PR was merged into the 1.16-dev branch.
Discussion
----------
Improved an exception message for unknown arguments
Commits
-------
6427189 Improved an exception message for unknown arguments
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fixed php error for "in" operator
I have added the tests and also fixed the php error ``An exception has been thrown during the rendering of a template ("strlen() expects parameter 1 to be string, array given")``.
Commits
-------
8dfeda0 Fixed "in" operator for resources and strings
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fixed guessing a template info for the Twig_Error_Loader exception
Commits
-------
8f617dc Fixed guessing a template info for the Twig_Error_Loader exception
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fix for broken BC through #1503: The slice filter works as the array_slice PHP function for arrays
The pull request #1503 has broken the described BC in documentation: "The slice filter works as the array_slice PHP function for arrays".
If the start-value is out of bounds the current implementation throws an OutOfBoundsException. The old implementation returns an empty array.
I also added some test cases.
Commits
-------
d95d0fd Fix for broken BC through #1503: The slice filter works as the array_slice PHP function for arrays
This PR was merged into the 1.16-dev branch.
Discussion
----------
Moved skip for HHVM
Skip for HHVM was moved up as test is Failed earlier trying to access
DateTime->date.
Commits
-------
3aa1771 Moved skip for HHVM
This PR was merged into the 1.16-dev branch.
Discussion
----------
[doc] [api.rst] Correct base template name
The base template name used in $loader1 and $loader2 is actually "base.html", not "base.twig".
Commits
-------
882f44b Correct base template name
This PR was merged into the 1.16-dev branch.
Discussion
----------
Update phpdoc for date filter/function
Commits
-------
7b4c537 Update phpdoc for date filter/function
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fixed the date filter's timezone not being set correctly with strings
When the date filter is used on a string and the timezone argument is specified, the timezone is ignored because of this :
$date = new DateTime($date, $defaultTimezone);
if (false !== $timezone) {
$date->setTimezone($defaultTimezone);
}
Since the date is initialized with `$defaultTimezone` as its timezone, using `$date->setTimezone($defaultTimezone);` has no effect, and the date is displayed without changes since it is considered to already be from this timezone.
Might fix issue #1340
Commits
-------
44aaa5b Fixed the date filter's timezone not being set correctly with strings
This PR was merged into the 1.16-dev branch.
Discussion
----------
fixed negative number lexing
Fixes#1368 and #1322.
I don't see it breaking BC as relying on the current way seems weird to me.
Commits
-------
bf541bf fixed negative number lexing
This PR was merged into the 1.16-dev branch.
Discussion
----------
Fixed the support of 2-word tests without a custom node class
Fixes#1537
Commits
-------
0082e05 Fixed the support of 2-word tests without a custom node class
This PR was merged into the 1.16-dev branch.
Discussion
----------
Delete license in twig extension
This file is outdated and does not seem useful as there is already a license in the root which covers also this.
Commits
-------
c8cd7f2 Delete license in twig extension