This PR was merged into the 1.x branch.
Discussion
----------
fixed exception message that might end with a ?
Commits
-------
5c43548 adding missing dots to some exception messages
fbf99fc fixed exception message that might end with a ?
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.
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.
Add missing parenthesis
Adapt twig.c extension
Update the C extension
Use php_ucfirst instead of ucfirst
Try to implement a TWIG_UCFIRST in C extension
Last try ucfirst
Rollback twig.c extension
Remove useless ucfirst + update twig.c extension
Fix mis-escaped char
Repeat argument item for sprintf (first try doesnt work)
Remove unexpected breakline in code
This PR was squashed before being merged into the 1.x branch (closes#1930).
Discussion
----------
Fix Parser context push on stack
Hello,
With php7RC8, in Twig_Parser, parse method starts by saving current context in
copying self properties on stack. It sounds like get_object_vars returns now
references instead of copies of properties (at least for arrays). Consequently,
when reinitializing Parser for subparse line 92 to 99, the preserved context on
stack was also erased.
As a result, when calling {{ parent() }} after a {%embed%}{%endembed%}, the restored blockStack being empty, Twig throws a Twig_Error_Syntax('Calling "parent" outside a block is forbidden.'), despite the fact it is really in a block that extends another.
When calling {{ parent() }} before the embed tag, all works properly. (It seems that the empty context, resulting of subparses, is not a problem as far as you don't need to access it)
Commits
-------
07ebdfe Fix Parser context push on stack
This PR was merged into the 1.x branch.
Discussion
----------
Improve deprecations message
This PR specifies the version in which some ``Twig_SimpleTest`` were deprecated to make it easier to upgrade a package.
Commits
-------
fdb1937 Improve deprecations message Add the version in the message
This PR was merged into the 1.x branch.
Discussion
----------
made exception messages more precise
Replaces #1906 and #1902
Commits
-------
04d6738 fixed typos
This PR was merged into the 1.x branch.
Discussion
----------
fix BC, revert to pre 1.23 behavior, and make use of pattern an option
For context see twigphp/Twig-extensions#155
Commits
-------
ee5e25e fix BC, revert to pre 1.23 behavior, and make use of pattern an option
This PR was merged into the 1.x branch.
Discussion
----------
make cache per user (on linux)
Just because I hate having failed test when I run test once on 1 account, then once on another account ;)
Commits
-------
da5cac6 make cache per user (on linux)
This PR was merged into the 1.x branch.
Discussion
----------
deprecated Twig_ExtensionInterface::initRuntime()
I'm working on splitting Twig extensions into 2 different phases: compilation and runtime. The goal is to avoid having to load the runtime environment of an extension when compiling templates. That also opens the way to be able to lazy-load Twig extensions.
While working on the split, I realized that the `initRuntime()` method on `Twig_ExtensionInterface` is not needed anymore. It was added at a time `needs_environment` did not exist and was a way to keep the environment around for custom filters/tests/functions. But nowadays, that's not needed anymore. I did a quick search on Github, and most of the implementation I found just store the environment in a local property, which is not needed anymore. So, I propose to deprecate it in 1.x and remove it in 2.0.
Commits
-------
9774f4f deprecated Twig_ExtensionInterface::initRuntime()
This PR was merged into the 1.x branch.
Discussion
----------
deprecated Twig_Environment::computeAlternatives()
Commits
-------
d0a5ef8 deprecated Twig_Environment::computeAlternatives()
This PR was merged into the 1.x branch.
Discussion
----------
made the tests semantically more correct
Calling `initRuntime()` is just a side-effect of loading a template.
Commits
-------
f839ad3 made the tests semantically more correct
When the extension class is not defined in a file but in eval'd code
we cannot assume ReflectionObject::getFileName will return
a valid file path.
https://bugs.php.net/bug.php?id=63901
This PR was squashed before being merged into the 1.x branch (closes#1846).
Discussion
----------
Add test coverage for auto_reload
Fixes#1841
Commits
-------
1769f84 Add test coverage for auto_reload