Merge branch '1.x' into 2.x

* 1.x:
  added the key to the map and filter filters
  added support for iterators
  removed fn in front of arrow functions
  changed arrow syntax
  added "filter", "map", and "reduce" filters
  simplified code
  fixed CS
  fixed partial output leak when a PHP fatal error occurs
This commit is contained in:
Fabien Potencier
2019-05-09 13:25:49 +02:00
25 changed files with 435 additions and 20 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ class SetNode extends Node implements NodeCaptureInterface
} else {
if ($this->getAttribute('capture')) {
$compiler
->write("ob_start();\n")
->write("ob_start(function () { return ''; });\n")
->subcompile($this->getNode('values'))
;
}