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:
Fabien Potencier
2016-01-19 13:30:57 +01:00
4 changed files with 20 additions and 4 deletions
+9 -1
View File
@@ -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
+1 -1
View File
@@ -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
View File
@@ -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