This PR was merged into the master branch.
Discussion
----------
Adding ignoreStrictCheck option for call_user_func_array, if throwing exception
Same as #1236 with added unit tests and C extension support (to come).
"I experienced the issue when using FuelPHP's ORM with EAV containers. When I tried to reference a property that was not defined I expected to get null, but instead the whole application stopped because an exception was thrown in the ORM, that no such function is present.
I couldn't find other possible exception that could be thrown when this function is called, so I assumed it's safe to take the ignoreStrictCheck into consideration here."
Commits
-------
1abf5d9 [ext] Mirroring PHP change for call_user_func_array, see #12869ab290b added tests for exceptions thrown in __call()
c711d37 Adding ignoreStrictCheck option for call_user_func_array, if throwing exception
This PR was merged into the master branch.
Discussion
----------
Added min and max function
usefull for pagination
Commits
-------
6aa06de Added min and max function
This PR was merged into the master branch.
Discussion
----------
Corrected description of the "//" operator
The operator was previously described to truncate the the value when it in fact floors the result of the division (which can be seen in https://github.com/fabpot/Twig/blob/master/lib/Twig/Node/Expression/Binary/FloorDiv.php#L20).
By the old description one would think that ``{{ -20 // 7 }}`` would yield -2 (as in ``(int)(-20/7)``) when it actually returns -3 (as in ``floor(-20/7)``). Floor is not truncate (cast to int).
Commits
-------
a360bc0 Corrected description of the "//" operator
This PR was merged into the master branch.
Discussion
----------
added TokenStream::nextIf()
The introduction of `nextIf()` simplified a lot of code.
Commits
-------
0ed7898 added TokenStream::nextIf()
The operator was previously described to truncate the the value when it in fact floors the result of the division (which can be seen in https://github.com/fabpot/Twig/blob/master/lib/Twig/Node/Expression/Binary/FloorDiv.php#L20).
By the old description one would think that ``{{ -20 // 7 }}`` would yield -2 (as in ``(int)(-20/7)``) when it actually returns -3 (as in ``floor(-20/7)``). Floor is not truncate (cast to int).
This PR was merged into the master branch.
Discussion
----------
[Docs] Some minor fixes: Typos, Notations, Formatting
Fixes for:
* Notations: html > HTML; javascript > JavaScript; composer > Composer
* Typos
* Wrong function names: ``escaper`` > ``escape``; ``include`` > ``source`` (in new chapter about ``source``)
* Formatting issues, e.g. remove RST from code blocks, it's not evaluated
* Wording where code sample outputs something: returns > outputs
* ``true`` parameter for ``autoescape`` - not needed any more
Commits
-------
a21df95 [Docs] Some minor fixes: Typos, Notations
This PR was merged into the master branch.
Discussion
----------
Use string instead of large integer
HHVM differs from php-src on large integer parsing (php-src converts
them to floats, HHVM truncates them but leaves them as integers). The
point of this test is to make sure Twig parses it correctly, not the
underlying PHP execution engine.
Commits
-------
d401717 Use string instead of large integer
HHVM differs from php-src on large integer parsing (php-src converts
them to floats, HHVM truncates them but leaves them as integers). The
point of this test is to make sure Twig parses it correctly, not the
underlying PHP execution engine.
This PR was squashed before being merged into the master branch (closes#1269).
Discussion
----------
various cleanups
fix bool -> Boolean for consistency in other parts of twig's code removing
assignment to n as it is never used fix typo and docblock for consistency
remove line break not needed for consistency fix array docblock for
consistency
Commits
-------
cb651e8 various cleanups
This PR was merged into the master branch.
Discussion
----------
fix typo 'in' operator
Fixed a small typo in the negative 'in' test operator
Commits
-------
f9013d5 fix typo 'in' operator
This PR was merged into the master branch.
Discussion
----------
Fixed ZendServer specific DLL Path in install doc
It seems the \ need to be escaped in the tip section.
(see the file on github or the Twig website)
Commits
-------
2b102e3 Fixed ZendServer specific DLL Path in install doc
This PR was squashed before being merged into the master branch (closes#1258).
Discussion
----------
Fix twig_first and twig_last filters for UTF8 multibyte strings
After string is sliced we already have the right result with a first/last letter for UTF8 string.
Commits
-------
6003ae4 Fix twig_first and twig_last filters for UTF8 multibyte strings
This PR was merged into the master branch.
Discussion
----------
added a source function to include the content of a template without rendering it
Replaces #1230.
There is one question about the implementation: Should the content be considered safe (which is the current implementation)?
Commits
-------
dff7d2c added a source function to include the content of a template without rendering it
This PR was squashed before being merged into the master branch (closes#1256).
Discussion
----------
Fixed C extension sandbox behavior
fixes#1254
Commits
-------
40bba0e Fixed C extension sandbox behavior
This PR was merged into the master branch.
Discussion
----------
fixed error filename/line when an error occurs in an included file
fixed#1141
Commits
-------
ba0bf63 refactored some tests
1cdc913 fixed error filename/line when an error occurs in an included file
de985a8 failing test
This PR was merged into the master branch.
Discussion
----------
allowed tests to be made of 1 or 2 words
Commits
-------
52c952c allowed tests to be made of 1 or 2 words
This PR was merged into the master branch.
Discussion
----------
allowed operators that contain whitespaces to have more than one whitespace
Commits
-------
724dc61 allowed operators that contain whitespaces to have more than one whitespace
To be able to cover all cases, we need to catch the exception when we
know the execution context (the block being rendered). The only
possibility is to actually try/catch exceptions in the displayBlock()
method directly.