This PR was squashed before being merged into the 1.x branch (closes#2105).
Discussion
----------
Floor - use cast and not intval
Use cast in fav. of the `inval`, because;
- its faster
- cannot be overloaded
- less chars
Commits
-------
39d46ac Floor - use cast and not intval
This PR was merged into the 1.x branch.
Discussion
----------
Fix static callable.
fixes https://github.com/twigphp/Twig/issues/2053
Commits
-------
8f6fd57 Fix exception message for static method and object without req. params.
This PR was merged into the 1.x branch.
Discussion
----------
[DOC] add named macro end-tag documentation
Hello!
Just discover endmacro tag supports name, just like block.
But it is not mentionned in the doc.
So here's a PR
Commits
-------
dcc5f45 add named macro end-tag documentation
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes#2090).
Discussion
----------
Do not mix indention levels
Not sure if this was intentional, but the "if" line had an indention of 3 spaces,
while the "true" line has an indention of 4 spaces.
Commits
-------
507f697 Do not mix indention levels
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes#2080).
Discussion
----------
Add Visual Studio Code to the list of IDE integrations
With the "TWIG pack" extension.
Commits
-------
e8b16c0 Add Visual Studio Code to the list of IDE integrations
This PR was squashed before being merged into the 1.x branch (closes#2087).
Discussion
----------
Fixed all deprecation notices by using `getMockBuilder`
Fixes deprecation notices on PHPUnit 5.4 without using 5.4 specific features.
Commits
-------
17e0caa Fixed all deprecation notices by using
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes#2076).
Discussion
----------
[Doc] Fixed small error in code example
*see changes*
Commits
-------
dc798d3 [Doc] Fixed small error in code example
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes#2065).
Discussion
----------
Update macro.rst
Small grammar fix: subject-verb agreement "Macros differ" vs "Macros differs"
Commits
-------
0800545 Update macro.rst
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes#2066).
Discussion
----------
Update use.rst
Small grammar fix.
Commits
-------
08c830a Update use.rst
This PR was squashed before being merged into the 1.x branch (closes#2043).
Discussion
----------
Fix load cache
In PHP7 @ do not works and it is resource expensive, switching to if statement.
Commits
-------
b5df3d1 Fix load cache
This PR was merged into the 1.x branch.
Discussion
----------
fix a case where the autoescaping does not work as expected
The Twig_NodeVisitor_Escaper collects a list of blocks for all templates that it visits. If you define the same block (i.e. with the same name) in txt and html templates this results sometimes in the html block not being escapes.
This is illustrated in the added test.
To fix it, I propose to reset the list of the blocks for each module.
Alternatively we need to make clear that blocks should not share names between text and html templates.
Commits
-------
48a3487 Reset blocks also in doLeaveNode
ee6965e fix a case where the autoescaping does not work as expected
The Twig_NodeVisitor_Escaper collects a list of blocks for all templates that it visits. If you define the same block (i.e. with the same name) in txt and html templates this results sometimes in the html block not being escapes.
This is illustrated in the added test.
To fix it, I propose to reset the list of the blocks for each module.
Alternatively we need to make clear that blocks should not share names between text and html templates.
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes#2044).
Discussion
----------
Small fixes
Commits
-------
e81e698 Small fixes
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes#2029).
Discussion
----------
Grammar
A few grammatical fixes.
Commits
-------
6dd784a Grammar
This PR was merged into the 1.x branch.
Discussion
----------
[DOC] recipes.rst uses Twig_Function_Function
Hello,
Here's a minor update for recipes.rst
I rewrite the code sample for registerUndefinedFunctionCallback to remove usage of deprecated class Twig_Function_Function.
Commits
-------
1a1ba8b [DOC] recipes.rst uses Twig_Function_Function
Hello,
Here's a minor update for recipes.rst
I rewrite the code sample for registerUndefinedFunctionCallback to remove usage of deprecated class Twig_Function_Function.
This PR was merged into the 1.x branch.
Discussion
----------
fix a typo (add missing article)
Commits
-------
e317c55 fix a typo (add missing article)
This PR was merged into the 1.x branch.
Discussion
----------
[ExpressionParser] forbids true, false, null and none keywords for variables names.
Commits
-------
2e02f73 [ExpressionParser] forbids true, false, null and none keywords for variables names.
This PR was submitted for the master branch but it was merged into the 1.x branch instead (closes#2002).
Discussion
----------
Implement Twig_Extension_GlobalsInterface on getGlobals example
I'm not sure if more information is required on when and why getGlobals was deprecated from Twig_Extension.
Refs #2001
Commits
-------
b8a987e Implement Twig_Extension_GlobalsInterface on getGlobals example
This PR was squashed before being merged into the 1.x branch (closes#2005).
Discussion
----------
[Doc] Add a note about escaping backslashes inside strings
Backslashes inside strings caused some confusion for some users. See https://github.com/symfony/symfony/issues/18207
Commits
-------
463ea80 [Doc] Add a note about escaping backslashes inside strings