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 merged into the 1.x branch.
Discussion
----------
Use strict comparison for charset
There is no reason not to use strict comparison here. Also some minor cs fixes.
Commits
-------
4f32737 compare charset strictly
This PR was merged into the 1.x branch.
Discussion
----------
undeprecated _self
Un-deprecated `_self`. As mentioned in #1932, `_self` is sometimes used to get the current template name, which is a legitimate usage and almost always the user intent. Moreover, when `_self` is used in a template, it is mostly passed to Twig functions that are able to deal with Twig templates or Twig template names indifferently.
fixes#1932
Commits
-------
b490e65 undeprecated _self
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
----------
deprecated Twig_ExtensionInterface::getGlobals()
Commits
-------
e3a325f deprecated Twig_ExtensionInterface::getGlobals()
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()