mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 20:06:31 +00:00
Merge branch '1.x'
* 1.x: fixed CHANGELOG undeprecated _self Fix Parser context push on stack bumped version to 1.23.4-DEV prepared the 1.23.3 release Fix typo. bumped version to 1.23.3-DEV prepared the 1.23.2 release
This commit is contained in:
@@ -14,7 +14,15 @@
|
||||
* improved the performance of the filesystem loader
|
||||
* removed features that were deprecated in 1.x
|
||||
|
||||
* 1.23.2 (2015-XX-XX)
|
||||
* 1.23.4 (2016-XX-XX)
|
||||
|
||||
* undeprecated _self (should only be used to get the template name, not the template instance)
|
||||
|
||||
* 1.23.3 (2016-01-11)
|
||||
|
||||
* fixed typo
|
||||
|
||||
* 1.23.2 (2015-01-11)
|
||||
|
||||
* added versions in deprecated messages
|
||||
* made file cache tolerant for trailing (back)slashes on directory configuration
|
||||
|
||||
@@ -574,7 +574,7 @@ class Twig_ExpressionParser
|
||||
|
||||
if ($function->isDeprecated()) {
|
||||
$message = sprintf('Twig Function "%s" is deprecated', $function->getName());
|
||||
if (!is_bool($functon->getDeprecatedVersion())) {
|
||||
if (!is_bool($function->getDeprecatedVersion())) {
|
||||
$message .= sprintf(' since version %s', $function->getDeprecatedVersion());
|
||||
}
|
||||
if ($function->getAlternative()) {
|
||||
|
||||
+6
-1
@@ -62,7 +62,12 @@ class Twig_Parser
|
||||
public function parse(Twig_TokenStream $stream, $test = null, $dropNeedle = false)
|
||||
{
|
||||
// push all variables into the stack to keep the current state of the parser
|
||||
$vars = get_object_vars($this);
|
||||
// using get_object_vars() instead of foreach would lead to https://bugs.php.net/71336
|
||||
$vars = array();
|
||||
foreach ($this as $k => $v) {
|
||||
$vars[$k] = $v;
|
||||
}
|
||||
|
||||
unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser'], $vars['reservedMacroNames']);
|
||||
$this->stack[] = $vars;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
block1extended
|
||||
{% endblock %}
|
||||
{% endembed %}
|
||||
{{ parent() }}
|
||||
{% endblock %}
|
||||
--TEMPLATE(base.twig)--
|
||||
A
|
||||
@@ -54,4 +55,6 @@ A
|
||||
block1extended
|
||||
B
|
||||
block2
|
||||
CB
|
||||
C blockc2base
|
||||
|
||||
B
|
||||
Reference in New Issue
Block a user