diff --git a/vendor/Twig/Autoloader.php b/vendor/Twig/Autoloader.php
index 42f16f0..d47583f 100644
--- a/vendor/Twig/Autoloader.php
+++ b/vendor/Twig/Autoloader.php
@@ -9,24 +9,30 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Autoloader class is deprecated and will be removed in 2.0. Use Composer instead.', E_USER_DEPRECATED);
+
 /**
  * Autoloads Twig classes.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @deprecated Use Composer instead. Will be removed in Twig 2.0.
  */
 class Twig_Autoloader
 {
     /**
      * Registers Twig_Autoloader as an SPL autoloader.
      *
-     * @param bool    $prepend Whether to prepend the autoloader or not.
+     * @param bool $prepend Whether to prepend the autoloader or not.
      */
     public static function register($prepend = false)
     {
-        if (version_compare(phpversion(), '5.3.0', '>=')) {
-            spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend);
-        } else {
+        @trigger_error('Using Twig_Autoloader is deprecated. Use Composer instead.', E_USER_DEPRECATED);
+
+        if (PHP_VERSION_ID < 50300) {
             spl_autoload_register(array(__CLASS__, 'autoload'));
+        } else {
+            spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend);
         }
     }
 
diff --git a/vendor/Twig/BaseNodeVisitor.php b/vendor/Twig/BaseNodeVisitor.php
new file mode 100644
index 0000000..3c6ef66
--- /dev/null
+++ b/vendor/Twig/BaseNodeVisitor.php
@@ -0,0 +1,62 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Twig_BaseNodeVisitor can be used to make node visitors compatible with Twig 1.x and 2.x.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+abstract class Twig_BaseNodeVisitor implements Twig_NodeVisitorInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    final public function enterNode(Twig_NodeInterface $node, Twig_Environment $env)
+    {
+        if (!$node instanceof Twig_Node) {
+            throw new LogicException('Twig_BaseNodeVisitor only supports Twig_Node instances.');
+        }
+
+        return $this->doEnterNode($node, $env);
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    final public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env)
+    {
+        if (!$node instanceof Twig_Node) {
+            throw new LogicException('Twig_BaseNodeVisitor only supports Twig_Node instances.');
+        }
+
+        return $this->doLeaveNode($node, $env);
+    }
+
+    /**
+     * Called before child nodes are visited.
+     *
+     * @param Twig_Node        $node The node to visit
+     * @param Twig_Environment $env  The Twig environment instance
+     *
+     * @return Twig_Node The modified node
+     */
+    abstract protected function doEnterNode(Twig_Node $node, Twig_Environment $env);
+
+    /**
+     * Called after child nodes are visited.
+     *
+     * @param Twig_Node        $node The node to visit
+     * @param Twig_Environment $env  The Twig environment instance
+     *
+     * @return Twig_Node|false The modified node or false if the node must be removed
+     */
+    abstract protected function doLeaveNode(Twig_Node $node, Twig_Environment $env);
+}
diff --git a/vendor/Twig/Cache/Filesystem.php b/vendor/Twig/Cache/Filesystem.php
new file mode 100644
index 0000000..2c2182a
--- /dev/null
+++ b/vendor/Twig/Cache/Filesystem.php
@@ -0,0 +1,96 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Implements a cache on the filesystem.
+ *
+ * @author Andrew Tch <andrew@noop.lv>
+ */
+class Twig_Cache_Filesystem implements Twig_CacheInterface
+{
+    const FORCE_BYTECODE_INVALIDATION = 1;
+
+    private $directory;
+    private $options;
+
+    /**
+     * @param $directory string The root cache directory
+     * @param $options   int    A set of options
+     */
+    public function __construct($directory, $options = 0)
+    {
+        $this->directory = $directory;
+        $this->options = $options;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function generateKey($name, $className)
+    {
+        $hash = hash('sha256', $className);
+
+        return $this->directory.'/'.$hash[0].$hash[1].'/'.$hash.'.php';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function load($key)
+    {
+        @include_once $key;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function write($key, $content)
+    {
+        $dir = dirname($key);
+        if (!is_dir($dir)) {
+            if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) {
+                throw new RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir));
+            }
+        } elseif (!is_writable($dir)) {
+            throw new RuntimeException(sprintf('Unable to write in the cache directory (%s).', $dir));
+        }
+
+        $tmpFile = tempnam($dir, basename($key));
+        if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $key)) {
+            @chmod($key, 0666 & ~umask());
+
+            if (self::FORCE_BYTECODE_INVALIDATION == ($this->options & self::FORCE_BYTECODE_INVALIDATION)) {
+                // Compile cached file into bytecode cache
+                if (function_exists('opcache_invalidate')) {
+                    opcache_invalidate($key, true);
+                } elseif (function_exists('apc_compile_file')) {
+                    apc_compile_file($key);
+                }
+            }
+
+            return;
+        }
+
+        throw new RuntimeException(sprintf('Failed to write cache file "%s".', $key));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getTimestamp($key)
+    {
+        if (!file_exists($key)) {
+            return 0;
+        }
+
+        return (int) @filemtime($key);
+    }
+}
diff --git a/vendor/Twig/Cache/Null.php b/vendor/Twig/Cache/Null.php
new file mode 100644
index 0000000..fde8c80
--- /dev/null
+++ b/vendor/Twig/Cache/Null.php
@@ -0,0 +1,48 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Implements a no-cache strategy.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_Cache_Null implements Twig_CacheInterface
+{
+    /**
+     * {@inheritdoc}
+     */
+    public function generateKey($name, $className)
+    {
+        return '';
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function write($key, $content)
+    {
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function load($key)
+    {
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getTimestamp($key)
+    {
+        return 0;
+    }
+}
diff --git a/vendor/Twig/CacheInterface.php b/vendor/Twig/CacheInterface.php
new file mode 100644
index 0000000..9b17e0f
--- /dev/null
+++ b/vendor/Twig/CacheInterface.php
@@ -0,0 +1,56 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Interface implemented by cache classes.
+ *
+ * It is highly recommended to always store templates on the filesystem to
+ * benefit from the PHP opcode cache. This interface is mostly useful if you
+ * need to implement a custom strategy for storing templates on the filesystem.
+ *
+ * @author Andrew Tch <andrew@noop.lv>
+ */
+interface Twig_CacheInterface
+{
+    /**
+     * Generates a cache key for the given template class name.
+     *
+     * @param string $name      The template name
+     * @param string $className The template class name
+     *
+     * @return string
+     */
+    public function generateKey($name, $className);
+
+    /**
+     * Writes the compiled template to cache.
+     *
+     * @param string $key     The cache key
+     * @param string $content The template representation as a PHP class
+     */
+    public function write($key, $content);
+
+    /**
+     * Loads a template from the cache.
+     *
+     * @param string $key The cache key
+     */
+    public function load($key);
+
+    /**
+     * Returns the modification timestamp of a key.
+     *
+     * @param string $key The cache key
+     *
+     * @return int
+     */
+    public function getTimestamp($key);
+}
diff --git a/vendor/Twig/Compiler.php b/vendor/Twig/Compiler.php
index 93dc876..abea3aa 100644
--- a/vendor/Twig/Compiler.php
+++ b/vendor/Twig/Compiler.php
@@ -21,7 +21,7 @@ class Twig_Compiler implements Twig_CompilerInterface
     protected $source;
     protected $indentation;
     protected $env;
-    protected $debugInfo;
+    protected $debugInfo = array();
     protected $sourceOffset;
     protected $sourceLine;
     protected $filename;
@@ -34,7 +34,6 @@ class Twig_Compiler implements Twig_CompilerInterface
     public function __construct(Twig_Environment $env)
     {
         $this->env = $env;
-        $this->debugInfo = array();
     }
 
     public function getFilename()
@@ -231,13 +230,15 @@ class Twig_Compiler implements Twig_CompilerInterface
 
     public function getDebugInfo()
     {
+        ksort($this->debugInfo);
+
         return $this->debugInfo;
     }
 
     /**
      * Indents the generated code.
      *
-     * @param int     $step The number of indentation to add
+     * @param int $step The number of indentation to add
      *
      * @return Twig_Compiler The current compiler instance
      */
@@ -251,7 +252,7 @@ class Twig_Compiler implements Twig_CompilerInterface
     /**
      * Outdents the generated code.
      *
-     * @param int     $step The number of indentation to remove
+     * @param int $step The number of indentation to remove
      *
      * @return Twig_Compiler The current compiler instance
      *
diff --git a/vendor/Twig/Environment.php b/vendor/Twig/Environment.php
index 17e88ab..99a6b01 100644
--- a/vendor/Twig/Environment.php
+++ b/vendor/Twig/Environment.php
@@ -16,7 +16,7 @@
  */
 class Twig_Environment
 {
-    const VERSION = '1.16.2';
+    const VERSION = '1.23.1';
 
     protected $charset;
     protected $loader;
@@ -34,17 +34,22 @@ class Twig_Environment
     protected $tests;
     protected $functions;
     protected $globals;
-    protected $runtimeInitialized;
-    protected $extensionInitialized;
+    protected $runtimeInitialized = false;
+    protected $extensionInitialized = false;
     protected $loadedTemplates;
     protected $strictVariables;
     protected $unaryOperators;
     protected $binaryOperators;
     protected $templateClassPrefix = '__TwigTemplate_';
-    protected $functionCallbacks;
-    protected $filterCallbacks;
+    protected $functionCallbacks = array();
+    protected $filterCallbacks = array();
     protected $staging;
 
+    private $originalCache;
+    private $bcWriteCacheFile = false;
+    private $bcGetCacheFilename = false;
+    private $lastModifiedExtension = 0;
+
     /**
      * Constructor.
      *
@@ -58,8 +63,9 @@ class Twig_Environment
      *  * base_template_class: The base template class to use for generated
      *                         templates (default to Twig_Template).
      *
-     *  * cache: An absolute path where to store the compiled templates, or
-     *           false to disable compilation cache (default).
+     *  * cache: An absolute path where to store the compiled templates,
+     *           a Twig_Cache_Interface implementation,
+     *           or false to disable compilation cache (default).
      *
      *  * auto_reload: Whether to reload the template if the original source changed.
      *                 If you don't provide the auto_reload option, it will be
@@ -72,6 +78,7 @@ class Twig_Environment
      *                  * false: disable auto-escaping
      *                  * true: equivalent to html
      *                  * html, js: set the autoescaping to one of the supported strategies
+     *                  * filename: set the autoescaping strategy based on the template filename extension
      *                  * PHP callback: a PHP callback that returns an escaping strategy based on the template "filename"
      *
      *  * optimizations: A flag that indicates which optimizations to apply
@@ -85,34 +92,49 @@ class Twig_Environment
     {
         if (null !== $loader) {
             $this->setLoader($loader);
+        } else {
+            @trigger_error('Not passing a Twig_LoaderInterface as the first constructor argument of Twig_Environment is deprecated.', E_USER_DEPRECATED);
         }
 
         $options = array_merge(array(
-            'debug'               => false,
-            'charset'             => 'UTF-8',
+            'debug' => false,
+            'charset' => 'UTF-8',
             'base_template_class' => 'Twig_Template',
-            'strict_variables'    => false,
-            'autoescape'          => 'html',
-            'cache'               => false,
-            'auto_reload'         => null,
-            'optimizations'       => -1,
+            'strict_variables' => false,
+            'autoescape' => 'html',
+            'cache' => false,
+            'auto_reload' => null,
+            'optimizations' => -1,
         ), $options);
 
-        $this->debug              = (bool) $options['debug'];
-        $this->charset            = strtoupper($options['charset']);
-        $this->baseTemplateClass  = $options['base_template_class'];
-        $this->autoReload         = null === $options['auto_reload'] ? $this->debug : (bool) $options['auto_reload'];
-        $this->strictVariables    = (bool) $options['strict_variables'];
-        $this->runtimeInitialized = false;
+        $this->debug = (bool) $options['debug'];
+        $this->charset = strtoupper($options['charset']);
+        $this->baseTemplateClass = $options['base_template_class'];
+        $this->autoReload = null === $options['auto_reload'] ? $this->debug : (bool) $options['auto_reload'];
+        $this->strictVariables = (bool) $options['strict_variables'];
         $this->setCache($options['cache']);
-        $this->functionCallbacks = array();
-        $this->filterCallbacks = array();
 
         $this->addExtension(new Twig_Extension_Core());
         $this->addExtension(new Twig_Extension_Escaper($options['autoescape']));
         $this->addExtension(new Twig_Extension_Optimizer($options['optimizations']));
-        $this->extensionInitialized = false;
         $this->staging = new Twig_Extension_Staging();
+
+        // For BC
+        if (is_string($this->originalCache)) {
+            $r = new ReflectionMethod($this, 'writeCacheFile');
+            if ($r->getDeclaringClass()->getName() !== __CLASS__) {
+                @trigger_error('The Twig_Environment::writeCacheFile method is deprecated and will be removed in Twig 2.0.', E_USER_DEPRECATED);
+
+                $this->bcWriteCacheFile = true;
+            }
+
+            $r = new ReflectionMethod($this, 'getCacheFilename');
+            if ($r->getDeclaringClass()->getName() !== __CLASS__) {
+                @trigger_error('The Twig_Environment::getCacheFilename method is deprecated and will be removed in Twig 2.0.', E_USER_DEPRECATED);
+
+                $this->bcGetCacheFilename = true;
+            }
+        }
     }
 
     /**
@@ -154,7 +176,7 @@ class Twig_Environment
     /**
      * Checks if debug mode is enabled.
      *
-     * @return bool    true if debug mode is enabled, false otherwise
+     * @return bool true if debug mode is enabled, false otherwise
      */
     public function isDebug()
     {
@@ -180,7 +202,7 @@ class Twig_Environment
     /**
      * Checks if the auto_reload option is enabled.
      *
-     * @return bool    true if auto_reload is enabled, false otherwise
+     * @return bool true if auto_reload is enabled, false otherwise
      */
     public function isAutoReload()
     {
@@ -206,7 +228,7 @@ class Twig_Environment
     /**
      * Checks if the strict_variables option is enabled.
      *
-     * @return bool    true if strict_variables is enabled, false otherwise
+     * @return bool true if strict_variables is enabled, false otherwise
      */
     public function isStrictVariables()
     {
@@ -214,24 +236,43 @@ class Twig_Environment
     }
 
     /**
-     * Gets the cache directory or false if cache is disabled.
+     * Gets the current cache implementation.
      *
-     * @return string|false
+     * @param bool $original Whether to return the original cache option or the real cache instance
+     *
+     * @return Twig_CacheInterface|string|false A Twig_CacheInterface implementation,
+     *                                          an absolute path to the compiled templates,
+     *                                          or false to disable cache
      */
-    public function getCache()
+    public function getCache($original = true)
     {
-        return $this->cache;
+        return $original ? $this->originalCache : $this->cache;
     }
 
-     /**
-      * Sets the cache directory or false if cache is disabled.
-      *
-      * @param string|false $cache The absolute path to the compiled templates,
-      *                            or false to disable cache
-      */
+    /**
+     * Sets the current cache implementation.
+     *
+     * @param Twig_CacheInterface|string|false $cache A Twig_CacheInterface implementation,
+     *                                                an absolute path to the compiled templates,
+     *                                                or false to disable cache
+     */
     public function setCache($cache)
     {
-        $this->cache = $cache ? $cache : false;
+        if (is_string($cache)) {
+            $this->originalCache = $cache;
+            $this->cache = new Twig_Cache_Filesystem($cache);
+        } elseif (false === $cache) {
+            $this->originalCache = $cache;
+            $this->cache = new Twig_Cache_Null();
+        } elseif (null === $cache) {
+            @trigger_error('Using "null" as the cache strategy is deprecated and will be removed in Twig 2.0.', E_USER_DEPRECATED);
+            $this->originalCache = false;
+            $this->cache = new Twig_Cache_Null();
+        } elseif ($cache instanceof Twig_CacheInterface) {
+            $this->originalCache = $this->cache = $cache;
+        } else {
+            throw new LogicException(sprintf('Cache can only be a string, false, or a Twig_CacheInterface implementation.'));
+        }
     }
 
     /**
@@ -240,38 +281,52 @@ class Twig_Environment
      * @param string $name The template name
      *
      * @return string|false The cache file name or false when caching is disabled
+     *
+     * @deprecated since 1.22 (to be removed in 2.0)
      */
     public function getCacheFilename($name)
     {
-        if (false === $this->cache) {
-            return false;
-        }
+        @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
 
-        $class = substr($this->getTemplateClass($name), strlen($this->templateClassPrefix));
+        $key = $this->cache->generateKey($name, $this->getTemplateClass($name));
 
-        return $this->getCache().'/'.substr($class, 0, 2).'/'.substr($class, 2, 2).'/'.substr($class, 4).'.php';
+        return !$key ? false : $key;
     }
 
     /**
      * Gets the template class associated with the given string.
      *
-     * @param string  $name  The name for which to calculate the template class name
-     * @param int     $index The index if it is an embedded template
+     * The generated template class is based on the following parameters:
+     *
+     *  * The cache key for the given template;
+     *  * The currently enabled extensions;
+     *  * Whether the Twig C extension is available or not.
+     *
+     * @param string   $name  The name for which to calculate the template class name
+     * @param int|null $index The index if it is an embedded template
      *
      * @return string The template class name
      */
     public function getTemplateClass($name, $index = null)
     {
-        return $this->templateClassPrefix.hash('sha256', $this->getLoader()->getCacheKey($name)).(null === $index ? '' : '_'.$index);
+        $key = $this->getLoader()->getCacheKey($name);
+        $key .= json_encode(array_keys($this->extensions));
+        $key .= function_exists('twig_template_get_attributes');
+
+        return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '_'.$index);
     }
 
     /**
      * Gets the template class prefix.
      *
      * @return string The template class prefix
+     *
+     * @deprecated since 1.22 (to be removed in 2.0)
      */
     public function getTemplateClassPrefix()
     {
+        @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
+
         return $this->templateClassPrefix;
     }
 
@@ -310,8 +365,8 @@ class Twig_Environment
     /**
      * Loads a template by name.
      *
-     * @param string  $name  The template name
-     * @param int     $index The index if it is an embedded template
+     * @param string $name  The template name
+     * @param int    $index The index if it is an embedded template
      *
      * @return Twig_TemplateInterface A template instance representing the given template name
      *
@@ -327,14 +382,25 @@ class Twig_Environment
         }
 
         if (!class_exists($cls, false)) {
-            if (false === $cache = $this->getCacheFilename($name)) {
-                eval('?>'.$this->compileSource($this->getLoader()->getSource($name), $name));
+            if ($this->bcGetCacheFilename) {
+                $key = $this->getCacheFilename($name);
             } else {
-                if (!is_file($cache) || ($this->isAutoReload() && !$this->isTemplateFresh($name, filemtime($cache)))) {
-                    $this->writeCacheFile($cache, $this->compileSource($this->getLoader()->getSource($name), $name));
+                $key = $this->cache->generateKey($name, $cls);
+            }
+
+            if (!$this->isAutoReload() || $this->isTemplateFresh($name, $this->cache->getTimestamp($key))) {
+                $this->cache->load($key);
+            }
+
+            if (!class_exists($cls, false)) {
+                $content = $this->compileSource($this->getLoader()->getSource($name), $name);
+                if ($this->bcWriteCacheFile) {
+                    $this->writeCacheFile($key, $content);
+                } else {
+                    $this->cache->write($key, $content);
                 }
 
-                require_once $cache;
+                eval('?>'.$content);
             }
         }
 
@@ -346,27 +412,63 @@ class Twig_Environment
     }
 
     /**
+     * Creates a template from source.
+     *
+     * This method should not be used as a generic way to load templates.
+     *
+     * @param string $template The template name
+     *
+     * @return Twig_Template A template instance representing the given template name
+     *
+     * @throws Twig_Error_Loader When the template cannot be found
+     * @throws Twig_Error_Syntax When an error occurred during compilation
+     */
+    public function createTemplate($template)
+    {
+        $name = sprintf('__string_template__%s', hash('sha256', uniqid(mt_rand(), true), false));
+
+        $loader = new Twig_Loader_Chain(array(
+            new Twig_Loader_Array(array($name => $template)),
+            $current = $this->getLoader(),
+        ));
+
+        $this->setLoader($loader);
+        try {
+            $template = $this->loadTemplate($name);
+        } catch (Exception $e) {
+            $this->setLoader($current);
+
+            throw $e;
+        }
+        $this->setLoader($current);
+
+        return $template;
+    }
+
+    /**
      * Returns true if the template is still fresh.
      *
      * Besides checking the loader for freshness information,
      * this method also checks if the enabled extensions have
      * not changed.
      *
-     * @param string    $name The template name
-     * @param timestamp $time The last modification time of the cached template
+     * @param string $name The template name
+     * @param int    $time The last modification time of the cached template
      *
-     * @return bool    true if the template is fresh, false otherwise
+     * @return bool true if the template is fresh, false otherwise
      */
     public function isTemplateFresh($name, $time)
     {
-        foreach ($this->extensions as $extension) {
-            $r = new ReflectionObject($extension);
-            if (filemtime($r->getFileName()) > $time) {
-                return false;
+        if (0 === $this->lastModifiedExtension) {
+            foreach ($this->extensions as $extension) {
+                $r = new ReflectionObject($extension);
+                if (file_exists($r->getFileName()) && ($extensionTime = filemtime($r->getFileName())) > $this->lastModifiedExtension) {
+                    $this->lastModifiedExtension = $extensionTime;
+                }
             }
         }
 
-        return $this->getLoader()->isFresh($name, $time);
+        return $this->lastModifiedExtension <= $time && $this->getLoader()->isFresh($name, $time);
     }
 
     /**
@@ -408,24 +510,30 @@ class Twig_Environment
 
     /**
      * Clears the internal template cache.
+     *
+     * @deprecated since 1.18.3 (to be removed in 2.0)
      */
     public function clearTemplateCache()
     {
+        @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
+
         $this->loadedTemplates = array();
     }
 
     /**
      * Clears the template cache files on the filesystem.
+     *
+     * @deprecated since 1.22 (to be removed in 2.0)
      */
     public function clearCacheFiles()
     {
-        if (false === $this->cache) {
-            return;
-        }
+        @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
 
-        foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->cache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
-            if ($file->isFile()) {
-                @unlink($file->getPathname());
+        if (is_string($this->originalCache)) {
+            foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->originalCache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
+                if ($file->isFile()) {
+                    @unlink($file->getPathname());
+                }
             }
         }
     }
@@ -447,7 +555,7 @@ class Twig_Environment
     /**
      * Sets the Lexer instance.
      *
-     * @param Twig_LexerInterface A Twig_LexerInterface instance
+     * @param Twig_LexerInterface $lexer A Twig_LexerInterface instance
      */
     public function setLexer(Twig_LexerInterface $lexer)
     {
@@ -486,7 +594,7 @@ class Twig_Environment
     /**
      * Sets the Parser instance.
      *
-     * @param Twig_ParserInterface A Twig_ParserInterface instance
+     * @param Twig_ParserInterface $parser A Twig_ParserInterface instance
      */
     public function setParser(Twig_ParserInterface $parser)
     {
@@ -556,7 +664,13 @@ class Twig_Environment
     public function compileSource($source, $name = null)
     {
         try {
-            return $this->compile($this->parse($this->tokenize($source, $name)));
+            $compiled = $this->compile($this->parse($this->tokenize($source, $name)), $source);
+
+            if (isset($source[0])) {
+                $compiled .= '/* '.str_replace(array('*/', "\r\n", "\r", "\n"), array('*//* ', "\n", "\n", "*/\n/* "), $source)."*/\n";
+            }
+
+            return $compiled;
         } catch (Twig_Error $e) {
             $e->setTemplateFile($name);
             throw $e;
@@ -611,12 +725,22 @@ class Twig_Environment
 
     /**
      * Initializes the runtime environment.
+     *
+     * @deprecated since 1.23 (to be removed in 2.0)
      */
     public function initRuntime()
     {
         $this->runtimeInitialized = true;
 
-        foreach ($this->getExtensions() as $extension) {
+        foreach ($this->getExtensions() as $name => $extension) {
+            if (!$extension instanceof Twig_Extension_InitRuntimeInterface) {
+                $m = new ReflectionMethod($extension, 'initRuntime');
+
+                if ('Twig_Extension' !== $m->getDeclaringClass()->getName()) {
+                    @trigger_error(sprintf('Defining the initRuntime() method in the "%s" extension is deprecated. Use the `needs_environment` option to get the Twig_Environment instance in filters, functions, or tests; or explicitly implement Twig_Extension_InitRuntimeInterface if needed (not recommended).', $name), E_USER_DEPRECATED);
+                }
+            }
+
             $extension->initRuntime($this);
         }
     }
@@ -626,7 +750,7 @@ class Twig_Environment
      *
      * @param string $name The extension name
      *
-     * @return bool    Whether the extension is registered or not
+     * @return bool Whether the extension is registered or not
      */
     public function hasExtension($name)
     {
@@ -656,11 +780,19 @@ class Twig_Environment
      */
     public function addExtension(Twig_ExtensionInterface $extension)
     {
+        $name = $extension->getName();
+
         if ($this->extensionInitialized) {
-            throw new LogicException(sprintf('Unable to register extension "%s" as extensions have already been initialized.', $extension->getName()));
+            throw new LogicException(sprintf('Unable to register extension "%s" as extensions have already been initialized.', $name));
         }
 
-        $this->extensions[$extension->getName()] = $extension;
+        if (isset($this->extensions[$name])) {
+            @trigger_error(sprintf('The possibility to register the same extension twice ("%s") is deprecated and will be removed in Twig 2.0. Use proper PHP inheritance instead.', $name), E_USER_DEPRECATED);
+        }
+
+        $this->lastModifiedExtension = 0;
+
+        $this->extensions[$name] = $extension;
     }
 
     /**
@@ -674,6 +806,8 @@ class Twig_Environment
      */
     public function removeExtension($name)
     {
+        @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
+
         if ($this->extensionInitialized) {
             throw new LogicException(sprintf('Unable to remove extension "%s" as extensions have already been initialized.', $name));
         }
@@ -793,6 +927,8 @@ class Twig_Environment
         if ($name instanceof Twig_SimpleFilter) {
             $filter = $name;
             $name = $filter->getName();
+        } else {
+            @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. Pass an instance of "Twig_SimpleFilter" instead when defining filter "%s".', __METHOD__, $name), E_USER_DEPRECATED);
         }
 
         if ($this->extensionInitialized) {
@@ -882,6 +1018,8 @@ class Twig_Environment
         if ($name instanceof Twig_SimpleTest) {
             $test = $name;
             $name = $test->getName();
+        } else {
+            @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. Pass an instance of "Twig_SimpleTest" instead when defining test "%s".', __METHOD__, $name), E_USER_DEPRECATED);
         }
 
         if ($this->extensionInitialized) {
@@ -940,6 +1078,8 @@ class Twig_Environment
         if ($name instanceof Twig_SimpleFunction) {
             $function = $name;
             $name = $function->getName();
+        } else {
+            @trigger_error(sprintf('Passing a name as a first argument to the %s method is deprecated. Pass an instance of "Twig_SimpleFunction" instead when defining function "%s".', __METHOD__, $name), E_USER_DEPRECATED);
         }
 
         if ($this->extensionInitialized) {
@@ -1030,11 +1170,11 @@ class Twig_Environment
                 $this->globals = $this->initGlobals();
             }
 
-            /* This condition must be uncommented in Twig 2.0
             if (!array_key_exists($name, $this->globals)) {
-                throw new LogicException(sprintf('Unable to add global "%s" as the runtime or the extensions have already been initialized.', $name));
+                // The deprecation notice must be turned into the following exception in Twig 2.0
+                @trigger_error(sprintf('Registering global variable "%s" at runtime or when the extensions have already been initialized is deprecated.', $name), E_USER_DEPRECATED);
+                //throw new LogicException(sprintf('Unable to add global "%s" as the runtime or the extensions have already been initialized.', $name));
             }
-            */
         }
 
         if ($this->extensionInitialized || $this->runtimeInitialized) {
@@ -1111,24 +1251,28 @@ class Twig_Environment
         return $this->binaryOperators;
     }
 
+    /**
+     * @deprecated since 1.23 (to be removed in 2.0)
+     */
     public function computeAlternatives($name, $items)
     {
-        $alternatives = array();
-        foreach ($items as $item) {
-            $lev = levenshtein($name, $item);
-            if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) {
-                $alternatives[$item] = $lev;
-            }
-        }
-        asort($alternatives);
+        @trigger_error(sprintf('The %s method is deprecated and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED);
 
-        return array_keys($alternatives);
+        return Twig_Error_Syntax::computeAlternatives($name, $items);
     }
 
     protected function initGlobals()
     {
         $globals = array();
-        foreach ($this->extensions as $extension) {
+        foreach ($this->extensions as $name => $extension) {
+            if (!$extension instanceof Twig_Extension_GlobalsInterface) {
+                $m = new ReflectionMethod($extension, 'getGlobals');
+
+                if ('Twig_Extension' !== $m->getDeclaringClass()->getName()) {
+                    @trigger_error(sprintf('Defining the getGlobals() method in the "%s" extension is deprecated without explicitly implementing Twig_Extension_GlobalsInterface.', $name), E_USER_DEPRECATED);
+                }
+            }
+
             $extGlob = $extension->getGlobals();
             if (!is_array($extGlob)) {
                 throw new UnexpectedValueException(sprintf('"%s::getGlobals()" must return an array of globals.', get_class($extension)));
@@ -1149,7 +1293,7 @@ class Twig_Environment
         }
 
         $this->extensionInitialized = true;
-        $this->parsers = new Twig_TokenParserBroker();
+        $this->parsers = new Twig_TokenParserBroker(array(), array(), false);
         $this->filters = array();
         $this->functions = array();
         $this->tests = array();
@@ -1167,11 +1311,10 @@ class Twig_Environment
     {
         // filters
         foreach ($extension->getFilters() as $name => $filter) {
-            if ($name instanceof Twig_SimpleFilter) {
-                $filter = $name;
-                $name = $filter->getName();
-            } elseif ($filter instanceof Twig_SimpleFilter) {
+            if ($filter instanceof Twig_SimpleFilter) {
                 $name = $filter->getName();
+            } else {
+                @trigger_error(sprintf('Using an instance of "%s" for filter "%s" is deprecated. Use Twig_SimpleFilter instead.', get_class($filter), $name), E_USER_DEPRECATED);
             }
 
             $this->filters[$name] = $filter;
@@ -1179,11 +1322,10 @@ class Twig_Environment
 
         // functions
         foreach ($extension->getFunctions() as $name => $function) {
-            if ($name instanceof Twig_SimpleFunction) {
-                $function = $name;
-                $name = $function->getName();
-            } elseif ($function instanceof Twig_SimpleFunction) {
+            if ($function instanceof Twig_SimpleFunction) {
                 $name = $function->getName();
+            } else {
+                @trigger_error(sprintf('Using an instance of "%s" for function "%s" is deprecated. Use Twig_SimpleFunction instead.', get_class($function), $name), E_USER_DEPRECATED);
             }
 
             $this->functions[$name] = $function;
@@ -1191,11 +1333,10 @@ class Twig_Environment
 
         // tests
         foreach ($extension->getTests() as $name => $test) {
-            if ($name instanceof Twig_SimpleTest) {
-                $test = $name;
-                $name = $test->getName();
-            } elseif ($test instanceof Twig_SimpleTest) {
+            if ($test instanceof Twig_SimpleTest) {
                 $name = $test->getName();
+            } else {
+                @trigger_error(sprintf('Using an instance of "%s" for test "%s" is deprecated. Use Twig_SimpleTest instead.', get_class($test), $name), E_USER_DEPRECATED);
             }
 
             $this->tests[$name] = $test;
@@ -1206,6 +1347,8 @@ class Twig_Environment
             if ($parser instanceof Twig_TokenParserInterface) {
                 $this->parsers->addTokenParser($parser);
             } elseif ($parser instanceof Twig_TokenParserBrokerInterface) {
+                @trigger_error('Registering a Twig_TokenParserBrokerInterface instance is deprecated.', E_USER_DEPRECATED);
+
                 $this->parsers->addTokenParserBroker($parser);
             } else {
                 throw new LogicException('getTokenParsers() must return an array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances');
@@ -1228,27 +1371,11 @@ class Twig_Environment
         }
     }
 
+    /**
+     * @deprecated since 1.22 (to be removed in 2.0)
+     */
     protected function writeCacheFile($file, $content)
     {
-        $dir = dirname($file);
-        if (!is_dir($dir)) {
-            if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) {
-                throw new RuntimeException(sprintf("Unable to create the cache directory (%s).", $dir));
-            }
-        } elseif (!is_writable($dir)) {
-            throw new RuntimeException(sprintf("Unable to write in the cache directory (%s).", $dir));
-        }
-
-        $tmpFile = tempnam($dir, basename($file));
-        if (false !== @file_put_contents($tmpFile, $content)) {
-            // rename does not work on Win32 before 5.2.6
-            if (@rename($tmpFile, $file) || (@copy($tmpFile, $file) && unlink($tmpFile))) {
-                @chmod($file, 0666 & ~umask());
-
-                return;
-            }
-        }
-
-        throw new RuntimeException(sprintf('Failed to write cache file "%s".', $file));
+        $this->cache->write($file, $content);
     }
 }
diff --git a/vendor/Twig/Error.php b/vendor/Twig/Error.php
index 5b253dd..37c7435 100644
--- a/vendor/Twig/Error.php
+++ b/vendor/Twig/Error.php
@@ -57,7 +57,7 @@ class Twig_Error extends Exception
      */
     public function __construct($message, $lineno = -1, $filename = null, Exception $previous = null)
     {
-        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+        if (PHP_VERSION_ID < 50300) {
             $this->previous = $previous;
             parent::__construct('');
         } else {
@@ -111,7 +111,7 @@ class Twig_Error extends Exception
     /**
      * Gets the template line where the error occurred.
      *
-     * @return int     The template line
+     * @return int The template line
      */
     public function getTemplateLine()
     {
@@ -121,7 +121,7 @@ class Twig_Error extends Exception
     /**
      * Sets the template line where the error occurred.
      *
-     * @param int     $lineno The template line
+     * @param int $lineno The template line
      */
     public function setTemplateLine($lineno)
     {
@@ -155,6 +155,15 @@ class Twig_Error extends Exception
         throw new BadMethodCallException(sprintf('Method "Twig_Error::%s()" does not exist.', $method));
     }
 
+    public function appendMessage($rawMessage)
+    {
+        $this->rawMessage .= $rawMessage;
+        $this->updateRepr();
+    }
+
+    /**
+     * @internal
+     */
     protected function updateRepr()
     {
         $this->message = $this->rawMessage;
@@ -165,6 +174,12 @@ class Twig_Error extends Exception
             $dot = true;
         }
 
+        $questionMark = false;
+        if ('?' === substr($this->message, -1)) {
+            $this->message = substr($this->message, 0, -1);
+            $questionMark = true;
+        }
+
         if ($this->filename) {
             if (is_string($this->filename) || (is_object($this->filename) && method_exists($this->filename, '__toString'))) {
                 $filename = sprintf('"%s"', $this->filename);
@@ -181,14 +196,21 @@ class Twig_Error extends Exception
         if ($dot) {
             $this->message .= '.';
         }
+
+        if ($questionMark) {
+            $this->message .= '?';
+        }
     }
 
+    /**
+     * @internal
+     */
     protected function guessTemplateInfo()
     {
         $template = null;
         $templateClass = null;
 
-        if (version_compare(phpversion(), '5.3.6', '>=')) {
+        if (PHP_VERSION_ID >= 50306) {
             $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT);
         } else {
             $backtrace = debug_backtrace();
diff --git a/vendor/Twig/Error/Syntax.php b/vendor/Twig/Error/Syntax.php
index 0f5c579..f73730a 100644
--- a/vendor/Twig/Error/Syntax.php
+++ b/vendor/Twig/Error/Syntax.php
@@ -17,4 +17,37 @@
  */
 class Twig_Error_Syntax extends Twig_Error
 {
+    /**
+     * Tweaks the error message to include suggestions.
+     *
+     * @param string $name  The original name of the item that does not exist
+     * @param array  $items An array of possible items
+     */
+    public function addSuggestions($name, array $items)
+    {
+        if (!$alternatives = self::computeAlternatives($name, $items)) {
+            return;
+        }
+
+        $this->appendMessage(sprintf(' Did you mean "%s"?', implode('", "', $alternatives)));
+    }
+
+    /**
+     * @internal
+     *
+     * To be merged with the addSuggestions() method in 2.0.
+     */
+    public static function computeAlternatives($name, $items)
+    {
+        $alternatives = array();
+        foreach ($items as $item) {
+            $lev = levenshtein($name, $item);
+            if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) {
+                $alternatives[$item] = $lev;
+            }
+        }
+        asort($alternatives);
+
+        return array_keys($alternatives);
+    }
 }
diff --git a/vendor/Twig/ExistsLoaderInterface.php b/vendor/Twig/ExistsLoaderInterface.php
index 48df9e1..b168c3c 100644
--- a/vendor/Twig/ExistsLoaderInterface.php
+++ b/vendor/Twig/ExistsLoaderInterface.php
@@ -23,7 +23,7 @@ interface Twig_ExistsLoaderInterface
      *
      * @param string $name The name of the template to check if we can load
      *
-     * @return bool    If the template source code is handled by this loader or not
+     * @return bool If the template source code is handled by this loader or not
      */
     public function exists($name);
 }
diff --git a/vendor/Twig/ExpressionParser.php b/vendor/Twig/ExpressionParser.php
index f685bad..cad11af 100644
--- a/vendor/Twig/ExpressionParser.php
+++ b/vendor/Twig/ExpressionParser.php
@@ -164,6 +164,21 @@ class Twig_ExpressionParser
                     $this->parser->getStream()->next();
                     $node = new Twig_Node_Expression_Name($token->getValue(), $token->getLine());
                     break;
+                } elseif (isset($this->unaryOperators[$token->getValue()])) {
+                    $class = $this->unaryOperators[$token->getValue()]['class'];
+
+                    $ref = new ReflectionClass($class);
+                    $negClass = 'Twig_Node_Expression_Unary_Neg';
+                    $posClass = 'Twig_Node_Expression_Unary_Pos';
+                    if (!(in_array($ref->getName(), array($negClass, $posClass)) || $ref->isSubclassOf($negClass) || $ref->isSubclassOf($posClass))) {
+                        throw new Twig_Error_Syntax(sprintf('Unexpected unary operator "%s".', $token->getValue()), $token->getLine(), $this->parser->getFilename());
+                    }
+
+                    $this->parser->getStream()->next();
+                    $expr = $this->parsePrimaryExpression();
+
+                    $node = new $class($expr, $token->getLine());
+                    break;
                 }
 
             default:
@@ -172,7 +187,7 @@ class Twig_ExpressionParser
                 } elseif ($token->test(Twig_Token::PUNCTUATION_TYPE, '{')) {
                     $node = $this->parseHashExpression();
                 } else {
-                    throw new Twig_Error_Syntax(sprintf('Unexpected token "%s" of value "%s"', Twig_Token::typeToEnglish($token->getType()), $token->getValue()), $token->getLine(), $this->parser->getFilename());
+                    throw new Twig_Error_Syntax(sprintf('Unexpected token "%s" of value "%s".', Twig_Token::typeToEnglish($token->getType()), $token->getValue()), $token->getLine(), $this->parser->getFilename());
                 }
         }
 
@@ -263,7 +278,7 @@ class Twig_ExpressionParser
             } else {
                 $current = $stream->getCurrent();
 
-                throw new Twig_Error_Syntax(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s"', Twig_Token::typeToEnglish($current->getType()), $current->getValue()), $current->getLine(), $this->parser->getFilename());
+                throw new Twig_Error_Syntax(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s".', Twig_Token::typeToEnglish($current->getType()), $current->getValue()), $current->getLine(), $this->parser->getFilename());
             }
 
             $stream->expect(Twig_Token::PUNCTUATION_TYPE, ':', 'A hash key must be followed by a colon (:)');
@@ -300,13 +315,13 @@ class Twig_ExpressionParser
     {
         switch ($name) {
             case 'parent':
-                $args = $this->parseArguments();
+                $this->parseArguments();
                 if (!count($this->parser->getBlockStack())) {
-                    throw new Twig_Error_Syntax('Calling "parent" outside a block is forbidden', $line, $this->parser->getFilename());
+                    throw new Twig_Error_Syntax('Calling "parent" outside a block is forbidden.', $line, $this->parser->getFilename());
                 }
 
                 if (!$this->parser->getParent() && !$this->parser->hasTraits()) {
-                    throw new Twig_Error_Syntax('Calling "parent" on a template that does not extend nor "use" another template is forbidden', $line, $this->parser->getFilename());
+                    throw new Twig_Error_Syntax('Calling "parent" on a template that does not extend nor "use" another template is forbidden.', $line, $this->parser->getFilename());
                 }
 
                 return new Twig_Node_Expression_Parent($this->parser->peekBlockStack(), $line);
@@ -315,7 +330,7 @@ class Twig_ExpressionParser
             case 'attribute':
                 $args = $this->parseArguments();
                 if (count($args) < 2) {
-                    throw new Twig_Error_Syntax('The "attribute" function takes at least two arguments (the variable and the attributes)', $line, $this->parser->getFilename());
+                    throw new Twig_Error_Syntax('The "attribute" function takes at least two arguments (the variable and the attributes).', $line, $this->parser->getFilename());
                 }
 
                 return new Twig_Node_Expression_GetAttr($args->getNode(0), $args->getNode(1), count($args) > 2 ? $args->getNode(2) : null, Twig_Template::ANY_CALL, $line);
@@ -369,10 +384,16 @@ class Twig_ExpressionParser
 
             if ($node instanceof Twig_Node_Expression_Name && null !== $this->parser->getImportedSymbol('template', $node->getAttribute('name'))) {
                 if (!$arg instanceof Twig_Node_Expression_Constant) {
-                    throw new Twig_Error_Syntax(sprintf('Dynamic macro names are not supported (called on "%s")', $node->getAttribute('name')), $token->getLine(), $this->parser->getFilename());
+                    throw new Twig_Error_Syntax(sprintf('Dynamic macro names are not supported (called on "%s").', $node->getAttribute('name')), $token->getLine(), $this->parser->getFilename());
+                }
+
+                $name = $arg->getAttribute('value');
+
+                if ($this->parser->isReservedMacroName($name)) {
+                    throw new Twig_Error_Syntax(sprintf('"%s" cannot be called as macro as it is a reserved keyword.', $name), $token->getLine(), $this->parser->getFilename());
                 }
 
-                $node = new Twig_Node_Expression_MethodCall($node, 'get'.$arg->getAttribute('value'), $arguments, $lineno);
+                $node = new Twig_Node_Expression_MethodCall($node, 'get'.$name, $arguments, $lineno);
                 $node->setAttribute('safe', true);
 
                 return $node;
@@ -451,8 +472,12 @@ class Twig_ExpressionParser
     /**
      * Parses arguments.
      *
-     * @param bool    $namedArguments Whether to allow named arguments or not
-     * @param bool    $definition     Whether we are parsing arguments for a function definition
+     * @param bool $namedArguments Whether to allow named arguments or not
+     * @param bool $definition     Whether we are parsing arguments for a function definition
+     *
+     * @return Twig_Node
+     *
+     * @throws Twig_Error_Syntax
      */
     public function parseArguments($namedArguments = false, $definition = false)
     {
@@ -475,7 +500,7 @@ class Twig_ExpressionParser
             $name = null;
             if ($namedArguments && $token = $stream->nextIf(Twig_Token::OPERATOR_TYPE, '=')) {
                 if (!$value instanceof Twig_Node_Expression_Name) {
-                    throw new Twig_Error_Syntax(sprintf('A parameter name must be a string, "%s" given', get_class($value)), $token->getLine(), $this->parser->getFilename());
+                    throw new Twig_Error_Syntax(sprintf('A parameter name must be a string, "%s" given.', get_class($value)), $token->getLine(), $this->parser->getFilename());
                 }
                 $name = $value->getAttribute('name');
 
@@ -515,7 +540,7 @@ class Twig_ExpressionParser
         while (true) {
             $token = $this->parser->getStream()->expect(Twig_Token::NAME_TYPE, null, 'Only variables can be assigned to');
             if (in_array($token->getValue(), array('true', 'false', 'none'))) {
-                throw new Twig_Error_Syntax(sprintf('You cannot assign a value to "%s"', $token->getValue()), $token->getLine(), $this->parser->getFilename());
+                throw new Twig_Error_Syntax(sprintf('You cannot assign a value to "%s".', $token->getValue()), $token->getLine(), $this->parser->getFilename());
             }
             $targets[] = new Twig_Node_Expression_AssignName($token->getValue(), $token->getLine());
 
@@ -545,12 +570,20 @@ class Twig_ExpressionParser
         $env = $this->parser->getEnvironment();
 
         if (false === $function = $env->getFunction($name)) {
-            $message = sprintf('The function "%s" does not exist', $name);
-            if ($alternatives = $env->computeAlternatives($name, array_keys($env->getFunctions()))) {
-                $message = sprintf('%s. Did you mean "%s"', $message, implode('", "', $alternatives));
+            $e = new Twig_Error_Syntax(sprintf('Unknown "%s" function.', $name), $line, $this->parser->getFilename());
+            $e->addSuggestions($name, array_keys($env->getFunctions()));
+
+            throw $e;
+        }
+
+        if ($function instanceof Twig_SimpleFunction && $function->isDeprecated()) {
+            $message = sprintf('Twig Function "%s" is deprecated', $function->getName());
+            if ($function->getAlternative()) {
+                $message .= sprintf('. Use "%s" instead', $function->getAlternative());
             }
+            $message .= sprintf(' in %s at line %d.', $this->parser->getFilename(), $line);
 
-            throw new Twig_Error_Syntax($message, $line, $this->parser->getFilename());
+            @trigger_error($message, E_USER_DEPRECATED);
         }
 
         if ($function instanceof Twig_SimpleFunction) {
@@ -565,12 +598,20 @@ class Twig_ExpressionParser
         $env = $this->parser->getEnvironment();
 
         if (false === $filter = $env->getFilter($name)) {
-            $message = sprintf('The filter "%s" does not exist', $name);
-            if ($alternatives = $env->computeAlternatives($name, array_keys($env->getFilters()))) {
-                $message = sprintf('%s. Did you mean "%s"', $message, implode('", "', $alternatives));
+            $e = new Twig_Error_Syntax(sprintf('Unknown "%s" filter.', $name), $line, $this->parser->getFilename());
+            $e->addSuggestions($name, array_keys($env->getFilters()));
+
+            throw $e;
+        }
+
+        if ($filter instanceof Twig_SimpleFilter && $filter->isDeprecated()) {
+            $message = sprintf('Twig Filter "%s" is deprecated', $filter->getName());
+            if ($filter->getAlternative()) {
+                $message .= sprintf('. Use "%s" instead', $filter->getAlternative());
             }
+            $message .= sprintf(' in %s at line %d.', $this->parser->getFilename(), $line);
 
-            throw new Twig_Error_Syntax($message, $line, $this->parser->getFilename());
+            @trigger_error($message, E_USER_DEPRECATED);
         }
 
         if ($filter instanceof Twig_SimpleFilter) {
@@ -583,7 +624,9 @@ class Twig_ExpressionParser
     // checks that the node only contains "constant" elements
     protected function checkConstantExpression(Twig_NodeInterface $node)
     {
-        if (!($node instanceof Twig_Node_Expression_Constant || $node instanceof Twig_Node_Expression_Array)) {
+        if (!($node instanceof Twig_Node_Expression_Constant || $node instanceof Twig_Node_Expression_Array
+            || $node instanceof Twig_Node_Expression_Unary_Neg || $node instanceof Twig_Node_Expression_Unary_Pos
+        )) {
             return false;
         }
 
diff --git a/vendor/Twig/Extension.php b/vendor/Twig/Extension.php
index 5c8ad5c..cb03b3d 100644
--- a/vendor/Twig/Extension.php
+++ b/vendor/Twig/Extension.php
@@ -11,20 +11,16 @@
 abstract class Twig_Extension implements Twig_ExtensionInterface
 {
     /**
-     * Initializes the runtime environment.
+     * {@inheritdoc}
      *
-     * This is where you can load some file that contains filter functions for instance.
-     *
-     * @param Twig_Environment $environment The current Twig_Environment instance
+     * @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_InitRuntimeInterface instead
      */
     public function initRuntime(Twig_Environment $environment)
     {
     }
 
     /**
-     * Returns the token parser instances to add to the existing list.
-     *
-     * @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
+     * {@inheritdoc}
      */
     public function getTokenParsers()
     {
@@ -32,9 +28,7 @@ abstract class Twig_Extension implements Twig_ExtensionInterface
     }
 
     /**
-     * Returns the node visitor instances to add to the existing list.
-     *
-     * @return Twig_NodeVisitorInterface[] An array of Twig_NodeVisitorInterface instances
+     * {@inheritdoc}
      */
     public function getNodeVisitors()
     {
@@ -42,9 +36,7 @@ abstract class Twig_Extension implements Twig_ExtensionInterface
     }
 
     /**
-     * Returns a list of filters to add to the existing list.
-     *
-     * @return array An array of filters
+     * {@inheritdoc}
      */
     public function getFilters()
     {
@@ -52,9 +44,7 @@ abstract class Twig_Extension implements Twig_ExtensionInterface
     }
 
     /**
-     * Returns a list of tests to add to the existing list.
-     *
-     * @return array An array of tests
+     * {@inheritdoc}
      */
     public function getTests()
     {
@@ -62,9 +52,7 @@ abstract class Twig_Extension implements Twig_ExtensionInterface
     }
 
     /**
-     * Returns a list of functions to add to the existing list.
-     *
-     * @return array An array of functions
+     * {@inheritdoc}
      */
     public function getFunctions()
     {
@@ -72,9 +60,7 @@ abstract class Twig_Extension implements Twig_ExtensionInterface
     }
 
     /**
-     * Returns a list of operators to add to the existing list.
-     *
-     * @return array An array of operators
+     * {@inheritdoc}
      */
     public function getOperators()
     {
@@ -82,9 +68,9 @@ abstract class Twig_Extension implements Twig_ExtensionInterface
     }
 
     /**
-     * Returns a list of global variables to add to the existing list.
+     * {@inheritdoc}
      *
-     * @return array An array of global variables
+     * @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_GlobalsInterface instead
      */
     public function getGlobals()
     {
diff --git a/vendor/Twig/Extension/Core.php b/vendor/Twig/Extension/Core.php
index e71d741..0aed990 100644
--- a/vendor/Twig/Extension/Core.php
+++ b/vendor/Twig/Extension/Core.php
@@ -95,9 +95,9 @@ class Twig_Extension_Core extends Twig_Extension
     /**
      * Sets the default format to be used by the number_format filter.
      *
-     * @param int     $decimal      The number of decimal places to use.
-     * @param string  $decimalPoint The character(s) to use for the decimal point.
-     * @param string  $thousandSep  The character(s) to use for the thousands separator.
+     * @param int    $decimal      The number of decimal places to use.
+     * @param string $decimalPoint The character(s) to use for the decimal point.
+     * @param string $thousandSep  The character(s) to use for the thousands separator.
      */
     public function setNumberFormat($decimal, $decimalPoint, $thousandSep)
     {
@@ -114,11 +114,6 @@ class Twig_Extension_Core extends Twig_Extension
         return $this->numberFormat;
     }
 
-    /**
-     * Returns the token parser instance to add to the existing list.
-     *
-     * @return Twig_TokenParser[] An array of Twig_TokenParser instances
-     */
     public function getTokenParsers()
     {
         return array(
@@ -140,11 +135,6 @@ class Twig_Extension_Core extends Twig_Extension
         );
     }
 
-    /**
-     * Returns a list of filters to add to the existing list.
-     *
-     * @return array An array of filters
-     */
     public function getFilters()
     {
         $filters = array(
@@ -152,7 +142,7 @@ class Twig_Extension_Core extends Twig_Extension
             new Twig_SimpleFilter('date', 'twig_date_format_filter', array('needs_environment' => true)),
             new Twig_SimpleFilter('date_modify', 'twig_date_modify_filter', array('needs_environment' => true)),
             new Twig_SimpleFilter('format', 'sprintf'),
-            new Twig_SimpleFilter('replace', 'strtr'),
+            new Twig_SimpleFilter('replace', 'twig_replace_filter'),
             new Twig_SimpleFilter('number_format', 'twig_number_format_filter', array('needs_environment' => true)),
             new Twig_SimpleFilter('abs', 'abs'),
             new Twig_SimpleFilter('round', 'twig_round'),
@@ -202,11 +192,6 @@ class Twig_Extension_Core extends Twig_Extension
         return $filters;
     }
 
-    /**
-     * Returns a list of global functions to add to the existing list.
-     *
-     * @return array An array of global functions
-     */
     public function getFunctions()
     {
         return array(
@@ -222,22 +207,17 @@ class Twig_Extension_Core extends Twig_Extension
         );
     }
 
-    /**
-     * Returns a list of tests to add to the existing list.
-     *
-     * @return array An array of tests
-     */
     public function getTests()
     {
         return array(
             new Twig_SimpleTest('even', null, array('node_class' => 'Twig_Node_Expression_Test_Even')),
             new Twig_SimpleTest('odd', null, array('node_class' => 'Twig_Node_Expression_Test_Odd')),
             new Twig_SimpleTest('defined', null, array('node_class' => 'Twig_Node_Expression_Test_Defined')),
-            new Twig_SimpleTest('sameas', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas')),
+            new Twig_SimpleTest('sameas', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas', 'deprecated' => true, 'alternative' => 'same as')),
             new Twig_SimpleTest('same as', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas')),
             new Twig_SimpleTest('none', null, array('node_class' => 'Twig_Node_Expression_Test_Null')),
             new Twig_SimpleTest('null', null, array('node_class' => 'Twig_Node_Expression_Test_Null')),
-            new Twig_SimpleTest('divisibleby', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby')),
+            new Twig_SimpleTest('divisibleby', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby', 'deprecated' => true, 'alternative' => 'divisible by')),
             new Twig_SimpleTest('divisible by', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby')),
             new Twig_SimpleTest('constant', null, array('node_class' => 'Twig_Node_Expression_Test_Constant')),
             new Twig_SimpleTest('empty', 'twig_test_empty'),
@@ -245,47 +225,42 @@ class Twig_Extension_Core extends Twig_Extension
         );
     }
 
-    /**
-     * Returns a list of operators to add to the existing list.
-     *
-     * @return array An array of operators
-     */
     public function getOperators()
     {
         return array(
             array(
                 'not' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'),
-                '-'   => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Neg'),
-                '+'   => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Pos'),
+                '-' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Neg'),
+                '+' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Pos'),
             ),
             array(
-                'or'          => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'and'         => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'b-or'        => array('precedence' => 16, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'b-xor'       => array('precedence' => 17, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'b-and'       => array('precedence' => 18, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '=='          => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '!='          => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '<'           => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '>'           => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '>='          => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '<='          => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'not in'      => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotIn', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'in'          => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_In', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'matches'     => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Matches', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'or' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'and' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'b-or' => array('precedence' => 16, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'b-xor' => array('precedence' => 17, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'b-and' => array('precedence' => 18, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '==' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '!=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '<' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '>' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '>=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '<=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'not in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotIn', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_In', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'matches' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Matches', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
                 'starts with' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_StartsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'ends with'   => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_EndsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '..'          => array('precedence' => 25, 'class' => 'Twig_Node_Expression_Binary_Range', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '+'           => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Add', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '-'           => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Sub', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '~'           => array('precedence' => 40, 'class' => 'Twig_Node_Expression_Binary_Concat', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '*'           => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mul', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '/'           => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Div', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '//'          => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_FloorDiv', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '%'           => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'is'          => array('precedence' => 100, 'callable' => array($this, 'parseTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                'is not'      => array('precedence' => 100, 'callable' => array($this, 'parseNotTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
-                '**'          => array('precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT),
+                'ends with' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_EndsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '..' => array('precedence' => 25, 'class' => 'Twig_Node_Expression_Binary_Range', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '+' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Add', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '-' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Sub', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '~' => array('precedence' => 40, 'class' => 'Twig_Node_Expression_Binary_Concat', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '*' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mul', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '/' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Div', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '//' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_FloorDiv', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '%' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'is' => array('precedence' => 100, 'callable' => array($this, 'parseTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                'is not' => array('precedence' => 100, 'callable' => array($this, 'parseNotTestExpression'), 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT),
+                '**' => array('precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT),
             ),
         );
     }
@@ -298,8 +273,19 @@ class Twig_Extension_Core extends Twig_Extension
     public function parseTestExpression(Twig_Parser $parser, Twig_NodeInterface $node)
     {
         $stream = $parser->getStream();
-        $name = $this->getTestName($parser, $node->getLine());
-        $class = $this->getTestNodeClass($parser, $name);
+        list($name, $test) = $this->getTest($parser, $node->getLine());
+
+        if ($test instanceof Twig_SimpleTest && $test->isDeprecated()) {
+            $message = sprintf('Twig Test "%s" is deprecated', $name);
+            if ($test->getAlternative()) {
+                $message .= sprintf('. Use "%s" instead', $test->getAlternative());
+            }
+            $message .= sprintf(' in %s at line %d.', $stream->getFilename(), $stream->getCurrent()->getLine());
+
+            @trigger_error($message, E_USER_DEPRECATED);
+        }
+
+        $class = $this->getTestNodeClass($parser, $test);
         $arguments = null;
         if ($stream->test(Twig_Token::PUNCTUATION_TYPE, '(')) {
             $arguments = $parser->getExpressionParser()->parseArguments(true);
@@ -308,53 +294,42 @@ class Twig_Extension_Core extends Twig_Extension
         return new $class($node, $name, $arguments, $parser->getCurrentToken()->getLine());
     }
 
-    protected function getTestName(Twig_Parser $parser, $line)
+    protected function getTest(Twig_Parser $parser, $line)
     {
         $stream = $parser->getStream();
         $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue();
         $env = $parser->getEnvironment();
-        $testMap = $env->getTests();
 
-        if (isset($testMap[$name])) {
-            return $name;
+        if ($test = $env->getTest($name)) {
+            return array($name, $test);
         }
 
         if ($stream->test(Twig_Token::NAME_TYPE)) {
             // try 2-words tests
             $name = $name.' '.$parser->getCurrentToken()->getValue();
 
-            if (isset($testMap[$name])) {
+            if ($test = $env->getTest($name)) {
                 $parser->getStream()->next();
 
-                return $name;
+                return array($name, $test);
             }
         }
 
-        $message = sprintf('The test "%s" does not exist', $name);
-        if ($alternatives = $env->computeAlternatives($name, array_keys($testMap))) {
-            $message = sprintf('%s. Did you mean "%s"', $message, implode('", "', $alternatives));
-        }
+        $e = new Twig_Error_Syntax(sprintf('Unknown "%s" test.', $name), $line, $parser->getFilename());
+        $e->addSuggestions($name, array_keys($env->getTests()));
 
-        throw new Twig_Error_Syntax($message, $line, $parser->getFilename());
+        throw $e;
     }
 
-    protected function getTestNodeClass(Twig_Parser $parser, $name)
+    protected function getTestNodeClass(Twig_Parser $parser, $test)
     {
-        $env = $parser->getEnvironment();
-        $testMap = $env->getTests();
-
-        if ($testMap[$name] instanceof Twig_SimpleTest) {
-            return $testMap[$name]->getNodeClass();
+        if ($test instanceof Twig_SimpleTest) {
+            return $test->getNodeClass();
         }
 
-        return $testMap[$name] instanceof Twig_Test_Node ? $testMap[$name]->getClass() : 'Twig_Node_Expression_Test';
+        return $test instanceof Twig_Test_Node ? $test->getClass() : 'Twig_Node_Expression_Test';
     }
 
-    /**
-     * Returns the name of the extension.
-     *
-     * @return string The extension name
-     */
     public function getName()
     {
         return 'core';
@@ -382,10 +357,10 @@ function twig_cycle($values, $position)
  * Returns a random value depending on the supplied parameter type:
  * - a random item from a Traversable or array
  * - a random character from a string
- * - a random integer between 0 and the integer parameter
+ * - a random integer between 0 and the integer parameter.
  *
- * @param Twig_Environment                 $env    A Twig_Environment instance
- * @param Traversable|array|int|string     $values The values to pick a random item from
+ * @param Twig_Environment             $env    A Twig_Environment instance
+ * @param Traversable|array|int|string $values The values to pick a random item from
  *
  * @throws Twig_Error_Runtime When $values is an empty array (does not apply to an empty string which is returned as is).
  *
@@ -466,15 +441,15 @@ function twig_date_format_filter(Twig_Environment $env, $date, $format = null, $
 }
 
 /**
- * Returns a new date object modified
+ * Returns a new date object modified.
  *
  * <pre>
  *   {{ post.published_at|date_modify("-1day")|date("m/d/Y") }}
  * </pre>
  *
- * @param Twig_Environment  $env      A Twig_Environment instance
- * @param DateTime|string   $date     A date
- * @param string            $modifier A modifier string
+ * @param Twig_Environment $env      A Twig_Environment instance
+ * @param DateTime|string  $date     A date
+ * @param string           $modifier A modifier string
  *
  * @return DateTime A new date object
  */
@@ -529,12 +504,17 @@ function twig_date_converter(Twig_Environment $env, $date = null, $timezone = nu
         return $date;
     }
 
+    if (null === $date || 'now' === $date) {
+        return new DateTime($date, false !== $timezone ? $timezone : $env->getExtension('core')->getTimezone());
+    }
+
     $asString = (string) $date;
     if (ctype_digit($asString) || (!empty($asString) && '-' === $asString[0] && ctype_digit(substr($asString, 1)))) {
-        $date = '@'.$date;
+        $date = new DateTime('@'.$date);
+    } else {
+        $date = new DateTime($date, $env->getExtension('core')->getTimezone());
     }
 
-    $date = new DateTime($date, $env->getExtension('core')->getTimezone());
     if (false !== $timezone) {
         $date->setTimezone($timezone);
     }
@@ -543,13 +523,37 @@ function twig_date_converter(Twig_Environment $env, $date = null, $timezone = nu
 }
 
 /**
+ * Replaces strings within a string.
+ *
+ * @param string            $str  String to replace in
+ * @param array|Traversable $from Replace values
+ * @param string|null       $to   Replace to, deprecated (@see http://php.net/manual/en/function.strtr.php)
+ *
+ * @return string
+ */
+function twig_replace_filter($str, $from, $to = null)
+{
+    if ($from instanceof Traversable) {
+        $from = iterator_to_array($from);
+    } elseif (is_string($from) && is_string($to)) {
+        @trigger_error('Using "replace" with character by character replacement is deprecated and will be removed in Twig 2.0', E_USER_DEPRECATED);
+
+        return strtr($str, $from, $to);
+    } elseif (!is_array($from)) {
+        throw new Twig_Error_Runtime(sprintf('The "replace" filter expects an array or "Traversable" as replace values, got "%s".',is_object($from) ? get_class($from) : gettype($from)));
+    }
+
+    return strtr($str, $from);
+}
+
+/**
  * Rounds a number.
  *
- * @param int|float     $value     The value to round
- * @param int|float     $precision The rounding precision
- * @param string        $method    The method to use for rounding
+ * @param int|float $value     The value to round
+ * @param int|float $precision The rounding precision
+ * @param string    $method    The method to use for rounding
  *
- * @return int|float     The rounded number
+ * @return int|float The rounded number
  */
 function twig_round($value, $precision = 0, $method = 'common')
 {
@@ -571,11 +575,11 @@ function twig_round($value, $precision = 0, $method = 'common')
  * be used.  Supplying any of the parameters will override the defaults set in the
  * environment object.
  *
- * @param Twig_Environment    $env          A Twig_Environment instance
- * @param mixed               $number       A float/int/string of the number to format
- * @param int                 $decimal      The number of decimal points to display.
- * @param string              $decimalPoint The character(s) to use for the decimal point.
- * @param string              $thousandSep  The character(s) to use for the thousands separator.
+ * @param Twig_Environment $env          A Twig_Environment instance
+ * @param mixed            $number       A float/int/string of the number to format
+ * @param int              $decimal      The number of decimal points to display.
+ * @param string           $decimalPoint The character(s) to use for the decimal point.
+ * @param string           $thousandSep  The character(s) to use for the thousands separator.
  *
  * @return string The formatted number
  */
@@ -617,12 +621,12 @@ function twig_urlencode_filter($url)
     return rawurlencode($url);
 }
 
-if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+if (PHP_VERSION_ID < 50300) {
     /**
      * JSON encodes a variable.
      *
-     * @param mixed   $value   The value to encode.
-     * @param int     $options Not used on PHP 5.2.x
+     * @param mixed $value   The value to encode.
+     * @param int   $options Not used on PHP 5.2.x
      *
      * @return mixed The JSON encoded value
      */
@@ -640,8 +644,8 @@ if (version_compare(PHP_VERSION, '5.3.0', '<')) {
     /**
      * JSON encodes a variable.
      *
-     * @param mixed   $value   The value to encode.
-     * @param int     $options Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT
+     * @param mixed $value   The value to encode.
+     * @param int   $options Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT
      *
      * @return mixed The JSON encoded value
      */
@@ -675,15 +679,23 @@ function _twig_markup2string(&$value)
  *  {# items now contains { 'apple': 'fruit', 'orange': 'fruit', 'peugeot': 'car' } #}
  * </pre>
  *
- * @param array $arr1 An array
- * @param array $arr2 An array
+ * @param array|Traversable $arr1 An array
+ * @param array|Traversable $arr2 An array
  *
  * @return array The merged array
  */
 function twig_array_merge($arr1, $arr2)
 {
-    if (!is_array($arr1) || !is_array($arr2)) {
-        throw new Twig_Error_Runtime(sprintf('The merge filter only works with arrays or hashes; %s and %s given.', gettype($arr1), gettype($arr2)));
+    if ($arr1 instanceof Traversable) {
+        $arr1 = iterator_to_array($arr1);
+    } elseif (!is_array($arr1)) {
+        throw new Twig_Error_Runtime(sprintf('The merge filter only works with arrays or "Traversable", got "%s" as first argument.', gettype($arr1)));
+    }
+
+    if ($arr2 instanceof Traversable) {
+        $arr2 = iterator_to_array($arr2);
+    } elseif (!is_array($arr2)) {
+        throw new Twig_Error_Runtime(sprintf('The merge filter only works with arrays or "Traversable", got "%s" as second argument.', gettype($arr2)));
     }
 
     return array_merge($arr1, $arr2);
@@ -707,8 +719,12 @@ function twig_slice(Twig_Environment $env, $item, $start, $length = null, $prese
             $item = $item->getIterator();
         }
 
-        if ($start >= 0 && $length >= 0) {
-            return iterator_to_array(new LimitIterator($item, $start, $length === null ? -1 : $length), $preserveKeys);
+        if ($start >= 0 && $length >= 0 && $item instanceof Iterator) {
+            try {
+                return iterator_to_array(new LimitIterator($item, $start, $length === null ? -1 : $length), $preserveKeys);
+            } catch (OutOfBoundsException $exception) {
+                return array();
+            }
         }
 
         $item = iterator_to_array($item, $preserveKeys);
@@ -801,9 +817,10 @@ function twig_join_filter($value, $glue = '')
  *  {# returns [aa, bb, cc] #}
  * </pre>
  *
- * @param string  $value     A string
- * @param string  $delimiter The delimiter
- * @param int     $limit     The limit
+ * @param Twig_Environment $env       A Twig_Environment instance
+ * @param string           $value     A string
+ * @param string           $delimiter The delimiter
+ * @param int              $limit     The limit
  *
  * @return array The split string as an array
  */
@@ -837,6 +854,9 @@ function twig_split_filter(Twig_Environment $env, $value, $delimiter, $limit = n
 // The '_default' filter is used internally to avoid using the ternary operator
 // which costs a lot for big contexts (before PHP 5.4). So, on average,
 // a function call is cheaper.
+/**
+ * @internal
+ */
 function _twig_default_filter($value, $default = '')
 {
     if (twig_test_empty($value)) {
@@ -863,7 +883,7 @@ function _twig_default_filter($value, $default = '')
  */
 function twig_get_array_keys_filter($array)
 {
-    if (is_object($array) && $array instanceof Traversable) {
+    if ($array instanceof Traversable) {
         return array_keys(iterator_to_array($array));
     }
 
@@ -885,7 +905,7 @@ function twig_get_array_keys_filter($array)
  */
 function twig_reverse_filter(Twig_Environment $env, $item, $preserveKeys = false)
 {
-    if (is_object($item) && $item instanceof Traversable) {
+    if ($item instanceof Traversable) {
         return array_reverse(iterator_to_array($item), $preserveKeys);
     }
 
@@ -917,28 +937,34 @@ function twig_reverse_filter(Twig_Environment $env, $item, $preserveKeys = false
 /**
  * Sorts an array.
  *
- * @param array $array An array
+ * @param array|Traversable $array
+ *
+ * @return array
  */
 function twig_sort_filter($array)
 {
+    if ($array instanceof Traversable) {
+        $array = iterator_to_array($array);
+    } elseif (!is_array($array)) {
+        throw new Twig_Error_Runtime(sprintf('The sort filter only works with arrays or "Traversable", got "%s".', gettype($array)));
+    }
+
     asort($array);
 
     return $array;
 }
 
-/* used internally */
+/**
+ * @internal
+ */
 function twig_in_filter($value, $compare)
 {
     if (is_array($compare)) {
-        return in_array($value, $compare, is_object($value));
-    } elseif (is_string($compare)) {
-        if (!strlen($value)) {
-            return empty($compare);
-        }
-
-        return false !== strpos($compare, (string) $value);
+        return in_array($value, $compare, is_object($value) || is_resource($value));
+    } elseif (is_string($compare) && (is_string($value) || is_int($value) || is_float($value))) {
+        return '' === $value || false !== strpos($compare, (string) $value);
     } elseif ($compare instanceof Traversable) {
-        return in_array($value, iterator_to_array($compare, false), is_object($value));
+        return in_array($value, iterator_to_array($compare, false), is_object($value) || is_resource($value));
     }
 
     return false;
@@ -952,6 +978,8 @@ function twig_in_filter($value, $compare)
  * @param string           $strategy   The escaping strategy
  * @param string           $charset    The charset
  * @param bool             $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false)
+ *
+ * @return string
  */
 function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false)
 {
@@ -962,7 +990,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
     if (!is_string($string)) {
         if (is_object($string) && method_exists($string, '__toString')) {
             $string = (string) $string;
-        } else {
+        } elseif (in_array($strategy, array('html', 'js', 'css', 'html_attr', 'url'))) {
             return $string;
         }
     }
@@ -1073,9 +1101,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
             return $string;
 
         case 'url':
-            // hackish test to avoid version_compare that is much slower, this works unless PHP releases a 5.10.*
-            // at that point however PHP 5.2.* support can be removed
-            if (PHP_VERSION < '5.3.0') {
+            if (PHP_VERSION_ID < 50300) {
                 return str_replace('%7E', '~', rawurlencode($string));
             }
 
@@ -1098,7 +1124,9 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
     }
 }
 
-/* used internally */
+/**
+ * @internal
+ */
 function twig_escape_filter_is_safe(Twig_Node $filterArgs)
 {
     foreach ($filterArgs as $arg) {
@@ -1188,7 +1216,7 @@ function _twig_escape_html_attr_callback($matches)
     $chr = $matches[0];
     $ord = ord($chr);
 
-    /**
+    /*
      * The following replaces characters undefined in HTML with the
      * hex entity for the Unicode replacement character.
      */
@@ -1196,7 +1224,7 @@ function _twig_escape_html_attr_callback($matches)
         return '&#xFFFD;';
     }
 
-    /**
+    /*
      * Check if the current character to escape has a name entity we should
      * replace it with while grabbing the hex value of the character.
      */
@@ -1212,11 +1240,10 @@ function _twig_escape_html_attr_callback($matches)
         return sprintf('&%s;', $entityMap[$int]);
     }
 
-    /**
+    /*
      * Per OWASP recommendations, we'll use hex entities for any other
      * characters where a named entity does not exist.
      */
-
     return sprintf('&#x%s;', $hex);
 }
 
@@ -1228,7 +1255,7 @@ if (function_exists('mb_get_info')) {
      * @param Twig_Environment $env   A Twig_Environment instance
      * @param mixed            $thing A variable
      *
-     * @return int     The length of the value
+     * @return int The length of the value
      */
     function twig_length_filter(Twig_Environment $env, $thing)
     {
@@ -1296,9 +1323,8 @@ if (function_exists('mb_get_info')) {
      */
     function twig_capitalize_string_filter(Twig_Environment $env, $string)
     {
-        if (null !== ($charset = $env->getCharset())) {
-            return mb_strtoupper(mb_substr($string, 0, 1, $charset), $charset).
-                         mb_strtolower(mb_substr($string, 1, mb_strlen($string, $charset), $charset), $charset);
+        if (null !== $charset = $env->getCharset()) {
+            return mb_strtoupper(mb_substr($string, 0, 1, $charset), $charset).mb_strtolower(mb_substr($string, 1, mb_strlen($string, $charset), $charset), $charset);
         }
 
         return ucfirst(strtolower($string));
@@ -1312,7 +1338,7 @@ else {
      * @param Twig_Environment $env   A Twig_Environment instance
      * @param mixed            $thing A variable
      *
-     * @return int     The length of the value
+     * @return int The length of the value
      */
     function twig_length_filter(Twig_Environment $env, $thing)
     {
@@ -1346,7 +1372,9 @@ else {
     }
 }
 
-/* used internally */
+/**
+ * @internal
+ */
 function twig_ensure_traversable($seq)
 {
     if ($seq instanceof Traversable || is_array($seq)) {
@@ -1368,7 +1396,7 @@ function twig_ensure_traversable($seq)
  *
  * @param mixed $value A variable
  *
- * @return bool    true if the value is empty, false otherwise
+ * @return bool true if the value is empty, false otherwise
  */
 function twig_test_empty($value)
 {
@@ -1391,7 +1419,7 @@ function twig_test_empty($value)
  *
  * @param mixed $value A variable
  *
- * @return bool    true if the value is traversable
+ * @return bool true if the value is traversable
  */
 function twig_test_iterable($value)
 {
@@ -1401,11 +1429,13 @@ function twig_test_iterable($value)
 /**
  * Renders a template.
  *
- * @param string|array $template       The template to render or an array of templates to try consecutively
- * @param array        $variables      The variables to pass to the template
- * @param bool         $with_context   Whether to pass the current context variables or not
- * @param bool         $ignore_missing Whether to ignore missing templates or not
- * @param bool         $sandboxed      Whether to sandbox the template or not
+ * @param Twig_Environment $env
+ * @param array            $context
+ * @param string|array     $template      The template to render or an array of templates to try consecutively
+ * @param array            $variables     The variables to pass to the template
+ * @param bool             $withContext
+ * @param bool             $ignoreMissing Whether to ignore missing templates or not
+ * @param bool             $sandboxed     Whether to sandbox the template or not
  *
  * @return string The rendered template
  */
@@ -1424,10 +1454,15 @@ function twig_include(Twig_Environment $env, $context, $template, $variables = a
         }
     }
 
+    $result = null;
     try {
-        return $env->resolveTemplate($template)->render($variables);
+        $result = $env->resolveTemplate($template)->render($variables);
     } catch (Twig_Error_Loader $e) {
         if (!$ignoreMissing) {
+            if ($isSandboxed && !$alreadySandboxed) {
+                $sandbox->disableSandbox();
+            }
+
             throw $e;
         }
     }
@@ -1435,18 +1470,28 @@ function twig_include(Twig_Environment $env, $context, $template, $variables = a
     if ($isSandboxed && !$alreadySandboxed) {
         $sandbox->disableSandbox();
     }
+
+    return $result;
 }
 
 /**
  * Returns a template content without rendering it.
  *
- * @param string $name The template name
+ * @param Twig_Environment $env
+ * @param string           $name          The template name
+ * @param bool             $ignoreMissing Whether to ignore missing templates or not
  *
  * @return string The template source
  */
-function twig_source(Twig_Environment $env, $name)
+function twig_source(Twig_Environment $env, $name, $ignoreMissing = false)
 {
-    return $env->getLoader()->getSource($name);
+    try {
+        return $env->getLoader()->getSource($name);
+    } catch (Twig_Error_Loader $e) {
+        if (!$ignoreMissing) {
+            throw $e;
+        }
+    }
 }
 
 /**
@@ -1469,9 +1514,9 @@ function twig_constant($constant, $object = null)
 /**
  * Batches item.
  *
- * @param array   $items An array of items
- * @param int     $size  The size of the batch
- * @param mixed   $fill  A value used to fill missing items
+ * @param array $items An array of items
+ * @param int   $size  The size of the batch
+ * @param mixed $fill  A value used to fill missing items
  *
  * @return array
  */
@@ -1485,7 +1530,7 @@ function twig_array_batch($items, $size, $fill = null)
 
     $result = array_chunk($items, $size, true);
 
-    if (null !== $fill) {
+    if (null !== $fill && !empty($result)) {
         $last = count($result) - 1;
         if ($fillCount = $size - count($result[$last])) {
             $result[$last] = array_merge(
diff --git a/vendor/Twig/Extension/Debug.php b/vendor/Twig/Extension/Debug.php
index e3a85bf..42fdb1e 100644
--- a/vendor/Twig/Extension/Debug.php
+++ b/vendor/Twig/Extension/Debug.php
@@ -10,11 +10,6 @@
  */
 class Twig_Extension_Debug extends Twig_Extension
 {
-    /**
-     * Returns a list of global functions to add to the existing list.
-     *
-     * @return array An array of global functions
-     */
     public function getFunctions()
     {
         // dump is safe if var_dump is overridden by xdebug
@@ -32,11 +27,6 @@ class Twig_Extension_Debug extends Twig_Extension
         );
     }
 
-    /**
-     * Returns the name of the extension.
-     *
-     * @return string The extension name
-     */
     public function getName()
     {
         return 'debug';
@@ -62,7 +52,7 @@ function twig_var_dump(Twig_Environment $env, $context)
 
         var_dump($vars);
     } else {
-        for ($i = 2; $i < $count; $i++) {
+        for ($i = 2; $i < $count; ++$i) {
             var_dump(func_get_arg($i));
         }
     }
diff --git a/vendor/Twig/Extension/Escaper.php b/vendor/Twig/Extension/Escaper.php
index d3e5ad0..0e06693 100644
--- a/vendor/Twig/Extension/Escaper.php
+++ b/vendor/Twig/Extension/Escaper.php
@@ -12,36 +12,28 @@ class Twig_Extension_Escaper extends Twig_Extension
 {
     protected $defaultStrategy;
 
+    /**
+     * Constructor.
+     *
+     * @param string|false|callable $defaultStrategy An escaping strategy
+     *
+     * @see setDefaultStrategy()
+     */
     public function __construct($defaultStrategy = 'html')
     {
         $this->setDefaultStrategy($defaultStrategy);
     }
 
-    /**
-     * Returns the token parser instances to add to the existing list.
-     *
-     * @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
-     */
     public function getTokenParsers()
     {
         return array(new Twig_TokenParser_AutoEscape());
     }
 
-    /**
-     * Returns the node visitor instances to add to the existing list.
-     *
-     * @return Twig_NodeVisitorInterface[] An array of Twig_NodeVisitorInterface instances
-     */
     public function getNodeVisitors()
     {
         return array(new Twig_NodeVisitor_Escaper());
     }
 
-    /**
-     * Returns a list of filters to add to the existing list.
-     *
-     * @return array An array of filters
-     */
     public function getFilters()
     {
         return array(
@@ -55,15 +47,21 @@ class Twig_Extension_Escaper extends Twig_Extension
      * The strategy can be a valid PHP callback that takes the template
      * "filename" as an argument and returns the strategy to use.
      *
-     * @param mixed $defaultStrategy An escaping strategy
+     * @param string|false|callable $defaultStrategy An escaping strategy
      */
     public function setDefaultStrategy($defaultStrategy)
     {
         // for BC
         if (true === $defaultStrategy) {
+            @trigger_error('Using "true" as the default strategy is deprecated. Use "html" instead.', E_USER_DEPRECATED);
+
             $defaultStrategy = 'html';
         }
 
+        if ('filename' === $defaultStrategy) {
+            $defaultStrategy = array('Twig_FileExtensionEscapingStrategy', 'guess');
+        }
+
         $this->defaultStrategy = $defaultStrategy;
     }
 
@@ -72,24 +70,19 @@ class Twig_Extension_Escaper extends Twig_Extension
      *
      * @param string $filename The template "filename"
      *
-     * @return string The default strategy to use for the template
+     * @return string|false The default strategy to use for the template
      */
     public function getDefaultStrategy($filename)
     {
         // disable string callables to avoid calling a function named html or js,
         // or any other upcoming escaping strategy
-        if (!is_string($this->defaultStrategy) && is_callable($this->defaultStrategy)) {
+        if (!is_string($this->defaultStrategy) && false !== $this->defaultStrategy) {
             return call_user_func($this->defaultStrategy, $filename);
         }
 
         return $this->defaultStrategy;
     }
 
-    /**
-     * Returns the name of the extension.
-     *
-     * @return string The extension name
-     */
     public function getName()
     {
         return 'escaper';
@@ -100,6 +93,8 @@ class Twig_Extension_Escaper extends Twig_Extension
  * Marks a variable as being safe.
  *
  * @param string $string A PHP variable
+ *
+ * @return string
  */
 function twig_raw_filter($string)
 {
diff --git a/vendor/Twig/Extension/GlobalsInterface.php b/vendor/Twig/Extension/GlobalsInterface.php
new file mode 100644
index 0000000..5370b8e
--- /dev/null
+++ b/vendor/Twig/Extension/GlobalsInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Enables usage of the deprecated Twig_Extension::getGlobals() method.
+ *
+ * Explicitly implement this interface if you really need to implement the
+ * deprecated getGlobals() method in your extensions.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+interface Twig_Extension_GlobalsInterface
+{
+}
diff --git a/vendor/Twig/Extension/InitRuntimeInterface.php b/vendor/Twig/Extension/InitRuntimeInterface.php
new file mode 100644
index 0000000..7a07582
--- /dev/null
+++ b/vendor/Twig/Extension/InitRuntimeInterface.php
@@ -0,0 +1,22 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Enables usage of the deprecated Twig_Extension::initRuntime() method.
+ *
+ * Explicitly implement this interface if you really need to implement the
+ * deprecated initRuntime() method in your extensions.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+interface Twig_Extension_InitRuntimeInterface
+{
+}
diff --git a/vendor/Twig/Extension/Optimizer.php b/vendor/Twig/Extension/Optimizer.php
index 013fcb6..5a64a1a 100644
--- a/vendor/Twig/Extension/Optimizer.php
+++ b/vendor/Twig/Extension/Optimizer.php
@@ -17,17 +17,11 @@ class Twig_Extension_Optimizer extends Twig_Extension
         $this->optimizers = $optimizers;
     }
 
-    /**
-     * {@inheritdoc}
-     */
     public function getNodeVisitors()
     {
         return array(new Twig_NodeVisitor_Optimizer($this->optimizers));
     }
 
-    /**
-     * {@inheritdoc}
-     */
     public function getName()
     {
         return 'optimizer';
diff --git a/vendor/Twig/Extension/Profiler.php b/vendor/Twig/Extension/Profiler.php
new file mode 100644
index 0000000..4d9f97f
--- /dev/null
+++ b/vendor/Twig/Extension/Profiler.php
@@ -0,0 +1,46 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+class Twig_Extension_Profiler extends Twig_Extension
+{
+    private $actives = array();
+
+    public function __construct(Twig_Profiler_Profile $profile)
+    {
+        $this->actives[] = $profile;
+    }
+
+    public function enter(Twig_Profiler_Profile $profile)
+    {
+        $this->actives[0]->addProfile($profile);
+        array_unshift($this->actives, $profile);
+    }
+
+    public function leave(Twig_Profiler_Profile $profile)
+    {
+        $profile->leave();
+        array_shift($this->actives);
+
+        if (1 === count($this->actives)) {
+            $this->actives[0]->leave();
+        }
+    }
+
+    public function getNodeVisitors()
+    {
+        return array(new Twig_Profiler_NodeVisitor_Profiler($this->getName()));
+    }
+
+    public function getName()
+    {
+        return 'profiler';
+    }
+}
diff --git a/vendor/Twig/Extension/Sandbox.php b/vendor/Twig/Extension/Sandbox.php
index c58259c..760d123 100644
--- a/vendor/Twig/Extension/Sandbox.php
+++ b/vendor/Twig/Extension/Sandbox.php
@@ -16,25 +16,15 @@ class Twig_Extension_Sandbox extends Twig_Extension
 
     public function __construct(Twig_Sandbox_SecurityPolicyInterface $policy, $sandboxed = false)
     {
-        $this->policy            = $policy;
+        $this->policy = $policy;
         $this->sandboxedGlobally = $sandboxed;
     }
 
-    /**
-     * Returns the token parser instances to add to the existing list.
-     *
-     * @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
-     */
     public function getTokenParsers()
     {
         return array(new Twig_TokenParser_Sandbox());
     }
 
-    /**
-     * Returns the node visitor instances to add to the existing list.
-     *
-     * @return Twig_NodeVisitorInterface[] An array of Twig_NodeVisitorInterface instances
-     */
     public function getNodeVisitors()
     {
         return array(new Twig_NodeVisitor_Sandbox());
@@ -100,11 +90,6 @@ class Twig_Extension_Sandbox extends Twig_Extension
         return $obj;
     }
 
-    /**
-     * Returns the name of the extension.
-     *
-     * @return string The extension name
-     */
     public function getName()
     {
         return 'sandbox';
diff --git a/vendor/Twig/Extension/Staging.php b/vendor/Twig/Extension/Staging.php
index 8ab0f45..d21004d 100644
--- a/vendor/Twig/Extension/Staging.php
+++ b/vendor/Twig/Extension/Staging.php
@@ -15,6 +15,8 @@
  * This class is used by Twig_Environment as a staging area and must not be used directly.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
+ * @internal
  */
 class Twig_Extension_Staging extends Twig_Extension
 {
@@ -30,9 +32,6 @@ class Twig_Extension_Staging extends Twig_Extension
         $this->functions[$name] = $function;
     }
 
-    /**
-     * {@inheritdoc}
-     */
     public function getFunctions()
     {
         return $this->functions;
@@ -43,9 +42,6 @@ class Twig_Extension_Staging extends Twig_Extension
         $this->filters[$name] = $filter;
     }
 
-    /**
-     * {@inheritdoc}
-     */
     public function getFilters()
     {
         return $this->filters;
@@ -56,9 +52,6 @@ class Twig_Extension_Staging extends Twig_Extension
         $this->visitors[] = $visitor;
     }
 
-    /**
-     * {@inheritdoc}
-     */
     public function getNodeVisitors()
     {
         return $this->visitors;
@@ -69,9 +62,6 @@ class Twig_Extension_Staging extends Twig_Extension
         $this->tokenParsers[] = $parser;
     }
 
-    /**
-     * {@inheritdoc}
-     */
     public function getTokenParsers()
     {
         return $this->tokenParsers;
@@ -82,9 +72,6 @@ class Twig_Extension_Staging extends Twig_Extension
         $this->globals[$name] = $value;
     }
 
-    /**
-     * {@inheritdoc}
-     */
     public function getGlobals()
     {
         return $this->globals;
@@ -95,17 +82,11 @@ class Twig_Extension_Staging extends Twig_Extension
         $this->tests[$name] = $test;
     }
 
-    /**
-     * {@inheritdoc}
-     */
     public function getTests()
     {
         return $this->tests;
     }
 
-    /**
-     * {@inheritdoc}
-     */
     public function getName()
     {
         return 'staging';
diff --git a/vendor/Twig/Extension/StringLoader.php b/vendor/Twig/Extension/StringLoader.php
index 5e1a60d..2a3ddb6 100644
--- a/vendor/Twig/Extension/StringLoader.php
+++ b/vendor/Twig/Extension/StringLoader.php
@@ -10,9 +10,6 @@
  */
 class Twig_Extension_StringLoader extends Twig_Extension
 {
-    /**
-     * {@inheritdoc}
-     */
     public function getFunctions()
     {
         return array(
@@ -20,9 +17,6 @@ class Twig_Extension_StringLoader extends Twig_Extension
         );
     }
 
-    /**
-     * {@inheritdoc}
-     */
     public function getName()
     {
         return 'string_loader';
@@ -37,28 +31,11 @@ class Twig_Extension_StringLoader extends Twig_Extension
  * </pre>
  *
  * @param Twig_Environment $env      A Twig_Environment instance
- * @param string           $template A template as a string
+ * @param string           $template A template as a string or object implementing __toString()
  *
  * @return Twig_Template A Twig_Template instance
  */
 function twig_template_from_string(Twig_Environment $env, $template)
 {
-    $name = sprintf('__string_template__%s', hash('sha256', uniqid(mt_rand(), true), false));
-
-    $loader = new Twig_Loader_Chain(array(
-        new Twig_Loader_Array(array($name => $template)),
-        $current = $env->getLoader(),
-    ));
-
-    $env->setLoader($loader);
-    try {
-        $template = $env->loadTemplate($name);
-    } catch (Exception $e) {
-        $env->setLoader($current);
-
-        throw $e;
-    }
-    $env->setLoader($current);
-
-    return $template;
+    return $env->createTemplate((string) $template);
 }
diff --git a/vendor/Twig/ExtensionInterface.php b/vendor/Twig/ExtensionInterface.php
index 49541b0..5cf3f46 100644
--- a/vendor/Twig/ExtensionInterface.php
+++ b/vendor/Twig/ExtensionInterface.php
@@ -22,13 +22,15 @@ interface Twig_ExtensionInterface
      * This is where you can load some file that contains filter functions for instance.
      *
      * @param Twig_Environment $environment The current Twig_Environment instance
+     *
+     * @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_InitRuntimeInterace instead
      */
     public function initRuntime(Twig_Environment $environment);
 
     /**
      * Returns the token parser instances to add to the existing list.
      *
-     * @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
+     * @return Twig_TokenParserInterface[]
      */
     public function getTokenParsers();
 
@@ -42,21 +44,21 @@ interface Twig_ExtensionInterface
     /**
      * Returns a list of filters to add to the existing list.
      *
-     * @return array An array of filters
+     * @return Twig_SimpleFilter[]
      */
     public function getFilters();
 
     /**
      * Returns a list of tests to add to the existing list.
      *
-     * @return array An array of tests
+     * @return Twig_SimpleTest[]
      */
     public function getTests();
 
     /**
      * Returns a list of functions to add to the existing list.
      *
-     * @return array An array of functions
+     * @return Twig_SimpleFunction[]
      */
     public function getFunctions();
 
@@ -71,6 +73,8 @@ interface Twig_ExtensionInterface
      * Returns a list of global variables to add to the existing list.
      *
      * @return array An array of global variables
+     *
+     * @deprecated since 1.23 (to be removed in 2.0), implement Twig_Extension_GlobalsInterface instead
      */
     public function getGlobals();
 
diff --git a/vendor/Twig/FileExtensionEscapingStrategy.php b/vendor/Twig/FileExtensionEscapingStrategy.php
new file mode 100644
index 0000000..9bda0b4
--- /dev/null
+++ b/vendor/Twig/FileExtensionEscapingStrategy.php
@@ -0,0 +1,58 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Default autoescaping strategy based on file names.
+ *
+ * This strategy sets the HTML as the default autoescaping strategy,
+ * but changes it based on the filename.
+ *
+ * Note that there is no runtime performance impact as the
+ * default autoescaping strategy is set at compilation time.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_FileExtensionEscapingStrategy
+{
+    /**
+     * Guesses the best autoescaping strategy based on the file name.
+     *
+     * @param string $filename The template file name
+     *
+     * @return string|false The escaping strategy name to use or false to disable
+     */
+    public static function guess($filename)
+    {
+        if (in_array(substr($filename, -1), array('/', '\\'))) {
+            return 'html'; // return html for directories
+        }
+
+        if ('.twig' === substr($filename, -5)) {
+            $filename = substr($filename, 0, -5);
+        }
+
+        $extension = pathinfo($filename, PATHINFO_EXTENSION);
+
+        switch ($extension) {
+            case 'js':
+                return 'js';
+
+            case 'css':
+                return 'css';
+
+            case 'txt':
+                return false;
+
+            default:
+                return 'html';
+        }
+    }
+}
diff --git a/vendor/Twig/Filter.php b/vendor/Twig/Filter.php
index 5cfbb66..101d2e7 100644
--- a/vendor/Twig/Filter.php
+++ b/vendor/Twig/Filter.php
@@ -9,12 +9,15 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Filter class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead.', E_USER_DEPRECATED);
+
 /**
  * Represents a template filter.
  *
  * Use Twig_SimpleFilter instead.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 abstract class Twig_Filter implements Twig_FilterInterface, Twig_FilterCallableInterface
@@ -26,10 +29,10 @@ abstract class Twig_Filter implements Twig_FilterInterface, Twig_FilterCallableI
     {
         $this->options = array_merge(array(
             'needs_environment' => false,
-            'needs_context'     => false,
-            'pre_escape'        => null,
-            'preserves_safety'  => null,
-            'callable'          => null,
+            'needs_context' => false,
+            'pre_escape' => null,
+            'preserves_safety' => null,
+            'callable' => null,
         ), $options);
     }
 
diff --git a/vendor/Twig/Filter/Function.php b/vendor/Twig/Filter/Function.php
index ad374a5..d679cab 100644
--- a/vendor/Twig/Filter/Function.php
+++ b/vendor/Twig/Filter/Function.php
@@ -9,12 +9,15 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Filter_Function class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead.', E_USER_DEPRECATED);
+
 /**
  * Represents a function template filter.
  *
  * Use Twig_SimpleFilter instead.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 class Twig_Filter_Function extends Twig_Filter
diff --git a/vendor/Twig/Filter/Method.php b/vendor/Twig/Filter/Method.php
index 63c8c3b..655aab4 100644
--- a/vendor/Twig/Filter/Method.php
+++ b/vendor/Twig/Filter/Method.php
@@ -9,12 +9,15 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Filter_Method class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead.', E_USER_DEPRECATED);
+
 /**
  * Represents a method template filter.
  *
  * Use Twig_SimpleFilter instead.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 class Twig_Filter_Method extends Twig_Filter
diff --git a/vendor/Twig/Filter/Node.php b/vendor/Twig/Filter/Node.php
index 8744c5e..a922f50 100644
--- a/vendor/Twig/Filter/Node.php
+++ b/vendor/Twig/Filter/Node.php
@@ -9,12 +9,15 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Filter_Node class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead.', E_USER_DEPRECATED);
+
 /**
  * Represents a template filter as a node.
  *
  * Use Twig_SimpleFilter instead.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 class Twig_Filter_Node extends Twig_Filter
diff --git a/vendor/Twig/FilterCallableInterface.php b/vendor/Twig/FilterCallableInterface.php
index 145534d..5679861 100644
--- a/vendor/Twig/FilterCallableInterface.php
+++ b/vendor/Twig/FilterCallableInterface.php
@@ -15,6 +15,7 @@
  * Use Twig_SimpleFilter instead.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 interface Twig_FilterCallableInterface
diff --git a/vendor/Twig/FilterInterface.php b/vendor/Twig/FilterInterface.php
index 5319ecc..6b0be0e 100644
--- a/vendor/Twig/FilterInterface.php
+++ b/vendor/Twig/FilterInterface.php
@@ -15,6 +15,7 @@
  * Use Twig_SimpleFilter instead.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 interface Twig_FilterInterface
diff --git a/vendor/Twig/Function.php b/vendor/Twig/Function.php
index b5ffb2b..9fc76a8 100644
--- a/vendor/Twig/Function.php
+++ b/vendor/Twig/Function.php
@@ -9,12 +9,15 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Function class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFunction instead.', E_USER_DEPRECATED);
+
 /**
  * Represents a template function.
  *
  * Use Twig_SimpleFunction instead.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 abstract class Twig_Function implements Twig_FunctionInterface, Twig_FunctionCallableInterface
@@ -26,8 +29,8 @@ abstract class Twig_Function implements Twig_FunctionInterface, Twig_FunctionCal
     {
         $this->options = array_merge(array(
             'needs_environment' => false,
-            'needs_context'     => false,
-            'callable'          => null,
+            'needs_context' => false,
+            'callable' => null,
         ), $options);
     }
 
diff --git a/vendor/Twig/Function/Function.php b/vendor/Twig/Function/Function.php
index d1e1b96..ae83e15 100644
--- a/vendor/Twig/Function/Function.php
+++ b/vendor/Twig/Function/Function.php
@@ -10,12 +10,15 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Function_Function class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFunction instead.', E_USER_DEPRECATED);
+
 /**
  * Represents a function template function.
  *
  * Use Twig_SimpleFunction instead.
  *
  * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 class Twig_Function_Function extends Twig_Function
diff --git a/vendor/Twig/Function/Method.php b/vendor/Twig/Function/Method.php
index 67039a9..ba9945e 100644
--- a/vendor/Twig/Function/Method.php
+++ b/vendor/Twig/Function/Method.php
@@ -10,12 +10,15 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Function_Method class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFunction instead.', E_USER_DEPRECATED);
+
 /**
  * Represents a method template function.
  *
  * Use Twig_SimpleFunction instead.
  *
  * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 class Twig_Function_Method extends Twig_Function
diff --git a/vendor/Twig/Function/Node.php b/vendor/Twig/Function/Node.php
index 06a0d0d..118b0ba 100644
--- a/vendor/Twig/Function/Node.php
+++ b/vendor/Twig/Function/Node.php
@@ -9,12 +9,15 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Function_Node class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFunction instead.', E_USER_DEPRECATED);
+
 /**
  * Represents a template function as a node.
  *
  * Use Twig_SimpleFunction instead.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 class Twig_Function_Node extends Twig_Function
diff --git a/vendor/Twig/FunctionCallableInterface.php b/vendor/Twig/FunctionCallableInterface.php
index 0aab4f5..87d795e 100644
--- a/vendor/Twig/FunctionCallableInterface.php
+++ b/vendor/Twig/FunctionCallableInterface.php
@@ -15,6 +15,7 @@
  * Use Twig_SimpleFunction instead.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 interface Twig_FunctionCallableInterface
diff --git a/vendor/Twig/FunctionInterface.php b/vendor/Twig/FunctionInterface.php
index 67f4f89..f449234 100644
--- a/vendor/Twig/FunctionInterface.php
+++ b/vendor/Twig/FunctionInterface.php
@@ -16,6 +16,7 @@
  * Use Twig_SimpleFunction instead.
  *
  * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 interface Twig_FunctionInterface
diff --git a/vendor/Twig/Lexer.php b/vendor/Twig/Lexer.php
index ad3ec7d..575b4f3 100644
--- a/vendor/Twig/Lexer.php
+++ b/vendor/Twig/Lexer.php
@@ -33,42 +33,42 @@ class Twig_Lexer implements Twig_LexerInterface
     protected $positions;
     protected $currentVarBlockLine;
 
-    const STATE_DATA            = 0;
-    const STATE_BLOCK           = 1;
-    const STATE_VAR             = 2;
-    const STATE_STRING          = 3;
-    const STATE_INTERPOLATION   = 4;
-
-    const REGEX_NAME            = '/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A';
-    const REGEX_NUMBER          = '/[0-9]+(?:\.[0-9]+)?/A';
-    const REGEX_STRING          = '/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As';
+    const STATE_DATA = 0;
+    const STATE_BLOCK = 1;
+    const STATE_VAR = 2;
+    const STATE_STRING = 3;
+    const STATE_INTERPOLATION = 4;
+
+    const REGEX_NAME = '/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A';
+    const REGEX_NUMBER = '/[0-9]+(?:\.[0-9]+)?/A';
+    const REGEX_STRING = '/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As';
     const REGEX_DQ_STRING_DELIM = '/"/A';
-    const REGEX_DQ_STRING_PART  = '/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As';
-    const PUNCTUATION           = '()[]{}?:.,|';
+    const REGEX_DQ_STRING_PART = '/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As';
+    const PUNCTUATION = '()[]{}?:.,|';
 
     public function __construct(Twig_Environment $env, array $options = array())
     {
         $this->env = $env;
 
         $this->options = array_merge(array(
-            'tag_comment'     => array('{#', '#}'),
-            'tag_block'       => array('{%', '%}'),
-            'tag_variable'    => array('{{', '}}'),
+            'tag_comment' => array('{#', '#}'),
+            'tag_block' => array('{%', '%}'),
+            'tag_variable' => array('{{', '}}'),
             'whitespace_trim' => '-',
-            'interpolation'   => array('#{', '}'),
+            'interpolation' => array('#{', '}'),
         ), $options);
 
         $this->regexes = array(
-            'lex_var'             => '/\s*'.preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_variable'][1], '/').'/A',
-            'lex_block'           => '/\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')\n?/A',
-            'lex_raw_data'        => '/('.preg_quote($this->options['tag_block'][0].$this->options['whitespace_trim'], '/').'|'.preg_quote($this->options['tag_block'][0], '/').')\s*(?:end%s)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/s',
-            'operator'            => $this->getOperatorRegex(),
-            'lex_comment'         => '/(?:'.preg_quote($this->options['whitespace_trim'], '/').preg_quote($this->options['tag_comment'][1], '/').'\s*|'.preg_quote($this->options['tag_comment'][1], '/').')\n?/s',
-            'lex_block_raw'       => '/\s*(raw|verbatim)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/As',
-            'lex_block_line'      => '/\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1], '/').'/As',
-            'lex_tokens_start'    => '/('.preg_quote($this->options['tag_variable'][0], '/').'|'.preg_quote($this->options['tag_block'][0], '/').'|'.preg_quote($this->options['tag_comment'][0], '/').')('.preg_quote($this->options['whitespace_trim'], '/').')?/s',
+            'lex_var' => '/\s*'.preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_variable'][1], '/').'/A',
+            'lex_block' => '/\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')\n?/A',
+            'lex_raw_data' => '/('.preg_quote($this->options['tag_block'][0].$this->options['whitespace_trim'], '/').'|'.preg_quote($this->options['tag_block'][0], '/').')\s*(?:end%s)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/s',
+            'operator' => $this->getOperatorRegex(),
+            'lex_comment' => '/(?:'.preg_quote($this->options['whitespace_trim'], '/').preg_quote($this->options['tag_comment'][1], '/').'\s*|'.preg_quote($this->options['tag_comment'][1], '/').')\n?/s',
+            'lex_block_raw' => '/\s*(raw|verbatim)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/As',
+            'lex_block_line' => '/\s*line\s+(\d+)\s*'.preg_quote($this->options['tag_block'][1], '/').'/As',
+            'lex_tokens_start' => '/('.preg_quote($this->options['tag_variable'][0], '/').'|'.preg_quote($this->options['tag_block'][0], '/').'|'.preg_quote($this->options['tag_comment'][0], '/').')('.preg_quote($this->options['whitespace_trim'], '/').')?/s',
             'interpolation_start' => '/'.preg_quote($this->options['interpolation'][0], '/').'\s*/A',
-            'interpolation_end'   => '/\s*'.preg_quote($this->options['interpolation'][1], '/').'/A',
+            'interpolation_end' => '/\s*'.preg_quote($this->options['interpolation'][1], '/').'/A',
         );
     }
 
@@ -129,7 +129,7 @@ class Twig_Lexer implements Twig_LexerInterface
 
         if (!empty($this->brackets)) {
             list($expect, $lineno) = array_pop($this->brackets);
-            throw new Twig_Error_Syntax(sprintf('Unclosed "%s"', $expect), $lineno, $this->filename);
+            throw new Twig_Error_Syntax(sprintf('Unclosed "%s".', $expect), $lineno, $this->filename);
         }
 
         if ($mbEncoding) {
@@ -224,7 +224,7 @@ class Twig_Lexer implements Twig_LexerInterface
             $this->moveCursor($match[0]);
 
             if ($this->cursor >= $this->end) {
-                throw new Twig_Error_Syntax(sprintf('Unclosed "%s"', $this->state === self::STATE_BLOCK ? 'block' : 'variable'), $this->currentVarBlockLine, $this->filename);
+                throw new Twig_Error_Syntax(sprintf('Unclosed "%s".', $this->state === self::STATE_BLOCK ? 'block' : 'variable'), $this->currentVarBlockLine, $this->filename);
             }
         }
 
@@ -256,12 +256,12 @@ class Twig_Lexer implements Twig_LexerInterface
             // closing bracket
             elseif (false !== strpos(')]}', $this->code[$this->cursor])) {
                 if (empty($this->brackets)) {
-                    throw new Twig_Error_Syntax(sprintf('Unexpected "%s"', $this->code[$this->cursor]), $this->lineno, $this->filename);
+                    throw new Twig_Error_Syntax(sprintf('Unexpected "%s".', $this->code[$this->cursor]), $this->lineno, $this->filename);
                 }
 
                 list($expect, $lineno) = array_pop($this->brackets);
                 if ($this->code[$this->cursor] != strtr($expect, '([{', ')]}')) {
-                    throw new Twig_Error_Syntax(sprintf('Unclosed "%s"', $expect), $lineno, $this->filename);
+                    throw new Twig_Error_Syntax(sprintf('Unclosed "%s".', $expect), $lineno, $this->filename);
                 }
             }
 
@@ -281,14 +281,18 @@ class Twig_Lexer implements Twig_LexerInterface
         }
         // unlexable
         else {
-            throw new Twig_Error_Syntax(sprintf('Unexpected character "%s"', $this->code[$this->cursor]), $this->lineno, $this->filename);
+            throw new Twig_Error_Syntax(sprintf('Unexpected character "%s".', $this->code[$this->cursor]), $this->lineno, $this->filename);
         }
     }
 
     protected function lexRawData($tag)
     {
+        if ('raw' === $tag) {
+            @trigger_error(sprintf('Twig Tag "raw" is deprecated. Use "verbatim" instead in %s at line %d.', $this->filename, $this->lineno), E_USER_DEPRECATED);
+        }
+
         if (!preg_match(str_replace('%s', $tag, $this->regexes['lex_raw_data']), $this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) {
-            throw new Twig_Error_Syntax(sprintf('Unexpected end of file: Unclosed "%s" block', $tag), $this->lineno, $this->filename);
+            throw new Twig_Error_Syntax(sprintf('Unexpected end of file: Unclosed "%s" block.', $tag), $this->lineno, $this->filename);
         }
 
         $text = substr($this->code, $this->cursor, $match[0][1] - $this->cursor);
@@ -304,7 +308,7 @@ class Twig_Lexer implements Twig_LexerInterface
     protected function lexComment()
     {
         if (!preg_match($this->regexes['lex_comment'], $this->code, $match, PREG_OFFSET_CAPTURE, $this->cursor)) {
-            throw new Twig_Error_Syntax('Unclosed comment', $this->lineno, $this->filename);
+            throw new Twig_Error_Syntax('Unclosed comment.', $this->lineno, $this->filename);
         }
 
         $this->moveCursor(substr($this->code, $this->cursor, $match[0][1] - $this->cursor).$match[0][0]);
@@ -317,15 +321,13 @@ class Twig_Lexer implements Twig_LexerInterface
             $this->pushToken(Twig_Token::INTERPOLATION_START_TYPE);
             $this->moveCursor($match[0]);
             $this->pushState(self::STATE_INTERPOLATION);
-
         } elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, null, $this->cursor) && strlen($match[0]) > 0) {
             $this->pushToken(Twig_Token::STRING_TYPE, stripcslashes($match[0]));
             $this->moveCursor($match[0]);
-
         } elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, null, $this->cursor)) {
             list($expect, $lineno) = array_pop($this->brackets);
             if ($this->code[$this->cursor] != '"') {
-                throw new Twig_Error_Syntax(sprintf('Unclosed "%s"', $expect), $lineno, $this->filename);
+                throw new Twig_Error_Syntax(sprintf('Unclosed "%s".', $expect), $lineno, $this->filename);
             }
 
             $this->popState();
diff --git a/vendor/Twig/Loader/Array.php b/vendor/Twig/Loader/Array.php
index 436edd8..90221d5 100644
--- a/vendor/Twig/Loader/Array.php
+++ b/vendor/Twig/Loader/Array.php
@@ -29,8 +29,6 @@ class Twig_Loader_Array implements Twig_LoaderInterface, Twig_ExistsLoaderInterf
      * Constructor.
      *
      * @param array $templates An array of templates (keys are the names, and values are the source code)
-     *
-     * @see Twig_Loader
      */
     public function __construct(array $templates)
     {
diff --git a/vendor/Twig/Loader/Chain.php b/vendor/Twig/Loader/Chain.php
index 7919eda..81d57ad 100644
--- a/vendor/Twig/Loader/Chain.php
+++ b/vendor/Twig/Loader/Chain.php
@@ -60,7 +60,7 @@ class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterf
             }
         }
 
-        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined (%s).', $name, implode(', ', $exceptions)));
+        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : ''));
     }
 
     /**
@@ -112,7 +112,7 @@ class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterf
             }
         }
 
-        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined (%s).', $name, implode(' ', $exceptions)));
+        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : ''));
     }
 
     /**
@@ -133,6 +133,6 @@ class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterf
             }
         }
 
-        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined (%s).', $name, implode(' ', $exceptions)));
+        throw new Twig_Error_Loader(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : ''));
     }
 }
diff --git a/vendor/Twig/Loader/Filesystem.php b/vendor/Twig/Loader/Filesystem.php
index d0ae1cc..1bc75a1 100644
--- a/vendor/Twig/Loader/Filesystem.php
+++ b/vendor/Twig/Loader/Filesystem.php
@@ -21,6 +21,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI
 
     protected $paths = array();
     protected $cache = array();
+    protected $errorCache = array();
 
     /**
      * Constructor.
@@ -87,7 +88,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI
     public function addPath($path, $namespace = self::MAIN_NAMESPACE)
     {
         // invalidate the cache
-        $this->cache = array();
+        $this->cache = $this->errorCache = array();
 
         if (!is_dir($path)) {
             throw new Twig_Error_Loader(sprintf('The "%s" directory does not exist.', $path));
@@ -107,7 +108,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI
     public function prependPath($path, $namespace = self::MAIN_NAMESPACE)
     {
         // invalidate the cache
-        $this->cache = array();
+        $this->cache = $this->errorCache = array();
 
         if (!is_dir($path)) {
             throw new Twig_Error_Loader(sprintf('The "%s" directory does not exist.', $path));
@@ -150,9 +151,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI
         }
 
         try {
-            $this->findTemplate($name);
-
-            return true;
+            return false !== $this->findTemplate($name, false);
         } catch (Twig_Error_Loader $exception) {
             return false;
         }
@@ -168,27 +167,52 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI
 
     protected function findTemplate($name)
     {
+        $throw = func_num_args() > 1 ? func_get_arg(1) : true;
         $name = $this->normalizeName($name);
 
         if (isset($this->cache[$name])) {
             return $this->cache[$name];
         }
 
+        if (isset($this->errorCache[$name])) {
+            if (!$throw) {
+                return false;
+            }
+
+            throw new Twig_Error_Loader($this->errorCache[$name]);
+        }
+
         $this->validateName($name);
 
         list($namespace, $shortname) = $this->parseName($name);
 
         if (!isset($this->paths[$namespace])) {
-            throw new Twig_Error_Loader(sprintf('There are no registered paths for namespace "%s".', $namespace));
+            $this->errorCache[$name] = sprintf('There are no registered paths for namespace "%s".', $namespace);
+
+            if (!$throw) {
+                return false;
+            }
+
+            throw new Twig_Error_Loader($this->errorCache[$name]);
         }
 
         foreach ($this->paths[$namespace] as $path) {
             if (is_file($path.'/'.$shortname)) {
+                if (false !== $realpath = realpath($path.'/'.$shortname)) {
+                    return $this->cache[$name] = $realpath;
+                }
+
                 return $this->cache[$name] = $path.'/'.$shortname;
             }
         }
 
-        throw new Twig_Error_Loader(sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace])));
+        $this->errorCache[$name] = sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace]));
+
+        if (!$throw) {
+            return false;
+        }
+
+        throw new Twig_Error_Loader($this->errorCache[$name]);
     }
 
     protected function parseName($name, $default = self::MAIN_NAMESPACE)
@@ -209,7 +233,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI
 
     protected function normalizeName($name)
     {
-        return preg_replace('#/{2,}#', '/', strtr((string) $name, '\\', '/'));
+        return preg_replace('#/{2,}#', '/', str_replace('\\', '/', (string) $name));
     }
 
     protected function validateName($name)
diff --git a/vendor/Twig/Loader/String.php b/vendor/Twig/Loader/String.php
index 2099c09..00f507a 100644
--- a/vendor/Twig/Loader/String.php
+++ b/vendor/Twig/Loader/String.php
@@ -9,6 +9,8 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Loader_String class is deprecated since version 1.18.1 and will be removed in 2.0. Use Twig_Loader_Array instead or Twig_Environment::createTemplate().', E_USER_DEPRECATED);
+
 /**
  * Loads a template from a string.
  *
@@ -19,6 +21,10 @@
  * source code of the template). If you don't want to see your cache grows out of
  * control, you need to take care of clearing the old cache file by yourself.
  *
+ * @deprecated since 1.18.1 (to be removed in 2.0)
+ *
+ * @internal
+ *
  * @author Fabien Potencier <fabien@symfony.com>
  */
 class Twig_Loader_String implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
diff --git a/vendor/Twig/LoaderInterface.php b/vendor/Twig/LoaderInterface.php
index 4405291..544ea4e 100644
--- a/vendor/Twig/LoaderInterface.php
+++ b/vendor/Twig/LoaderInterface.php
@@ -41,10 +41,11 @@ interface Twig_LoaderInterface
     /**
      * Returns true if the template is still fresh.
      *
-     * @param string    $name The template name
-     * @param timestamp $time The last modification time of the cached template
+     * @param string $name The template name
+     * @param int    $time Timestamp of the last modification time of the
+     *                     cached template
      *
-     * @return bool    true if the template is fresh, false otherwise
+     * @return bool true if the template is fresh, false otherwise
      *
      * @throws Twig_Error_Loader When $name is not found
      */
diff --git a/vendor/Twig/Node.php b/vendor/Twig/Node.php
index 20af544..45a8976 100644
--- a/vendor/Twig/Node.php
+++ b/vendor/Twig/Node.php
@@ -28,10 +28,10 @@ class Twig_Node implements Twig_NodeInterface
      * The nodes are automatically made available as properties ($this->node).
      * The attributes are automatically made available as array items ($this['name']).
      *
-     * @param array   $nodes      An array of named nodes
-     * @param array   $attributes An array of attributes (should not be nodes)
-     * @param int     $lineno     The line number
-     * @param string  $tag        The tag name associated with the Node
+     * @param array  $nodes      An array of named nodes
+     * @param array  $attributes An array of attributes (should not be nodes)
+     * @param int    $lineno     The line number
+     * @param string $tag        The tag name associated with the Node
      */
     public function __construct(array $nodes = array(), array $attributes = array(), $lineno = 0, $tag = null)
     {
@@ -74,6 +74,8 @@ class Twig_Node implements Twig_NodeInterface
      */
     public function toXml($asDom = false)
     {
+        @trigger_error(sprintf('%s is deprecated.', __METHOD__), E_USER_DEPRECATED);
+
         $dom = new DOMDocument('1.0', 'UTF-8');
         $dom->formatOutput = true;
         $dom->appendChild($xml = $dom->createElement('twig'));
@@ -99,7 +101,7 @@ class Twig_Node implements Twig_NodeInterface
             $node->appendChild($child);
         }
 
-        return $asDom ? $dom : $dom->saveXml();
+        return $asDom ? $dom : $dom->saveXML();
     }
 
     public function compile(Twig_Compiler $compiler)
@@ -122,9 +124,9 @@ class Twig_Node implements Twig_NodeInterface
     /**
      * Returns true if the attribute is defined.
      *
-     * @param  string  The attribute name
+     * @param string $name The attribute name
      *
-     * @return bool    true if the attribute is defined, false otherwise
+     * @return bool true if the attribute is defined, false otherwise
      */
     public function hasAttribute($name)
     {
@@ -132,11 +134,11 @@ class Twig_Node implements Twig_NodeInterface
     }
 
     /**
-     * Gets an attribute.
+     * Gets an attribute value by name.
      *
-     * @param  string The attribute name
+     * @param string $name
      *
-     * @return mixed The attribute value
+     * @return mixed
      */
     public function getAttribute($name)
     {
@@ -148,10 +150,10 @@ class Twig_Node implements Twig_NodeInterface
     }
 
     /**
-     * Sets an attribute.
+     * Sets an attribute by name to a value.
      *
-     * @param string The attribute name
-     * @param mixed  The attribute value
+     * @param string $name
+     * @param mixed  $value
      */
     public function setAttribute($name, $value)
     {
@@ -159,9 +161,9 @@ class Twig_Node implements Twig_NodeInterface
     }
 
     /**
-     * Removes an attribute.
+     * Removes an attribute by name.
      *
-     * @param string The attribute name
+     * @param string $name
      */
     public function removeAttribute($name)
     {
@@ -169,11 +171,11 @@ class Twig_Node implements Twig_NodeInterface
     }
 
     /**
-     * Returns true if the node with the given identifier exists.
+     * Returns true if the node with the given name exists.
      *
-     * @param  string  The node name
+     * @param string $name
      *
-     * @return bool    true if the node with the given name exists, false otherwise
+     * @return bool
      */
     public function hasNode($name)
     {
@@ -183,9 +185,9 @@ class Twig_Node implements Twig_NodeInterface
     /**
      * Gets a node by name.
      *
-     * @param  string The node name
+     * @param string $name
      *
-     * @return Twig_Node A Twig_Node instance
+     * @return Twig_Node
      */
     public function getNode($name)
     {
@@ -199,8 +201,8 @@ class Twig_Node implements Twig_NodeInterface
     /**
      * Sets a node.
      *
-     * @param string    The node name
-     * @param Twig_Node A Twig_Node instance
+     * @param string    $name
+     * @param Twig_Node $node
      */
     public function setNode($name, $node = null)
     {
@@ -210,7 +212,7 @@ class Twig_Node implements Twig_NodeInterface
     /**
      * Removes a node by name.
      *
-     * @param string The node name
+     * @param string $name
      */
     public function removeNode($name)
     {
diff --git a/vendor/Twig/Node/AutoEscape.php b/vendor/Twig/Node/AutoEscape.php
index fcabf90..47cc998 100644
--- a/vendor/Twig/Node/AutoEscape.php
+++ b/vendor/Twig/Node/AutoEscape.php
@@ -27,11 +27,6 @@ class Twig_Node_AutoEscape extends Twig_Node
         parent::__construct(array('body' => $body), array('value' => $value), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler->subcompile($this->getNode('body'));
diff --git a/vendor/Twig/Node/Block.php b/vendor/Twig/Node/Block.php
index 989e4a0..a05af6f 100644
--- a/vendor/Twig/Node/Block.php
+++ b/vendor/Twig/Node/Block.php
@@ -22,11 +22,6 @@ class Twig_Node_Block extends Twig_Node
         parent::__construct(array('body' => $body), array('name' => $name), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/BlockReference.php b/vendor/Twig/Node/BlockReference.php
index a05ea04..9cd1551 100644
--- a/vendor/Twig/Node/BlockReference.php
+++ b/vendor/Twig/Node/BlockReference.php
@@ -22,11 +22,6 @@ class Twig_Node_BlockReference extends Twig_Node implements Twig_NodeOutputInter
         parent::__construct(array(), array('name' => $name), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/SandboxedModule.php b/vendor/Twig/Node/CheckSecurity.php
similarity index 67%
rename from vendor/Twig/Node/SandboxedModule.php
rename to vendor/Twig/Node/CheckSecurity.php
index 410332c..b4a436a 100644
--- a/vendor/Twig/Node/SandboxedModule.php
+++ b/vendor/Twig/Node/CheckSecurity.php
@@ -3,46 +3,32 @@
 /*
  * This file is part of Twig.
  *
- * (c) 2009 Fabien Potencier
- * (c) 2009 Armin Ronacher
+ * (c) 2015 Fabien Potencier
  *
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
  */
 
 /**
- * Represents a module node.
- *
  * @author Fabien Potencier <fabien@symfony.com>
  */
-class Twig_Node_SandboxedModule extends Twig_Node_Module
+class Twig_Node_CheckSecurity extends Twig_Node
 {
     protected $usedFilters;
     protected $usedTags;
     protected $usedFunctions;
 
-    public function __construct(Twig_Node_Module $node, array $usedFilters, array $usedTags, array $usedFunctions)
+    public function __construct(array $usedFilters, array $usedTags, array $usedFunctions)
     {
-        parent::__construct($node->getNode('body'), $node->getNode('parent'), $node->getNode('blocks'), $node->getNode('macros'), $node->getNode('traits'), $node->getAttribute('embedded_templates'), $node->getAttribute('filename'));
-
-        $this->setAttribute('index', $node->getAttribute('index'));
-
         $this->usedFilters = $usedFilters;
         $this->usedTags = $usedTags;
         $this->usedFunctions = $usedFunctions;
-    }
 
-    protected function compileDisplayBody(Twig_Compiler $compiler)
-    {
-        $compiler->write("\$this->checkSecurity();\n");
-
-        parent::compileDisplayBody($compiler);
+        parent::__construct();
     }
 
-    protected function compileDisplayFooter(Twig_Compiler $compiler)
+    public function compile(Twig_Compiler $compiler)
     {
-        parent::compileDisplayFooter($compiler);
-
         $tags = $filters = $functions = array();
         foreach (array('tags', 'filters', 'functions') as $type) {
             foreach ($this->{'used'.ucfirst($type)} as $name => $node) {
@@ -55,11 +41,9 @@ class Twig_Node_SandboxedModule extends Twig_Node_Module
         }
 
         $compiler
-            ->write("protected function checkSecurity()\n", "{\n")
-            ->indent()
-            ->write("\$tags = ")->repr(array_filter($tags))->raw(";\n")
-            ->write("\$filters = ")->repr(array_filter($filters))->raw(";\n")
-            ->write("\$functions = ")->repr(array_filter($functions))->raw(";\n\n")
+            ->write('$tags = ')->repr(array_filter($tags))->raw(";\n")
+            ->write('$filters = ')->repr(array_filter($filters))->raw(";\n")
+            ->write('$functions = ')->repr(array_filter($functions))->raw(";\n\n")
             ->write("try {\n")
             ->indent()
             ->write("\$this->env->getExtension('sandbox')->checkSecurity(\n")
@@ -88,8 +72,6 @@ class Twig_Node_SandboxedModule extends Twig_Node_Module
             ->write("}\n\n")
             ->write("throw \$e;\n")
             ->outdent()
-            ->write("}\n")
-            ->outdent()
             ->write("}\n\n")
         ;
     }
diff --git a/vendor/Twig/Node/Do.php b/vendor/Twig/Node/Do.php
index 9981bc1..14fb84e 100644
--- a/vendor/Twig/Node/Do.php
+++ b/vendor/Twig/Node/Do.php
@@ -21,11 +21,6 @@ class Twig_Node_Do extends Twig_Node
         parent::__construct(array('expr' => $expr), array(), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/Embed.php b/vendor/Twig/Node/Embed.php
index 4c9456d..a213040 100644
--- a/vendor/Twig/Node/Embed.php
+++ b/vendor/Twig/Node/Embed.php
@@ -28,11 +28,15 @@ class Twig_Node_Embed extends Twig_Node_Include
     protected function addGetTemplate(Twig_Compiler $compiler)
     {
         $compiler
-            ->write("\$this->env->loadTemplate(")
+            ->write('$this->loadTemplate(')
             ->string($this->getAttribute('filename'))
             ->raw(', ')
+            ->repr($compiler->getFilename())
+            ->raw(', ')
+            ->repr($this->getLine())
+            ->raw(', ')
             ->string($this->getAttribute('index'))
-            ->raw(")")
+            ->raw(')')
         ;
     }
 }
diff --git a/vendor/Twig/Node/Expression/Array.php b/vendor/Twig/Node/Expression/Array.php
index 6cf7ca1..83e583b 100644
--- a/vendor/Twig/Node/Expression/Array.php
+++ b/vendor/Twig/Node/Expression/Array.php
@@ -60,11 +60,6 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression
         array_push($this->nodes, $key, $value);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler->raw('array(');
diff --git a/vendor/Twig/Node/Expression/AssignName.php b/vendor/Twig/Node/Expression/AssignName.php
index 4d5dbdb..ce0c5fb 100644
--- a/vendor/Twig/Node/Expression/AssignName.php
+++ b/vendor/Twig/Node/Expression/AssignName.php
@@ -12,11 +12,6 @@
 
 class Twig_Node_Expression_AssignName extends Twig_Node_Expression_Name
 {
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/Expression/Binary.php b/vendor/Twig/Node/Expression/Binary.php
index 5c383d1..c821db5 100644
--- a/vendor/Twig/Node/Expression/Binary.php
+++ b/vendor/Twig/Node/Expression/Binary.php
@@ -16,11 +16,6 @@ abstract class Twig_Node_Expression_Binary extends Twig_Node_Expression
         parent::__construct(array('left' => $left, 'right' => $right), array(), $lineno);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/Expression/Binary/FloorDiv.php b/vendor/Twig/Node/Expression/Binary/FloorDiv.php
index d3518b5..b606f6d 100644
--- a/vendor/Twig/Node/Expression/Binary/FloorDiv.php
+++ b/vendor/Twig/Node/Expression/Binary/FloorDiv.php
@@ -10,11 +10,6 @@
  */
 class Twig_Node_Expression_Binary_FloorDiv extends Twig_Node_Expression_Binary
 {
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler->raw('intval(floor(');
diff --git a/vendor/Twig/Node/Expression/Binary/In.php b/vendor/Twig/Node/Expression/Binary/In.php
index 1d485b6..9565a60 100644
--- a/vendor/Twig/Node/Expression/Binary/In.php
+++ b/vendor/Twig/Node/Expression/Binary/In.php
@@ -10,11 +10,6 @@
  */
 class Twig_Node_Expression_Binary_In extends Twig_Node_Expression_Binary
 {
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/Expression/Binary/NotIn.php b/vendor/Twig/Node/Expression/Binary/NotIn.php
index 8f215f1..49ab39e 100644
--- a/vendor/Twig/Node/Expression/Binary/NotIn.php
+++ b/vendor/Twig/Node/Expression/Binary/NotIn.php
@@ -10,11 +10,6 @@
  */
 class Twig_Node_Expression_Binary_NotIn extends Twig_Node_Expression_Binary
 {
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/Expression/Binary/Power.php b/vendor/Twig/Node/Expression/Binary/Power.php
index 6cd3a21..cd6d046 100644
--- a/vendor/Twig/Node/Expression/Binary/Power.php
+++ b/vendor/Twig/Node/Expression/Binary/Power.php
@@ -10,11 +10,6 @@
  */
 class Twig_Node_Expression_Binary_Power extends Twig_Node_Expression_Binary
 {
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/Expression/Binary/Range.php b/vendor/Twig/Node/Expression/Binary/Range.php
index fc102fe..692ec9c 100644
--- a/vendor/Twig/Node/Expression/Binary/Range.php
+++ b/vendor/Twig/Node/Expression/Binary/Range.php
@@ -10,11 +10,6 @@
  */
 class Twig_Node_Expression_Binary_Range extends Twig_Node_Expression_Binary
 {
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/Expression/BlockReference.php b/vendor/Twig/Node/Expression/BlockReference.php
index 4ddb2cf..f6ed6ff 100644
--- a/vendor/Twig/Node/Expression/BlockReference.php
+++ b/vendor/Twig/Node/Expression/BlockReference.php
@@ -22,11 +22,6 @@ class Twig_Node_Expression_BlockReference extends Twig_Node_Expression
         parent::__construct(array('name' => $name), array('as_string' => $asString, 'output' => false), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         if ($this->getAttribute('as_string')) {
@@ -36,15 +31,15 @@ class Twig_Node_Expression_BlockReference extends Twig_Node_Expression
         if ($this->getAttribute('output')) {
             $compiler
                 ->addDebugInfo($this)
-                ->write("\$this->displayBlock(")
+                ->write('$this->displayBlock(')
                 ->subcompile($this->getNode('name'))
                 ->raw(", \$context, \$blocks);\n")
             ;
         } else {
             $compiler
-                ->raw("\$this->renderBlock(")
+                ->raw('$this->renderBlock(')
                 ->subcompile($this->getNode('name'))
-                ->raw(", \$context, \$blocks)")
+                ->raw(', $context, $blocks)')
             ;
         }
     }
diff --git a/vendor/Twig/Node/Expression/Call.php b/vendor/Twig/Node/Expression/Call.php
index 912b837..51e2cac 100644
--- a/vendor/Twig/Node/Expression/Call.php
+++ b/vendor/Twig/Node/Expression/Call.php
@@ -90,6 +90,9 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
 
     protected function getArguments($callable, $arguments)
     {
+        $callType = $this->getAttribute('type');
+        $callName = $this->getAttribute('name');
+
         $parameters = array();
         $named = false;
         foreach ($arguments as $name => $node) {
@@ -97,18 +100,25 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
                 $named = true;
                 $name = $this->normalizeName($name);
             } elseif ($named) {
-                throw new Twig_Error_Syntax(sprintf('Positional arguments cannot be used after named arguments for %s "%s".', $this->getAttribute('type'), $this->getAttribute('name')));
+                throw new Twig_Error_Syntax(sprintf('Positional arguments cannot be used after named arguments for %s "%s".', $callType, $callName));
             }
 
             $parameters[$name] = $node;
         }
 
-        if (!$named) {
+        $isVariadic = $this->hasAttribute('is_variadic') && $this->getAttribute('is_variadic');
+        if (!$named && !$isVariadic) {
             return $parameters;
         }
 
         if (!$callable) {
-            throw new LogicException(sprintf('Named arguments are not supported for %s "%s".', $this->getAttribute('type'), $this->getAttribute('name')));
+            if ($named) {
+                $message = sprintf('Named arguments are not supported for %s "%s".', $callType, $callName);
+            } else {
+                $message = sprintf('Arbitrary positional arguments are not supported for %s "%s".', $callType, $callName);
+            }
+
+            throw new LogicException($message);
         }
 
         // manage named arguments
@@ -117,6 +127,8 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
         } elseif (is_object($callable) && !$callable instanceof Closure) {
             $r = new ReflectionObject($callable);
             $r = $r->getMethod('__invoke');
+        } elseif (is_string($callable) && false !== strpos($callable, '::')) {
+            $r = new ReflectionMethod($callable);
         } else {
             $r = new ReflectionFunction($callable);
         }
@@ -136,34 +148,93 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
                 array_shift($definition);
             }
         }
+        if ($isVariadic) {
+            $argument = end($definition);
+            if ($argument && $argument->isArray() && $argument->isDefaultValueAvailable() && array() === $argument->getDefaultValue()) {
+                array_pop($definition);
+            } else {
+                $callableName = $r->name;
+                if ($r->getDeclaringClass()) {
+                    $callableName = $r->getDeclaringClass()->name.'::'.$callableName;
+                }
+
+                throw new LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = array()".', $callableName, $callType, $callName));
+            }
+        }
 
         $arguments = array();
+        $names = array();
+        $missingArguments = array();
+        $optionalArguments = array();
         $pos = 0;
         foreach ($definition as $param) {
-            $name = $this->normalizeName($param->name);
+            $names[] = $name = $this->normalizeName($param->name);
 
             if (array_key_exists($name, $parameters)) {
                 if (array_key_exists($pos, $parameters)) {
-                    throw new Twig_Error_Syntax(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $this->getAttribute('type'), $this->getAttribute('name')));
+                    throw new Twig_Error_Syntax(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $callType, $callName));
+                }
+
+                if (!empty($missingArguments)) {
+                    throw new Twig_Error_Syntax(sprintf(
+                        'Argument "%s" could not be assigned for %s "%s(%s)" because it is mapped to an internal PHP function which cannot determine default value for optional argument%s "%s".',
+                        $name, $callType, $callName, implode(', ', $names), count($missingArguments) > 1 ? 's' : '', implode('", "', $missingArguments))
+                    );
                 }
 
+                $arguments = array_merge($arguments, $optionalArguments);
                 $arguments[] = $parameters[$name];
                 unset($parameters[$name]);
+                $optionalArguments = array();
             } elseif (array_key_exists($pos, $parameters)) {
+                $arguments = array_merge($arguments, $optionalArguments);
                 $arguments[] = $parameters[$pos];
                 unset($parameters[$pos]);
+                $optionalArguments = array();
                 ++$pos;
             } elseif ($param->isDefaultValueAvailable()) {
-                $arguments[] = new Twig_Node_Expression_Constant($param->getDefaultValue(), -1);
+                $optionalArguments[] = new Twig_Node_Expression_Constant($param->getDefaultValue(), -1);
             } elseif ($param->isOptional()) {
-                break;
+                if (empty($parameters)) {
+                    break;
+                } else {
+                    $missingArguments[] = $name;
+                }
             } else {
-                throw new Twig_Error_Syntax(sprintf('Value for argument "%s" is required for %s "%s".', $name, $this->getAttribute('type'), $this->getAttribute('name')));
+                throw new Twig_Error_Syntax(sprintf('Value for argument "%s" is required for %s "%s".', $name, $callType, $callName));
+            }
+        }
+
+        if ($isVariadic) {
+            $arbitraryArguments = new Twig_Node_Expression_Array(array(), -1);
+            foreach ($parameters as $key => $value) {
+                if (is_int($key)) {
+                    $arbitraryArguments->addElement($value);
+                } else {
+                    $arbitraryArguments->addElement($value, new Twig_Node_Expression_Constant($key, -1));
+                }
+                unset($parameters[$key]);
+            }
+
+            if ($arbitraryArguments->count()) {
+                $arguments = array_merge($arguments, $optionalArguments);
+                $arguments[] = $arbitraryArguments;
             }
         }
 
         if (!empty($parameters)) {
-            throw new Twig_Error_Syntax(sprintf('Unknown argument%s "%s" for %s "%s".', count($parameters) > 1 ? 's' : '', implode('", "', array_keys($parameters)), $this->getAttribute('type'), $this->getAttribute('name')));
+            $unknownParameter = null;
+            foreach ($parameters as $parameter) {
+                if ($parameter instanceof Twig_Node) {
+                    $unknownParameter = $parameter;
+                    break;
+                }
+            }
+
+            throw new Twig_Error_Syntax(sprintf(
+                'Unknown argument%s "%s" for %s "%s(%s)".',
+                count($parameters) > 1 ? 's' : '', implode('", "', array_keys($parameters)), $callType, $callName, implode(', ', $names)
+            ), $unknownParameter ? $unknownParameter->getLine() : -1);
         }
 
         return $arguments;
diff --git a/vendor/Twig/Node/Expression/ExtensionReference.php b/vendor/Twig/Node/Expression/ExtensionReference.php
index db06abb..6140c57 100644
--- a/vendor/Twig/Node/Expression/ExtensionReference.php
+++ b/vendor/Twig/Node/Expression/ExtensionReference.php
@@ -21,11 +21,6 @@ class Twig_Node_Expression_ExtensionReference extends Twig_Node_Expression
         parent::__construct(array(), array('name' => $name), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler->raw(sprintf("\$this->env->getExtension('%s')", $this->getAttribute('name')));
diff --git a/vendor/Twig/Node/Expression/Filter.php b/vendor/Twig/Node/Expression/Filter.php
index 207b062..a906232 100644
--- a/vendor/Twig/Node/Expression/Filter.php
+++ b/vendor/Twig/Node/Expression/Filter.php
@@ -30,6 +30,9 @@ class Twig_Node_Expression_Filter extends Twig_Node_Expression_Call
         if ($filter instanceof Twig_FilterCallableInterface || $filter instanceof Twig_SimpleFilter) {
             $this->setAttribute('callable', $filter->getCallable());
         }
+        if ($filter instanceof Twig_SimpleFilter) {
+            $this->setAttribute('is_variadic', $filter->isVariadic());
+        }
 
         $this->compileCallable($compiler);
     }
diff --git a/vendor/Twig/Node/Expression/Function.php b/vendor/Twig/Node/Expression/Function.php
index 3e1f6b5..7326ede 100644
--- a/vendor/Twig/Node/Expression/Function.php
+++ b/vendor/Twig/Node/Expression/Function.php
@@ -29,6 +29,9 @@ class Twig_Node_Expression_Function extends Twig_Node_Expression_Call
         if ($function instanceof Twig_FunctionCallableInterface || $function instanceof Twig_SimpleFunction) {
             $this->setAttribute('callable', $function->getCallable());
         }
+        if ($function instanceof Twig_SimpleFunction) {
+            $this->setAttribute('is_variadic', $function->isVariadic());
+        }
 
         $this->compileCallable($compiler);
     }
diff --git a/vendor/Twig/Node/Expression/Name.php b/vendor/Twig/Node/Expression/Name.php
index 3b8fae0..c062a21 100644
--- a/vendor/Twig/Node/Expression/Name.php
+++ b/vendor/Twig/Node/Expression/Name.php
@@ -12,7 +12,7 @@
 class Twig_Node_Expression_Name extends Twig_Node_Expression
 {
     protected $specialVars = array(
-        '_self'    => '$this',
+        '_self' => '$this',
         '_context' => '$context',
         '_charset' => '$this->env->getCharset()',
     );
@@ -26,13 +26,23 @@ class Twig_Node_Expression_Name extends Twig_Node_Expression
     {
         $name = $this->getAttribute('name');
 
+        $compiler->addDebugInfo($this);
+
         if ($this->getAttribute('is_defined_test')) {
             if ($this->isSpecial()) {
+                if ('_self' === $name) {
+                    @trigger_error(sprintf('Global variable "_self" is deprecated in %s at line %d', '?', $this->getLine()), E_USER_DEPRECATED);
+                }
+
                 $compiler->repr(true);
             } else {
                 $compiler->raw('array_key_exists(')->repr($name)->raw(', $context)');
             }
         } elseif ($this->isSpecial()) {
+            if ('_self' === $name) {
+                @trigger_error(sprintf('Global variable "_self" is deprecated in %s at line %d', '?', $this->getLine()), E_USER_DEPRECATED);
+            }
+
             $compiler->raw($this->specialVars[$name]);
         } elseif ($this->getAttribute('always_defined')) {
             $compiler
@@ -44,7 +54,7 @@ class Twig_Node_Expression_Name extends Twig_Node_Expression
             // remove the non-PHP 5.4 version when PHP 5.3 support is dropped
             // as the non-optimized version is just a workaround for slow ternary operator
             // when the context has a lot of variables
-            if (version_compare(phpversion(), '5.4.0RC1', '>=')) {
+            if (PHP_VERSION_ID >= 50400) {
                 // PHP 5.4 ternary operator performance was optimized
                 $compiler
                     ->raw('(isset($context[')
diff --git a/vendor/Twig/Node/Expression/Parent.php b/vendor/Twig/Node/Expression/Parent.php
index a22ce03..694c080 100644
--- a/vendor/Twig/Node/Expression/Parent.php
+++ b/vendor/Twig/Node/Expression/Parent.php
@@ -22,25 +22,20 @@ class Twig_Node_Expression_Parent extends Twig_Node_Expression
         parent::__construct(array(), array('output' => false, 'name' => $name), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         if ($this->getAttribute('output')) {
             $compiler
                 ->addDebugInfo($this)
-                ->write("\$this->displayParentBlock(")
+                ->write('$this->displayParentBlock(')
                 ->string($this->getAttribute('name'))
                 ->raw(", \$context, \$blocks);\n")
             ;
         } else {
             $compiler
-                ->raw("\$this->renderParentBlock(")
+                ->raw('$this->renderParentBlock(')
                 ->string($this->getAttribute('name'))
-                ->raw(", \$context, \$blocks)")
+                ->raw(', $context, $blocks)')
             ;
         }
     }
diff --git a/vendor/Twig/Node/Expression/Test.php b/vendor/Twig/Node/Expression/Test.php
index 639f501..c0358c8 100644
--- a/vendor/Twig/Node/Expression/Test.php
+++ b/vendor/Twig/Node/Expression/Test.php
@@ -26,6 +26,9 @@ class Twig_Node_Expression_Test extends Twig_Node_Expression_Call
         if ($test instanceof Twig_TestCallableInterface || $test instanceof Twig_SimpleTest) {
             $this->setAttribute('callable', $test->getCallable());
         }
+        if ($test instanceof Twig_SimpleTest) {
+            $this->setAttribute('is_variadic', $test->isVariadic());
+        }
 
         $this->compileCallable($compiler);
     }
diff --git a/vendor/Twig/Node/Expression/Test/Defined.php b/vendor/Twig/Node/Expression/Test/Defined.php
index 247b2e2..4b4a48a 100644
--- a/vendor/Twig/Node/Expression/Test/Defined.php
+++ b/vendor/Twig/Node/Expression/Test/Defined.php
@@ -34,7 +34,7 @@ class Twig_Node_Expression_Test_Defined extends Twig_Node_Expression_Test
 
             $this->changeIgnoreStrictCheck($node);
         } else {
-            throw new Twig_Error_Syntax('The "defined" test only works with simple variables', $this->getLine());
+            throw new Twig_Error_Syntax('The "defined" test only works with simple variables.', $this->getLine());
         }
     }
 
diff --git a/vendor/Twig/Node/Expression/Unary.php b/vendor/Twig/Node/Expression/Unary.php
index c514388..1cf54c3 100644
--- a/vendor/Twig/Node/Expression/Unary.php
+++ b/vendor/Twig/Node/Expression/Unary.php
@@ -18,12 +18,9 @@ abstract class Twig_Node_Expression_Unary extends Twig_Node_Expression
 
     public function compile(Twig_Compiler $compiler)
     {
-        $compiler->raw('(');
+        $compiler->raw(' ');
         $this->operator($compiler);
-        $compiler
-            ->subcompile($this->getNode('node'))
-            ->raw(')')
-        ;
+        $compiler->subcompile($this->getNode('node'));
     }
 
     abstract public function operator(Twig_Compiler $compiler);
diff --git a/vendor/Twig/Node/Flush.php b/vendor/Twig/Node/Flush.php
index 20d6aab..2af17a4 100644
--- a/vendor/Twig/Node/Flush.php
+++ b/vendor/Twig/Node/Flush.php
@@ -21,11 +21,6 @@ class Twig_Node_Flush extends Twig_Node
         parent::__construct(array(), array(), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/For.php b/vendor/Twig/Node/For.php
index c54a23c..2d45093 100644
--- a/vendor/Twig/Node/For.php
+++ b/vendor/Twig/Node/For.php
@@ -30,17 +30,11 @@ class Twig_Node_For extends Twig_Node
         parent::__construct(array('key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body, 'else' => $else), array('with_loop' => true, 'ifexpr' => null !== $ifexpr), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
             ->addDebugInfo($this)
-            // the (array) cast bypasses a PHP 5.2.6 bug
-            ->write("\$context['_parent'] = (array) \$context;\n")
+            ->write("\$context['_parent'] = \$context;\n")
             ->write("\$context['_seq'] = twig_ensure_traversable(")
             ->subcompile($this->getNode('seq'))
             ->raw(");\n")
@@ -82,7 +76,7 @@ class Twig_Node_For extends Twig_Node
         $compiler
             ->write("foreach (\$context['_seq'] as ")
             ->subcompile($this->getNode('key_target'))
-            ->raw(" => ")
+            ->raw(' => ')
             ->subcompile($this->getNode('value_target'))
             ->raw(") {\n")
             ->indent()
diff --git a/vendor/Twig/Node/ForLoop.php b/vendor/Twig/Node/ForLoop.php
index d330283..2554d48 100644
--- a/vendor/Twig/Node/ForLoop.php
+++ b/vendor/Twig/Node/ForLoop.php
@@ -21,11 +21,6 @@ class Twig_Node_ForLoop extends Twig_Node
         parent::__construct(array(), array('with_loop' => false, 'ifexpr' => false, 'else' => false), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         if ($this->getAttribute('else')) {
diff --git a/vendor/Twig/Node/If.php b/vendor/Twig/Node/If.php
index 980274e..caff936 100644
--- a/vendor/Twig/Node/If.php
+++ b/vendor/Twig/Node/If.php
@@ -22,11 +22,6 @@ class Twig_Node_If extends Twig_Node
         parent::__construct(array('tests' => $tests, 'else' => $else), array(), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler->addDebugInfo($this);
@@ -34,7 +29,7 @@ class Twig_Node_If extends Twig_Node
             if ($i > 0) {
                 $compiler
                     ->outdent()
-                    ->write("} elseif (")
+                    ->write('} elseif (')
                 ;
             } else {
                 $compiler
diff --git a/vendor/Twig/Node/Import.php b/vendor/Twig/Node/Import.php
index 2306655..df37af3 100644
--- a/vendor/Twig/Node/Import.php
+++ b/vendor/Twig/Node/Import.php
@@ -21,11 +21,6 @@ class Twig_Node_Import extends Twig_Node
         parent::__construct(array('expr' => $expr, 'var' => $var), array(), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
@@ -36,12 +31,16 @@ class Twig_Node_Import extends Twig_Node
         ;
 
         if ($this->getNode('expr') instanceof Twig_Node_Expression_Name && '_self' === $this->getNode('expr')->getAttribute('name')) {
-            $compiler->raw("\$this");
+            $compiler->raw('$this');
         } else {
             $compiler
-                ->raw('$this->env->loadTemplate(')
+                ->raw('$this->loadTemplate(')
                 ->subcompile($this->getNode('expr'))
-                ->raw(")")
+                ->raw(', ')
+                ->repr($compiler->getFilename())
+                ->raw(', ')
+                ->repr($this->getLine())
+                ->raw(')')
             ;
         }
 
diff --git a/vendor/Twig/Node/Include.php b/vendor/Twig/Node/Include.php
index 0654888..9952f73 100644
--- a/vendor/Twig/Node/Include.php
+++ b/vendor/Twig/Node/Include.php
@@ -22,11 +22,6 @@ class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface
         parent::__construct(array('expr' => $expr, 'variables' => $variables), array('only' => (bool) $only, 'ignore_missing' => (bool) $ignoreMissing), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler->addDebugInfo($this);
@@ -60,12 +55,15 @@ class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface
 
     protected function addGetTemplate(Twig_Compiler $compiler)
     {
-        $method = $this->getNode('expr') instanceof Twig_Node_Expression_Constant ? 'loadTemplate' : 'resolveTemplate';
         $compiler
-            ->write(sprintf('$this->env->%s(', $method))
-            ->subcompile($this->getNode('expr'))
-            ->raw(')')
-        ;
+             ->write('$this->loadTemplate(')
+             ->subcompile($this->getNode('expr'))
+             ->raw(', ')
+             ->repr($compiler->getFilename())
+             ->raw(', ')
+             ->repr($this->getLine())
+             ->raw(')')
+         ;
     }
 
     protected function addTemplateArguments(Twig_Compiler $compiler)
diff --git a/vendor/Twig/Node/Macro.php b/vendor/Twig/Node/Macro.php
index ab7e8d2..932e795 100644
--- a/vendor/Twig/Node/Macro.php
+++ b/vendor/Twig/Node/Macro.php
@@ -16,21 +16,24 @@
  */
 class Twig_Node_Macro extends Twig_Node
 {
+    const VARARGS_NAME = 'varargs';
+
     public function __construct($name, Twig_NodeInterface $body, Twig_NodeInterface $arguments, $lineno, $tag = null)
     {
+        foreach ($arguments as $argumentName => $argument) {
+            if (self::VARARGS_NAME === $argumentName) {
+                throw new Twig_Error_Syntax(sprintf('The argument "%s" in macro "%s" cannot be defined because the variable "%s" is reserved for arbitrary arguments.', self::VARARGS_NAME, $name, self::VARARGS_NAME), $argument->getLine());
+            }
+        }
+
         parent::__construct(array('body' => $body, 'arguments' => $arguments), array('name' => $name), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
             ->addDebugInfo($this)
-            ->write(sprintf("public function get%s(", $this->getAttribute('name')))
+            ->write(sprintf('public function get%s(', $this->getAttribute('name')))
         ;
 
         $count = count($this->getNode('arguments'));
@@ -46,36 +49,55 @@ class Twig_Node_Macro extends Twig_Node
             }
         }
 
+        if (PHP_VERSION_ID >= 50600) {
+            if ($count) {
+                $compiler->raw(', ');
+            }
+
+            $compiler->raw('...$__varargs__');
+        }
+
         $compiler
             ->raw(")\n")
             ->write("{\n")
             ->indent()
         ;
 
-        if (!count($this->getNode('arguments'))) {
-            $compiler->write("\$context = \$this->env->getGlobals();\n\n");
-        } else {
+        $compiler
+            ->write("\$context = \$this->env->mergeGlobals(array(\n")
+            ->indent()
+        ;
+
+        foreach ($this->getNode('arguments') as $name => $default) {
             $compiler
-                ->write("\$context = \$this->env->mergeGlobals(array(\n")
-                ->indent()
+                ->addIndentation()
+                ->string($name)
+                ->raw(' => $__'.$name.'__')
+                ->raw(",\n")
             ;
+        }
 
-            foreach ($this->getNode('arguments') as $name => $default) {
-                $compiler
-                    ->write('')
-                    ->string($name)
-                    ->raw(' => $__'.$name.'__')
-                    ->raw(",\n")
-                ;
-            }
+        $compiler
+            ->addIndentation()
+            ->string(self::VARARGS_NAME)
+            ->raw(' => ')
+        ;
 
+        if (PHP_VERSION_ID >= 50600) {
+            $compiler->raw("\$__varargs__,\n");
+        } else {
             $compiler
-                ->outdent()
-                ->write("));\n\n")
+                ->raw('func_num_args() > ')
+                ->repr($count)
+                ->raw(' ? array_slice(func_get_args(), ')
+                ->repr($count)
+                ->raw(") : array(),\n")
             ;
         }
 
         $compiler
+            ->outdent()
+            ->write("));\n\n")
             ->write("\$blocks = array();\n\n")
             ->write("ob_start();\n")
             ->write("try {\n")
diff --git a/vendor/Twig/Node/Module.php b/vendor/Twig/Node/Module.php
index 9f66b28..01161d3 100644
--- a/vendor/Twig/Node/Module.php
+++ b/vendor/Twig/Node/Module.php
@@ -13,6 +13,10 @@
 /**
  * Represents a module node.
  *
+ * Consider this class as being final. If you need to customize the behavior of
+ * the generated class, consider adding nodes to the following nodes: display_start,
+ * display_end, constructor_start, constructor_end, and class_end.
+ *
  * @author Fabien Potencier <fabien@symfony.com>
  */
 class Twig_Node_Module extends Twig_Node
@@ -20,7 +24,22 @@ class Twig_Node_Module extends Twig_Node
     public function __construct(Twig_NodeInterface $body, Twig_Node_Expression $parent = null, Twig_NodeInterface $blocks, Twig_NodeInterface $macros, Twig_NodeInterface $traits, $embeddedTemplates, $filename)
     {
         // embedded templates are set as attributes so that they are only visited once by the visitors
-        parent::__construct(array('parent' => $parent, 'body' => $body, 'blocks' => $blocks, 'macros' => $macros, 'traits' => $traits), array('filename' => $filename, 'index' => null, 'embedded_templates' => $embeddedTemplates), 1);
+        parent::__construct(array(
+            'parent' => $parent,
+            'body' => $body,
+            'blocks' => $blocks,
+            'macros' => $macros,
+            'traits' => $traits,
+            'display_start' => new Twig_Node(),
+            'display_end' => new Twig_Node(),
+            'constructor_start' => new Twig_Node(),
+            'constructor_end' => new Twig_Node(),
+            'class_end' => new Twig_Node(),
+        ), array(
+            'filename' => $filename,
+            'index' => null,
+            'embedded_templates' => $embeddedTemplates,
+        ), 1);
     }
 
     public function setIndex($index)
@@ -28,11 +47,6 @@ class Twig_Node_Module extends Twig_Node
         $this->setAttribute('index', $index);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $this->compileTemplate($compiler);
@@ -50,17 +64,20 @@ class Twig_Node_Module extends Twig_Node
 
         $this->compileClassHeader($compiler);
 
-        if (count($this->getNode('blocks')) || count($this->getNode('traits')) || null === $this->getNode('parent') || $this->getNode('parent') instanceof Twig_Node_Expression_Constant) {
+        if (
+            count($this->getNode('blocks'))
+            || count($this->getNode('traits'))
+            || null === $this->getNode('parent')
+            || $this->getNode('parent') instanceof Twig_Node_Expression_Constant
+            || count($this->getNode('constructor_start'))
+            || count($this->getNode('constructor_end'))
+        ) {
             $this->compileConstructor($compiler);
         }
 
         $this->compileGetParent($compiler);
 
-        $this->compileDisplayHeader($compiler);
-
-        $this->compileDisplayBody($compiler);
-
-        $this->compileDisplayFooter($compiler);
+        $this->compileDisplay($compiler);
 
         $compiler->subcompile($this->getNode('blocks'));
 
@@ -77,23 +94,28 @@ class Twig_Node_Module extends Twig_Node
 
     protected function compileGetParent(Twig_Compiler $compiler)
     {
-        if (null === $this->getNode('parent')) {
+        if (null === $parent = $this->getNode('parent')) {
             return;
         }
 
         $compiler
             ->write("protected function doGetParent(array \$context)\n", "{\n")
             ->indent()
-            ->write("return ")
+            ->addDebugInfo($parent)
+            ->write('return ')
         ;
 
-        if ($this->getNode('parent') instanceof Twig_Node_Expression_Constant) {
-            $compiler->subcompile($this->getNode('parent'));
+        if ($parent instanceof Twig_Node_Expression_Constant) {
+            $compiler->subcompile($parent);
         } else {
             $compiler
-                ->raw("\$this->env->resolveTemplate(")
-                ->subcompile($this->getNode('parent'))
-                ->raw(")")
+                ->raw('$this->loadTemplate(')
+                ->subcompile($parent)
+                ->raw(', ')
+                ->repr($compiler->getFilename())
+                ->raw(', ')
+                ->repr($this->getNode('parent')->getLine())
+                ->raw(')')
             ;
         }
 
@@ -104,26 +126,12 @@ class Twig_Node_Module extends Twig_Node
         ;
     }
 
-    protected function compileDisplayBody(Twig_Compiler $compiler)
-    {
-        $compiler->subcompile($this->getNode('body'));
-
-        if (null !== $this->getNode('parent')) {
-            if ($this->getNode('parent') instanceof Twig_Node_Expression_Constant) {
-                $compiler->write("\$this->parent");
-            } else {
-                $compiler->write("\$this->getParent(\$context)");
-            }
-            $compiler->raw("->display(\$context, array_merge(\$this->blocks, \$blocks));\n");
-        }
-    }
-
     protected function compileClassHeader(Twig_Compiler $compiler)
     {
         $compiler
             ->write("\n\n")
             // if the filename contains */, add a blank to avoid a PHP parse error
-            ->write("/* ".str_replace('*/', '* /', $this->getAttribute('filename'))." */\n")
+            ->write('/* '.str_replace('*/', '* /', $this->getAttribute('filename'))." */\n")
             ->write('class '.$compiler->getEnvironment()->getTemplateClass($this->getAttribute('filename'), $this->getAttribute('index')))
             ->raw(sprintf(" extends %s\n", $compiler->getEnvironment()->getBaseTemplateClass()))
             ->write("{\n")
@@ -136,17 +144,23 @@ class Twig_Node_Module extends Twig_Node
         $compiler
             ->write("public function __construct(Twig_Environment \$env)\n", "{\n")
             ->indent()
+            ->subcompile($this->getNode('constructor_start'))
             ->write("parent::__construct(\$env);\n\n")
         ;
 
         // parent
-        if (null === $this->getNode('parent')) {
+        if (null === $parent = $this->getNode('parent')) {
             $compiler->write("\$this->parent = false;\n\n");
-        } elseif ($this->getNode('parent') instanceof Twig_Node_Expression_Constant) {
+        } elseif ($parent instanceof Twig_Node_Expression_Constant) {
             $compiler
-                ->write("\$this->parent = \$this->env->loadTemplate(")
-                ->subcompile($this->getNode('parent'))
-                ->raw(");\n\n")
+                ->addDebugInfo($parent)
+                ->write('$this->parent = $this->loadTemplate(')
+                ->subcompile($parent)
+                ->raw(', ')
+                ->repr($compiler->getFilename())
+                ->raw(', ')
+                ->repr($this->getNode('parent')->getLine())
+                ->raw(");\n")
             ;
         }
 
@@ -170,23 +184,23 @@ class Twig_Node_Module extends Twig_Node
 
                 foreach ($trait->getNode('targets') as $key => $value) {
                     $compiler
-                        ->write(sprintf("if (!isset(\$_trait_%s_blocks[", $i))
+                        ->write(sprintf('if (!isset($_trait_%s_blocks[', $i))
                         ->string($key)
                         ->raw("])) {\n")
                         ->indent()
                         ->write("throw new Twig_Error_Runtime(sprintf('Block ")
                         ->string($key)
-                        ->raw(" is not defined in trait ")
+                        ->raw(' is not defined in trait ')
                         ->subcompile($trait->getNode('template'))
                         ->raw(".'));\n")
                         ->outdent()
                         ->write("}\n\n")
 
-                        ->write(sprintf("\$_trait_%s_blocks[", $i))
+                        ->write(sprintf('$_trait_%s_blocks[', $i))
                         ->subcompile($value)
-                        ->raw(sprintf("] = \$_trait_%s_blocks[", $i))
+                        ->raw(sprintf('] = $_trait_%s_blocks[', $i))
                         ->string($key)
-                        ->raw(sprintf("]; unset(\$_trait_%s_blocks[", $i))
+                        ->raw(sprintf(']; unset($_trait_%s_blocks[', $i))
                         ->string($key)
                         ->raw("]);\n\n")
                     ;
@@ -199,9 +213,9 @@ class Twig_Node_Module extends Twig_Node
                     ->indent()
                 ;
 
-                for ($i = 0; $i < $countTraits; $i++) {
+                for ($i = 0; $i < $countTraits; ++$i) {
                     $compiler
-                        ->write(sprintf("\$_trait_%s_blocks".($i == $countTraits - 1 ? '' : ',')."\n", $i))
+                        ->write(sprintf('$_trait_%s_blocks'.($i == $countTraits - 1 ? '' : ',')."\n", $i))
                     ;
                 }
 
@@ -249,21 +263,32 @@ class Twig_Node_Module extends Twig_Node
             ->outdent()
             ->write(");\n")
             ->outdent()
-            ->write("}\n\n");
+            ->subcompile($this->getNode('constructor_end'))
+            ->write("}\n\n")
         ;
     }
 
-    protected function compileDisplayHeader(Twig_Compiler $compiler)
+    protected function compileDisplay(Twig_Compiler $compiler)
     {
         $compiler
             ->write("protected function doDisplay(array \$context, array \$blocks = array())\n", "{\n")
             ->indent()
+            ->subcompile($this->getNode('display_start'))
+            ->subcompile($this->getNode('body'))
         ;
-    }
 
-    protected function compileDisplayFooter(Twig_Compiler $compiler)
-    {
+        if (null !== $parent = $this->getNode('parent')) {
+            $compiler->addDebugInfo($parent);
+            if ($parent instanceof Twig_Node_Expression_Constant) {
+                $compiler->write('$this->parent');
+            } else {
+                $compiler->write('$this->getParent($context)');
+            }
+            $compiler->raw("->display(\$context, array_merge(\$this->blocks, \$blocks));\n");
+        }
+
         $compiler
+            ->subcompile($this->getNode('display_end'))
             ->outdent()
             ->write("}\n\n")
         ;
@@ -272,6 +297,7 @@ class Twig_Node_Module extends Twig_Node
     protected function compileClassFooter(Twig_Compiler $compiler)
     {
         $compiler
+            ->subcompile($this->getNode('class_end'))
             ->outdent()
             ->write("}\n")
         ;
@@ -362,22 +388,16 @@ class Twig_Node_Module extends Twig_Node
     {
         if ($node instanceof Twig_Node_Expression_Constant) {
             $compiler
-                ->write(sprintf("%s = \$this->env->loadTemplate(", $var))
+                ->write(sprintf('%s = $this->loadTemplate(', $var))
                 ->subcompile($node)
+                ->raw(', ')
+                ->repr($compiler->getFilename())
+                ->raw(', ')
+                ->repr($node->getLine())
                 ->raw(");\n")
             ;
         } else {
-            $compiler
-                ->write(sprintf("%s = ", $var))
-                ->subcompile($node)
-                ->raw(";\n")
-                ->write(sprintf("if (!%s", $var))
-                ->raw(" instanceof Twig_Template) {\n")
-                ->indent()
-                ->write(sprintf("%s = \$this->env->loadTemplate(%s);\n", $var, $var))
-                ->outdent()
-                ->write("}\n")
-            ;
+            throw new LogicException('Trait templates can only be constant nodes');
         }
     }
 }
diff --git a/vendor/Twig/Node/Print.php b/vendor/Twig/Node/Print.php
index 4263536..7b69ee8 100644
--- a/vendor/Twig/Node/Print.php
+++ b/vendor/Twig/Node/Print.php
@@ -22,11 +22,6 @@ class Twig_Node_Print extends Twig_Node implements Twig_NodeOutputInterface
         parent::__construct(array('expr' => $expr), array(), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/Sandbox.php b/vendor/Twig/Node/Sandbox.php
index 8ca772b..cd705e2 100644
--- a/vendor/Twig/Node/Sandbox.php
+++ b/vendor/Twig/Node/Sandbox.php
@@ -21,11 +21,6 @@ class Twig_Node_Sandbox extends Twig_Node
         parent::__construct(array('body' => $body), array(), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/SandboxedPrint.php b/vendor/Twig/Node/SandboxedPrint.php
index 91872cc..148dd2b 100644
--- a/vendor/Twig/Node/SandboxedPrint.php
+++ b/vendor/Twig/Node/SandboxedPrint.php
@@ -21,16 +21,6 @@
  */
 class Twig_Node_SandboxedPrint extends Twig_Node_Print
 {
-    public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null)
-    {
-        parent::__construct($expr, $lineno, $tag);
-    }
-
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
@@ -47,6 +37,8 @@ class Twig_Node_SandboxedPrint extends Twig_Node_Print
      * This is mostly needed when another visitor adds filters (like the escaper one).
      *
      * @param Twig_Node $node A Node
+     *
+     * @return Twig_Node
      */
     protected function removeNodeFilter($node)
     {
diff --git a/vendor/Twig/Node/Set.php b/vendor/Twig/Node/Set.php
index 407d147..e5a6603 100644
--- a/vendor/Twig/Node/Set.php
+++ b/vendor/Twig/Node/Set.php
@@ -36,11 +36,6 @@ class Twig_Node_Set extends Twig_Node
         }
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler->addDebugInfo($this);
diff --git a/vendor/Twig/Node/Spaceless.php b/vendor/Twig/Node/Spaceless.php
index 1478c59..486e461 100644
--- a/vendor/Twig/Node/Spaceless.php
+++ b/vendor/Twig/Node/Spaceless.php
@@ -23,11 +23,6 @@ class Twig_Node_Spaceless extends Twig_Node
         parent::__construct(array('body' => $body), array(), $lineno, $tag);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/Node/Text.php b/vendor/Twig/Node/Text.php
index 6863604..39879bb 100644
--- a/vendor/Twig/Node/Text.php
+++ b/vendor/Twig/Node/Text.php
@@ -22,11 +22,6 @@ class Twig_Node_Text extends Twig_Node implements Twig_NodeOutputInterface
         parent::__construct(array(), array('data' => $data), $lineno);
     }
 
-    /**
-     * Compiles the node to PHP.
-     *
-     * @param Twig_Compiler $compiler A Twig_Compiler instance
-     */
     public function compile(Twig_Compiler $compiler)
     {
         $compiler
diff --git a/vendor/Twig/NodeTraverser.php b/vendor/Twig/NodeTraverser.php
index 8178a55..00f7b54 100644
--- a/vendor/Twig/NodeTraverser.php
+++ b/vendor/Twig/NodeTraverser.php
@@ -19,7 +19,7 @@
 class Twig_NodeTraverser
 {
     protected $env;
-    protected $visitors;
+    protected $visitors = array();
 
     /**
      * Constructor.
@@ -30,7 +30,6 @@ class Twig_NodeTraverser
     public function __construct(Twig_Environment $env, array $visitors = array())
     {
         $this->env = $env;
-        $this->visitors = array();
         foreach ($visitors as $visitor) {
             $this->addVisitor($visitor);
         }
@@ -54,6 +53,8 @@ class Twig_NodeTraverser
      * Traverses a node and calls the registered visitors.
      *
      * @param Twig_NodeInterface $node A Twig_NodeInterface instance
+     *
+     * @return Twig_NodeInterface
      */
     public function traverse(Twig_NodeInterface $node)
     {
diff --git a/vendor/Twig/NodeVisitor/Escaper.php b/vendor/Twig/NodeVisitor/Escaper.php
index cc4b3d7..5c94977 100644
--- a/vendor/Twig/NodeVisitor/Escaper.php
+++ b/vendor/Twig/NodeVisitor/Escaper.php
@@ -14,7 +14,7 @@
  *
  * @author Fabien Potencier <fabien@symfony.com>
  */
-class Twig_NodeVisitor_Escaper implements Twig_NodeVisitorInterface
+class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor
 {
     protected $statusStack = array();
     protected $blocks = array();
@@ -29,14 +29,9 @@ class Twig_NodeVisitor_Escaper implements Twig_NodeVisitorInterface
     }
 
     /**
-     * Called before child nodes are visited.
-     *
-     * @param Twig_NodeInterface $node The node to visit
-     * @param Twig_Environment   $env  The Twig environment instance
-     *
-     * @return Twig_NodeInterface The modified node
+     * {@inheritdoc}
      */
-    public function enterNode(Twig_NodeInterface $node, Twig_Environment $env)
+    protected function doEnterNode(Twig_Node $node, Twig_Environment $env)
     {
         if ($node instanceof Twig_Node_Module) {
             if ($env->hasExtension('escaper') && $defaultStrategy = $env->getExtension('escaper')->getDefaultStrategy($node->getAttribute('filename'))) {
@@ -55,14 +50,9 @@ class Twig_NodeVisitor_Escaper implements Twig_NodeVisitorInterface
     }
 
     /**
-     * Called after child nodes are visited.
-     *
-     * @param Twig_NodeInterface $node The node to visit
-     * @param Twig_Environment   $env  The Twig environment instance
-     *
-     * @return Twig_NodeInterface The modified node
+     * {@inheritdoc}
      */
-    public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env)
+    protected function doLeaveNode(Twig_Node $node, Twig_Environment $env)
     {
         if ($node instanceof Twig_Node_Module) {
             $this->defaultStrategy = false;
diff --git a/vendor/Twig/NodeVisitor/Optimizer.php b/vendor/Twig/NodeVisitor/Optimizer.php
index 3cc3312..872b7fe 100644
--- a/vendor/Twig/NodeVisitor/Optimizer.php
+++ b/vendor/Twig/NodeVisitor/Optimizer.php
@@ -19,13 +19,13 @@
  *
  * @author Fabien Potencier <fabien@symfony.com>
  */
-class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
+class Twig_NodeVisitor_Optimizer extends Twig_BaseNodeVisitor
 {
-    const OPTIMIZE_ALL         = -1;
-    const OPTIMIZE_NONE        = 0;
-    const OPTIMIZE_FOR         = 2;
-    const OPTIMIZE_RAW_FILTER  = 4;
-    const OPTIMIZE_VAR_ACCESS  = 8;
+    const OPTIMIZE_ALL = -1;
+    const OPTIMIZE_NONE = 0;
+    const OPTIMIZE_FOR = 2;
+    const OPTIMIZE_RAW_FILTER = 4;
+    const OPTIMIZE_VAR_ACCESS = 8;
 
     protected $loops = array();
     protected $loopsTargets = array();
@@ -36,7 +36,7 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
     /**
      * Constructor.
      *
-     * @param int     $optimizers The optimizer mode
+     * @param int $optimizers The optimizer mode
      */
     public function __construct($optimizers = -1)
     {
@@ -50,13 +50,13 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
     /**
      * {@inheritdoc}
      */
-    public function enterNode(Twig_NodeInterface $node, Twig_Environment $env)
+    protected function doEnterNode(Twig_Node $node, Twig_Environment $env)
     {
         if (self::OPTIMIZE_FOR === (self::OPTIMIZE_FOR & $this->optimizers)) {
             $this->enterOptimizeFor($node, $env);
         }
 
-        if (!version_compare(phpversion(), '5.4.0RC1', '>=') && self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('sandbox')) {
+        if (PHP_VERSION_ID < 50400 && self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('sandbox')) {
             if ($this->inABody) {
                 if (!$node instanceof Twig_Node_Expression) {
                     if (get_class($node) !== 'Twig_Node') {
@@ -76,7 +76,7 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
     /**
      * {@inheritdoc}
      */
-    public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env)
+    protected function doLeaveNode(Twig_Node $node, Twig_Environment $env)
     {
         $expression = $node instanceof Twig_Node_Expression;
 
@@ -129,6 +129,8 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
      *
      * @param Twig_NodeInterface $node A Node
      * @param Twig_Environment   $env  The current Twig environment
+     *
+     * @return Twig_NodeInterface
      */
     protected function optimizePrintNode(Twig_NodeInterface $node, Twig_Environment $env)
     {
@@ -153,6 +155,8 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
      *
      * @param Twig_NodeInterface $node A Node
      * @param Twig_Environment   $env  The current Twig environment
+     *
+     * @return Twig_NodeInterface
      */
     protected function optimizeRawFilter(Twig_NodeInterface $node, Twig_Environment $env)
     {
@@ -205,6 +209,16 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
             $this->addLoopToAll();
         }
 
+        // include function without the with_context=false parameter
+        elseif ($node instanceof Twig_Node_Expression_Function
+            && 'include' === $node->getAttribute('name')
+            && (!$node->getNode('arguments')->hasNode('with_context')
+                 || false !== $node->getNode('arguments')->getNode('with_context')->getAttribute('value')
+               )
+        ) {
+            $this->addLoopToAll();
+        }
+
         // the loop variable is referenced via an attribute
         elseif ($node instanceof Twig_Node_Expression_GetAttr
             && (!$node->getNode('attribute') instanceof Twig_Node_Expression_Constant
diff --git a/vendor/Twig/NodeVisitor/SafeAnalysis.php b/vendor/Twig/NodeVisitor/SafeAnalysis.php
index a5d06de..439f5bf 100644
--- a/vendor/Twig/NodeVisitor/SafeAnalysis.php
+++ b/vendor/Twig/NodeVisitor/SafeAnalysis.php
@@ -1,6 +1,15 @@
 <?php
 
-class Twig_NodeVisitor_SafeAnalysis implements Twig_NodeVisitorInterface
+/*
+ * This file is part of Twig.
+ *
+ * (c) Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor
 {
     protected $data = array();
     protected $safeVars = array();
@@ -48,12 +57,18 @@ class Twig_NodeVisitor_SafeAnalysis implements Twig_NodeVisitorInterface
         );
     }
 
-    public function enterNode(Twig_NodeInterface $node, Twig_Environment $env)
+    /**
+     * {@inheritdoc}
+     */
+    protected function doEnterNode(Twig_Node $node, Twig_Environment $env)
     {
         return $node;
     }
 
-    public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env)
+    /**
+     * {@inheritdoc}
+     */
+    protected function doLeaveNode(Twig_Node $node, Twig_Environment $env)
     {
         if ($node instanceof Twig_Node_Expression_Constant) {
             // constants are marked safe for all
diff --git a/vendor/Twig/NodeVisitor/Sandbox.php b/vendor/Twig/NodeVisitor/Sandbox.php
index e5e3ff6..7f1b913 100644
--- a/vendor/Twig/NodeVisitor/Sandbox.php
+++ b/vendor/Twig/NodeVisitor/Sandbox.php
@@ -14,7 +14,7 @@
  *
  * @author Fabien Potencier <fabien@symfony.com>
  */
-class Twig_NodeVisitor_Sandbox implements Twig_NodeVisitorInterface
+class Twig_NodeVisitor_Sandbox extends Twig_BaseNodeVisitor
 {
     protected $inAModule = false;
     protected $tags;
@@ -22,14 +22,9 @@ class Twig_NodeVisitor_Sandbox implements Twig_NodeVisitorInterface
     protected $functions;
 
     /**
-     * Called before child nodes are visited.
-     *
-     * @param Twig_NodeInterface $node The node to visit
-     * @param Twig_Environment   $env  The Twig environment instance
-     *
-     * @return Twig_NodeInterface The modified node
+     * {@inheritdoc}
      */
-    public function enterNode(Twig_NodeInterface $node, Twig_Environment $env)
+    protected function doEnterNode(Twig_Node $node, Twig_Environment $env)
     {
         if ($node instanceof Twig_Node_Module) {
             $this->inAModule = true;
@@ -64,19 +59,14 @@ class Twig_NodeVisitor_Sandbox implements Twig_NodeVisitorInterface
     }
 
     /**
-     * Called after child nodes are visited.
-     *
-     * @param Twig_NodeInterface $node The node to visit
-     * @param Twig_Environment   $env  The Twig environment instance
-     *
-     * @return Twig_NodeInterface The modified node
+     * {@inheritdoc}
      */
-    public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env)
+    protected function doLeaveNode(Twig_Node $node, Twig_Environment $env)
     {
         if ($node instanceof Twig_Node_Module) {
             $this->inAModule = false;
 
-            return new Twig_Node_SandboxedModule($node, $this->filters, $this->tags, $this->functions);
+            $node->setNode('display_start', new Twig_Node(array(new Twig_Node_CheckSecurity($this->filters, $this->tags, $this->functions), $node->getNode('display_start'))));
         }
 
         return $node;
diff --git a/vendor/Twig/NodeVisitorInterface.php b/vendor/Twig/NodeVisitorInterface.php
index 608aded..f276163 100644
--- a/vendor/Twig/NodeVisitorInterface.php
+++ b/vendor/Twig/NodeVisitorInterface.php
@@ -41,7 +41,7 @@ interface Twig_NodeVisitorInterface
      *
      * Priority should be between -10 and 10 (0 is the default).
      *
-     * @return int     The priority level
+     * @return int The priority level
      */
     public function getPriority();
 }
diff --git a/vendor/Twig/Parser.php b/vendor/Twig/Parser.php
index 549ce2b..ed28a0e 100644
--- a/vendor/Twig/Parser.php
+++ b/vendor/Twig/Parser.php
@@ -64,7 +64,7 @@ class Twig_Parser implements Twig_ParserInterface
     {
         // push all variables into the stack to keep the current state of the parser
         $vars = get_object_vars($this);
-        unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser']);
+        unset($vars['stack'], $vars['env'], $vars['handlers'], $vars['visitors'], $vars['expressionParser'], $vars['reservedMacroNames']);
         $this->stack[] = $vars;
 
         // tag handlers
@@ -94,10 +94,8 @@ class Twig_Parser implements Twig_ParserInterface
         try {
             $body = $this->subparse($test, $dropNeedle);
 
-            if (null !== $this->parent) {
-                if (null === $body = $this->filterBodyNodes($body)) {
-                    $body = new Twig_Node();
-                }
+            if (null !== $this->parent && null === $body = $this->filterBodyNodes($body)) {
+                $body = new Twig_Node();
             }
         } catch (Twig_Error_Syntax $e) {
             if (!$e->getTemplateFile()) {
@@ -148,7 +146,7 @@ class Twig_Parser implements Twig_ParserInterface
                     $token = $this->getCurrentToken();
 
                     if ($token->getType() !== Twig_Token::NAME_TYPE) {
-                        throw new Twig_Error_Syntax('A block must start with a tag name', $token->getLine(), $this->getFilename());
+                        throw new Twig_Error_Syntax('A block must start with a tag name.', $token->getLine(), $this->getFilename());
                     }
 
                     if (null !== $test && call_user_func($test, $token)) {
@@ -166,20 +164,17 @@ class Twig_Parser implements Twig_ParserInterface
                     $subparser = $this->handlers->getTokenParser($token->getValue());
                     if (null === $subparser) {
                         if (null !== $test) {
-                            $error = sprintf('Unexpected tag name "%s"', $token->getValue());
+                            $e = new Twig_Error_Syntax(sprintf('Unexpected "%s" tag', $token->getValue()), $token->getLine(), $this->getFilename());
+
                             if (is_array($test) && isset($test[0]) && $test[0] instanceof Twig_TokenParserInterface) {
-                                $error .= sprintf(' (expecting closing tag for the "%s" tag defined near line %s)', $test[0]->getTag(), $lineno);
+                                $e->appendMessage(sprintf(' (expecting closing tag for the "%s" tag defined near line %s).', $test[0]->getTag(), $lineno));
                             }
-
-                            throw new Twig_Error_Syntax($error, $token->getLine(), $this->getFilename());
-                        }
-
-                        $message = sprintf('Unknown tag name "%s"', $token->getValue());
-                        if ($alternatives = $this->env->computeAlternatives($token->getValue(), array_keys($this->env->getTags()))) {
-                            $message = sprintf('%s. Did you mean "%s"', $message, implode('", "', $alternatives));
+                        } else {
+                            $e = new Twig_Error_Syntax(sprintf('Unknown "%s" tag.', $token->getValue()), $token->getLine(), $this->getFilename());
+                            $e->addSuggestions($token->getValue(), array_keys($this->env->getTags()));
                         }
 
-                        throw new Twig_Error_Syntax($message, $token->getLine(), $this->getFilename());
+                        throw $e;
                     }
 
                     $this->stream->next();
@@ -254,19 +249,28 @@ class Twig_Parser implements Twig_ParserInterface
 
     public function setMacro($name, Twig_Node_Macro $node)
     {
+        if ($this->isReservedMacroName($name)) {
+            throw new Twig_Error_Syntax(sprintf('"%s" cannot be used as a macro name as it is a reserved keyword.', $name), $node->getLine(), $this->getFilename());
+        }
+
+        $this->macros[$name] = $node;
+    }
+
+    public function isReservedMacroName($name)
+    {
         if (null === $this->reservedMacroNames) {
             $this->reservedMacroNames = array();
             $r = new ReflectionClass($this->env->getBaseTemplateClass());
             foreach ($r->getMethods() as $method) {
-                $this->reservedMacroNames[] = $method->getName();
-            }
-        }
+                $methodName = strtolower($method->getName());
 
-        if (in_array($name, $this->reservedMacroNames)) {
-            throw new Twig_Error_Syntax(sprintf('"%s" cannot be used as a macro name as it is a reserved keyword', $name), $node->getLine(), $this->getFilename());
+                if ('get' === substr($methodName, 0, 3) && isset($methodName[3])) {
+                    $this->reservedMacroNames[] = substr($methodName, 3);
+                }
+            }
         }
 
-        $this->macros[$name] = $node;
+        return in_array(strtolower($name), $this->reservedMacroNames);
     }
 
     public function addTrait($trait)
diff --git a/vendor/Twig/Profiler/Dumper/Blackfire.php b/vendor/Twig/Profiler/Dumper/Blackfire.php
new file mode 100644
index 0000000..b82747a
--- /dev/null
+++ b/vendor/Twig/Profiler/Dumper/Blackfire.php
@@ -0,0 +1,68 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_Profiler_Dumper_Blackfire
+{
+    public function dump(Twig_Profiler_Profile $profile)
+    {
+        $data = array();
+        $this->dumpProfile('main()', $profile, $data);
+        $this->dumpChildren('main()', $profile, $data);
+
+        $start = microtime(true);
+        $str = <<<EOF
+file-format: BlackfireProbe
+cost-dimensions: wt mu pmu
+request-start: {$start}
+
+
+EOF;
+
+        foreach ($data as $name => $values) {
+            $str .= "{$name}//{$values['ct']} {$values['wt']} {$values['mu']} {$values['pmu']}\n";
+        }
+
+        return $str;
+    }
+
+    private function dumpChildren($parent, Twig_Profiler_Profile $profile, &$data)
+    {
+        foreach ($profile as $p) {
+            if ($p->isTemplate()) {
+                $name = $p->getTemplate();
+            } else {
+                $name = sprintf('%s::%s(%s)', $p->getTemplate(), $p->getType(), $p->getName());
+            }
+            $this->dumpProfile(sprintf('%s==>%s', $parent, $name), $p, $data);
+            $this->dumpChildren($name, $p, $data);
+        }
+    }
+
+    private function dumpProfile($edge, Twig_Profiler_Profile $profile, &$data)
+    {
+        if (isset($data[$edge])) {
+            $data[$edge]['ct'] += 1;
+            $data[$edge]['wt'] += floor($profile->getDuration() * 1000000);
+            $data[$edge]['mu'] += $profile->getMemoryUsage();
+            $data[$edge]['pmu'] += $profile->getPeakMemoryUsage();
+        } else {
+            $data[$edge] = array(
+                'ct' => 1,
+                'wt' => floor($profile->getDuration() * 1000000),
+                'mu' => $profile->getMemoryUsage(),
+                'pmu' => $profile->getPeakMemoryUsage(),
+            );
+        }
+    }
+}
diff --git a/vendor/Twig/Profiler/Dumper/Html.php b/vendor/Twig/Profiler/Dumper/Html.php
new file mode 100644
index 0000000..f066da7
--- /dev/null
+++ b/vendor/Twig/Profiler/Dumper/Html.php
@@ -0,0 +1,43 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_Profiler_Dumper_Html extends Twig_Profiler_Dumper_Text
+{
+    private static $colors = array(
+        'block' => '#dfd',
+        'macro' => '#ddf',
+        'template' => '#ffd',
+        'big' => '#d44',
+    );
+
+    public function dump(Twig_Profiler_Profile $profile)
+    {
+        return '<pre>'.parent::dump($profile).'</pre>';
+    }
+
+    protected function formatTemplate(Twig_Profiler_Profile $profile, $prefix)
+    {
+        return sprintf('%s└ <span style="background-color: %s">%s</span>', $prefix, self::$colors['template'], $profile->getTemplate());
+    }
+
+    protected function formatNonTemplate(Twig_Profiler_Profile $profile, $prefix)
+    {
+        return sprintf('%s└ %s::%s(<span style="background-color: %s">%s</span>)', $prefix, $profile->getTemplate(), $profile->getType(), isset(self::$colors[$profile->getType()]) ? self::$colors[$profile->getType()] : 'auto', $profile->getName());
+    }
+
+    protected function formatTime(Twig_Profiler_Profile $profile, $percent)
+    {
+        return sprintf('<span style="color: %s">%.2fms/%.0f%%</span>', $percent > 20 ? self::$colors['big'] : 'auto', $profile->getDuration() * 1000, $percent);
+    }
+}
diff --git a/vendor/Twig/Profiler/Dumper/Text.php b/vendor/Twig/Profiler/Dumper/Text.php
new file mode 100644
index 0000000..998e210
--- /dev/null
+++ b/vendor/Twig/Profiler/Dumper/Text.php
@@ -0,0 +1,68 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_Profiler_Dumper_Text
+{
+    private $root;
+
+    public function dump(Twig_Profiler_Profile $profile)
+    {
+        return $this->dumpProfile($profile);
+    }
+
+    protected function formatTemplate(Twig_Profiler_Profile $profile, $prefix)
+    {
+        return sprintf('%s└ %s', $prefix, $profile->getTemplate());
+    }
+
+    protected function formatNonTemplate(Twig_Profiler_Profile $profile, $prefix)
+    {
+        return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName());
+    }
+
+    protected function formatTime(Twig_Profiler_Profile $profile, $percent)
+    {
+        return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent);
+    }
+
+    private function dumpProfile(Twig_Profiler_Profile $profile, $prefix = '', $sibling = false)
+    {
+        if ($profile->isRoot()) {
+            $this->root = $profile->getDuration();
+            $start = $profile->getName();
+        } else {
+            if ($profile->isTemplate()) {
+                $start = $this->formatTemplate($profile, $prefix);
+            } else {
+                $start = $this->formatNonTemplate($profile, $prefix);
+            }
+            $prefix .= $sibling ? '│ ' : '  ';
+        }
+
+        $percent = $this->root ? $profile->getDuration() / $this->root * 100 : 0;
+
+        if ($profile->getDuration() * 1000 < 1) {
+            $str = $start."\n";
+        } else {
+            $str = sprintf("%s %s\n", $start, $this->formatTime($profile, $percent));
+        }
+
+        $nCount = count($profile->getProfiles());
+        foreach ($profile as $i => $p) {
+            $str .= $this->dumpProfile($p, $prefix, $i + 1 !== $nCount);
+        }
+
+        return $str;
+    }
+}
diff --git a/vendor/Twig/Profiler/Node/EnterProfile.php b/vendor/Twig/Profiler/Node/EnterProfile.php
new file mode 100644
index 0000000..2f97214
--- /dev/null
+++ b/vendor/Twig/Profiler/Node/EnterProfile.php
@@ -0,0 +1,40 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Represents a profile enter node.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_Profiler_Node_EnterProfile extends Twig_Node
+{
+    public function __construct($extensionName, $type, $name, $varName)
+    {
+        parent::__construct(array(), array('extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function compile(Twig_Compiler $compiler)
+    {
+        $compiler
+            ->write(sprintf('$%s = $this->env->getExtension(', $this->getAttribute('var_name')))
+            ->repr($this->getAttribute('extension_name'))
+            ->raw(");\n")
+            ->write(sprintf('$%s->enter($%s = new Twig_Profiler_Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
+            ->repr($this->getAttribute('type'))
+            ->raw(', ')
+            ->repr($this->getAttribute('name'))
+            ->raw("));\n\n")
+        ;
+    }
+}
diff --git a/vendor/Twig/Profiler/Node/LeaveProfile.php b/vendor/Twig/Profiler/Node/LeaveProfile.php
new file mode 100644
index 0000000..88074c2
--- /dev/null
+++ b/vendor/Twig/Profiler/Node/LeaveProfile.php
@@ -0,0 +1,34 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Represents a profile leave node.
+ *
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_Profiler_Node_LeaveProfile extends Twig_Node
+{
+    public function __construct($varName)
+    {
+        parent::__construct(array(), array('var_name' => $varName));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function compile(Twig_Compiler $compiler)
+    {
+        $compiler
+            ->write("\n")
+            ->write(sprintf("\$%s->leave(\$%s);\n\n", $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
+        ;
+    }
+}
diff --git a/vendor/Twig/Profiler/NodeVisitor/Profiler.php b/vendor/Twig/Profiler/NodeVisitor/Profiler.php
new file mode 100644
index 0000000..4b0baa8
--- /dev/null
+++ b/vendor/Twig/Profiler/NodeVisitor/Profiler.php
@@ -0,0 +1,72 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_Profiler_NodeVisitor_Profiler extends Twig_BaseNodeVisitor
+{
+    private $extensionName;
+
+    public function __construct($extensionName)
+    {
+        $this->extensionName = $extensionName;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doEnterNode(Twig_Node $node, Twig_Environment $env)
+    {
+        return $node;
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    protected function doLeaveNode(Twig_Node $node, Twig_Environment $env)
+    {
+        if ($node instanceof Twig_Node_Module) {
+            $varName = $this->getVarName();
+            $node->setNode('display_start', new Twig_Node(array(new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::TEMPLATE, $node->getAttribute('filename'), $varName), $node->getNode('display_start'))));
+            $node->setNode('display_end', new Twig_Node(array(new Twig_Profiler_Node_LeaveProfile($varName), $node->getNode('display_end'))));
+        } elseif ($node instanceof Twig_Node_Block) {
+            $varName = $this->getVarName();
+            $node->setNode('body', new Twig_Node_Body(array(
+                new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::BLOCK, $node->getAttribute('name'), $varName),
+                $node->getNode('body'),
+                new Twig_Profiler_Node_LeaveProfile($varName),
+            )));
+        } elseif ($node instanceof Twig_Node_Macro) {
+            $varName = $this->getVarName();
+            $node->setNode('body', new Twig_Node_Body(array(
+                new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::MACRO, $node->getAttribute('name'), $varName),
+                $node->getNode('body'),
+                new Twig_Profiler_Node_LeaveProfile($varName),
+            )));
+        }
+
+        return $node;
+    }
+
+    private function getVarName()
+    {
+        return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false));
+    }
+
+    /**
+     * {@inheritdoc}
+     */
+    public function getPriority()
+    {
+        return 0;
+    }
+}
diff --git a/vendor/Twig/Profiler/Profile.php b/vendor/Twig/Profiler/Profile.php
new file mode 100644
index 0000000..104bc05
--- /dev/null
+++ b/vendor/Twig/Profiler/Profile.php
@@ -0,0 +1,160 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) 2015 Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_Profiler_Profile implements IteratorAggregate, Serializable
+{
+    const ROOT = 'ROOT';
+    const BLOCK = 'block';
+    const TEMPLATE = 'template';
+    const MACRO = 'macro';
+
+    private $template;
+    private $name;
+    private $type;
+    private $starts = array();
+    private $ends = array();
+    private $profiles = array();
+
+    public function __construct($template = 'main', $type = self::ROOT, $name = 'main')
+    {
+        $this->template = $template;
+        $this->type = $type;
+        $this->name = 0 === strpos($name, '__internal_') ? 'INTERNAL' : $name;
+        $this->enter();
+    }
+
+    public function getTemplate()
+    {
+        return $this->template;
+    }
+
+    public function getType()
+    {
+        return $this->type;
+    }
+
+    public function getName()
+    {
+        return $this->name;
+    }
+
+    public function isRoot()
+    {
+        return self::ROOT === $this->type;
+    }
+
+    public function isTemplate()
+    {
+        return self::TEMPLATE === $this->type;
+    }
+
+    public function isBlock()
+    {
+        return self::BLOCK === $this->type;
+    }
+
+    public function isMacro()
+    {
+        return self::MACRO === $this->type;
+    }
+
+    public function getProfiles()
+    {
+        return $this->profiles;
+    }
+
+    public function addProfile(Twig_Profiler_Profile $profile)
+    {
+        $this->profiles[] = $profile;
+    }
+
+    /**
+     * Returns the duration in microseconds.
+     *
+     * @return int
+     */
+    public function getDuration()
+    {
+        if ($this->isRoot() && $this->profiles) {
+            // for the root node with children, duration is the sum of all child durations
+            $duration = 0;
+            foreach ($this->profiles as $profile) {
+                $duration += $profile->getDuration();
+            }
+
+            return $duration;
+        }
+
+        return isset($this->ends['wt']) && isset($this->starts['wt']) ? $this->ends['wt'] - $this->starts['wt'] : 0;
+    }
+
+    /**
+     * Returns the memory usage in bytes.
+     *
+     * @return int
+     */
+    public function getMemoryUsage()
+    {
+        return isset($this->ends['mu']) && isset($this->starts['mu']) ? $this->ends['mu'] - $this->starts['mu'] : 0;
+    }
+
+    /**
+     * Returns the peak memory usage in bytes.
+     *
+     * @return int
+     */
+    public function getPeakMemoryUsage()
+    {
+        return isset($this->ends['pmu']) && isset($this->starts['pmu']) ? $this->ends['pmu'] - $this->starts['pmu'] : 0;
+    }
+
+    /**
+     * Starts the profiling.
+     */
+    public function enter()
+    {
+        $this->starts = array(
+            'wt' => microtime(true),
+            'mu' => memory_get_usage(),
+            'pmu' => memory_get_peak_usage(),
+        );
+    }
+
+    /**
+     * Stops the profiling.
+     */
+    public function leave()
+    {
+        $this->ends = array(
+            'wt' => microtime(true),
+            'mu' => memory_get_usage(),
+            'pmu' => memory_get_peak_usage(),
+        );
+    }
+
+    public function getIterator()
+    {
+        return new ArrayIterator($this->profiles);
+    }
+
+    public function serialize()
+    {
+        return serialize(array($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles));
+    }
+
+    public function unserialize($data)
+    {
+        list($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles) = unserialize($data);
+    }
+}
diff --git a/vendor/Twig/SimpleFilter.php b/vendor/Twig/SimpleFilter.php
index d35c563..cefc4f5 100644
--- a/vendor/Twig/SimpleFilter.php
+++ b/vendor/Twig/SimpleFilter.php
@@ -27,12 +27,15 @@ class Twig_SimpleFilter
         $this->callable = $callable;
         $this->options = array_merge(array(
             'needs_environment' => false,
-            'needs_context'     => false,
-            'is_safe'           => null,
-            'is_safe_callback'  => null,
-            'pre_escape'        => null,
-            'preserves_safety'  => null,
-            'node_class'        => 'Twig_Node_Expression_Filter',
+            'needs_context' => false,
+            'is_variadic' => false,
+            'is_safe' => null,
+            'is_safe_callback' => null,
+            'pre_escape' => null,
+            'preserves_safety' => null,
+            'node_class' => 'Twig_Node_Expression_Filter',
+            'deprecated' => false,
+            'alternative' => null,
         ), $options);
     }
 
@@ -91,4 +94,19 @@ class Twig_SimpleFilter
     {
         return $this->options['pre_escape'];
     }
+
+    public function isVariadic()
+    {
+        return $this->options['is_variadic'];
+    }
+
+    public function isDeprecated()
+    {
+        return $this->options['deprecated'];
+    }
+
+    public function getAlternative()
+    {
+        return $this->options['alternative'];
+    }
 }
diff --git a/vendor/Twig/SimpleFunction.php b/vendor/Twig/SimpleFunction.php
index 8ef6aca..7973540 100644
--- a/vendor/Twig/SimpleFunction.php
+++ b/vendor/Twig/SimpleFunction.php
@@ -27,10 +27,13 @@ class Twig_SimpleFunction
         $this->callable = $callable;
         $this->options = array_merge(array(
             'needs_environment' => false,
-            'needs_context'     => false,
-            'is_safe'           => null,
-            'is_safe_callback'  => null,
-            'node_class'        => 'Twig_Node_Expression_Function',
+            'needs_context' => false,
+            'is_variadic' => false,
+            'is_safe' => null,
+            'is_safe_callback' => null,
+            'node_class' => 'Twig_Node_Expression_Function',
+            'deprecated' => false,
+            'alternative' => null,
         ), $options);
     }
 
@@ -81,4 +84,19 @@ class Twig_SimpleFunction
 
         return array();
     }
+
+    public function isVariadic()
+    {
+        return $this->options['is_variadic'];
+    }
+
+    public function isDeprecated()
+    {
+        return $this->options['deprecated'];
+    }
+
+    public function getAlternative()
+    {
+        return $this->options['alternative'];
+    }
 }
diff --git a/vendor/Twig/SimpleTest.php b/vendor/Twig/SimpleTest.php
index 225459c..8ba2192 100644
--- a/vendor/Twig/SimpleTest.php
+++ b/vendor/Twig/SimpleTest.php
@@ -25,7 +25,10 @@ class Twig_SimpleTest
         $this->name = $name;
         $this->callable = $callable;
         $this->options = array_merge(array(
+            'is_variadic' => false,
             'node_class' => 'Twig_Node_Expression_Test',
+            'deprecated' => false,
+            'alternative' => null,
         ), $options);
     }
 
@@ -43,4 +46,19 @@ class Twig_SimpleTest
     {
         return $this->options['node_class'];
     }
+
+    public function isVariadic()
+    {
+        return $this->options['is_variadic'];
+    }
+
+    public function isDeprecated()
+    {
+        return $this->options['deprecated'];
+    }
+
+    public function getAlternative()
+    {
+        return $this->options['alternative'];
+    }
 }
diff --git a/vendor/Twig/Template.php b/vendor/Twig/Template.php
index 63910da..a816022 100644
--- a/vendor/Twig/Template.php
+++ b/vendor/Twig/Template.php
@@ -20,10 +20,10 @@ abstract class Twig_Template implements Twig_TemplateInterface
     protected static $cache = array();
 
     protected $parent;
-    protected $parents;
+    protected $parents = array();
     protected $env;
-    protected $blocks;
-    protected $traits;
+    protected $blocks = array();
+    protected $traits = array();
 
     /**
      * Constructor.
@@ -33,8 +33,6 @@ abstract class Twig_Template implements Twig_TemplateInterface
     public function __construct(Twig_Environment $env)
     {
         $this->env = $env;
-        $this->blocks = array();
-        $this->traits = array();
     }
 
     /**
@@ -45,10 +43,12 @@ abstract class Twig_Template implements Twig_TemplateInterface
     abstract public function getTemplateName();
 
     /**
-     * {@inheritdoc}
+     * @deprecated since 1.20 (to be removed in 2.0)
      */
     public function getEnvironment()
     {
+        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.20 and will be removed in 2.0.', E_USER_DEPRECATED);
+
         return $this->env;
     }
 
@@ -58,7 +58,11 @@ abstract class Twig_Template implements Twig_TemplateInterface
      * This method is for internal use only and should never be called
      * directly.
      *
+     * @param array $context
+     *
      * @return Twig_TemplateInterface|false The parent template or false if there is no parent
+     *
+     * @internal
      */
     public function getParent(array $context)
     {
@@ -66,15 +70,25 @@ abstract class Twig_Template implements Twig_TemplateInterface
             return $this->parent;
         }
 
-        $parent = $this->doGetParent($context);
-        if (false === $parent) {
-            return false;
-        } elseif ($parent instanceof Twig_Template) {
-            $name = $parent->getTemplateName();
-            $this->parents[$name] = $parent;
-            $parent = $name;
-        } elseif (!isset($this->parents[$parent])) {
-            $this->parents[$parent] = $this->env->loadTemplate($parent);
+        try {
+            $parent = $this->doGetParent($context);
+
+            if (false === $parent) {
+                return false;
+            }
+
+            if ($parent instanceof self) {
+                return $this->parents[$parent->getTemplateName()] = $parent;
+            }
+
+            if (!isset($this->parents[$parent])) {
+                $this->parents[$parent] = $this->loadTemplate($parent);
+            }
+        } catch (Twig_Error_Loader $e) {
+            $e->setTemplateFile(null);
+            $e->guess();
+
+            throw $e;
         }
 
         return $this->parents[$parent];
@@ -99,6 +113,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
      * @param string $name    The block name to display from the parent
      * @param array  $context The context
      * @param array  $blocks  The current set of blocks
+     *
+     * @internal
      */
     public function displayParentBlock($name, array $context, array $blocks = array())
     {
@@ -119,10 +135,12 @@ abstract class Twig_Template implements Twig_TemplateInterface
      * This method is for internal use only and should never be called
      * directly.
      *
-     * @param string  $name      The block name to display
-     * @param array   $context   The context
-     * @param array   $blocks    The current set of blocks
-     * @param bool    $useBlocks Whether to use the current set of blocks
+     * @param string $name      The block name to display
+     * @param array  $context   The context
+     * @param array  $blocks    The current set of blocks
+     * @param bool   $useBlocks Whether to use the current set of blocks
+     *
+     * @internal
      */
     public function displayBlock($name, array $context, array $blocks = array(), $useBlocks = true)
     {
@@ -140,9 +158,25 @@ abstract class Twig_Template implements Twig_TemplateInterface
         }
 
         if (null !== $template) {
+            // avoid RCEs when sandbox is enabled
+            if (!$template instanceof self) {
+                throw new LogicException('A block must be a method on a Twig_Template instance.');
+            }
+
             try {
                 $template->$block($context, $blocks);
             } catch (Twig_Error $e) {
+                if (!$e->getTemplateFile()) {
+                    $e->setTemplateFile($template->getTemplateName());
+                }
+
+                // this is mostly useful for Twig_Error_Loader exceptions
+                // see Twig_Error_Loader
+                if (false === $e->getTemplateLine()) {
+                    $e->setTemplateLine(-1);
+                    $e->guess();
+                }
+
                 throw $e;
             } catch (Exception $e) {
                 throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getTemplateName(), $e);
@@ -163,6 +197,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
      * @param array  $blocks  The current set of blocks
      *
      * @return string The rendered block
+     *
+     * @internal
      */
     public function renderParentBlock($name, array $context, array $blocks = array())
     {
@@ -178,12 +214,14 @@ abstract class Twig_Template implements Twig_TemplateInterface
      * This method is for internal use only and should never be called
      * directly.
      *
-     * @param string  $name      The block name to render
-     * @param array   $context   The context
-     * @param array   $blocks    The current set of blocks
-     * @param bool    $useBlocks Whether to use the current set of blocks
+     * @param string $name      The block name to render
+     * @param array  $context   The context
+     * @param array  $blocks    The current set of blocks
+     * @param bool   $useBlocks Whether to use the current set of blocks
      *
      * @return string The rendered block
+     *
+     * @internal
      */
     public function renderBlock($name, array $context, array $blocks = array(), $useBlocks = true)
     {
@@ -208,7 +246,9 @@ abstract class Twig_Template implements Twig_TemplateInterface
      *
      * @param string $name The block name
      *
-     * @return bool    true if the block exists, false otherwise
+     * @return bool true if the block exists, false otherwise
+     *
+     * @internal
      */
     public function hasBlock($name)
     {
@@ -224,12 +264,45 @@ abstract class Twig_Template implements Twig_TemplateInterface
      * @return array An array of block names
      *
      * @see hasBlock
+     *
+     * @internal
      */
     public function getBlockNames()
     {
         return array_keys($this->blocks);
     }
 
+    protected function loadTemplate($template, $templateName = null, $line = null, $index = null)
+    {
+        try {
+            if (is_array($template)) {
+                return $this->env->resolveTemplate($template);
+            }
+
+            if ($template instanceof self) {
+                return $template;
+            }
+
+            return $this->env->loadTemplate($template, $index);
+        } catch (Twig_Error $e) {
+            if (!$e->getTemplateFile()) {
+                $e->setTemplateFile($templateName ? $templateName : $this->getTemplateName());
+            }
+
+            if ($e->getTemplateLine()) {
+                throw $e;
+            }
+
+            if (!$line) {
+                $e->guess();
+            } else {
+                $e->setTemplateLine($line);
+            }
+
+            throw $e;
+        }
+    }
+
     /**
      * Returns all blocks.
      *
@@ -239,6 +312,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
      * @return array An array of blocks
      *
      * @see hasBlock
+     *
+     * @internal
      */
     public function getBlocks()
     {
@@ -246,6 +321,33 @@ abstract class Twig_Template implements Twig_TemplateInterface
     }
 
     /**
+     * Returns the template source code.
+     *
+     * @return string|null The template source code or null if it is not available
+     */
+    public function getSource()
+    {
+        $reflector = new ReflectionClass($this);
+        $file = $reflector->getFileName();
+
+        if (!file_exists($file)) {
+            return;
+        }
+
+        $source = file($file, FILE_IGNORE_NEW_LINES);
+        array_splice($source, 0, $reflector->getEndLine());
+
+        $i = 0;
+        while (isset($source[$i]) && '/* */' === substr_replace($source[$i], '', 3, -2)) {
+            $source[$i] = str_replace('*//* ', '*/', substr($source[$i], 3, -2));
+            ++$i;
+        }
+        array_splice($source, $i);
+
+        return implode("\n", $source);
+    }
+
+    /**
      * {@inheritdoc}
      */
     public function display(array $context, array $blocks = array())
@@ -314,13 +416,15 @@ abstract class Twig_Template implements Twig_TemplateInterface
      * access for versions of PHP before 5.4. This is not a way to override
      * the way to get a variable value.
      *
-     * @param array   $context           The context
-     * @param string  $item              The variable to return from the context
-     * @param bool    $ignoreStrictCheck Whether to ignore the strict variable check or not
+     * @param array  $context           The context
+     * @param string $item              The variable to return from the context
+     * @param bool   $ignoreStrictCheck Whether to ignore the strict variable check or not
      *
-     * @return The content of the context variable
+     * @return mixed The content of the context variable
      *
      * @throws Twig_Error_Runtime if the variable does not exist and Twig is running in strict mode
+     *
+     * @internal
      */
     final protected function getContext($context, $item, $ignoreStrictCheck = false)
     {
@@ -338,21 +442,21 @@ abstract class Twig_Template implements Twig_TemplateInterface
     /**
      * Returns the attribute value for a given array/object.
      *
-     * @param mixed   $object            The object or array from where to get the item
-     * @param mixed   $item              The item to get from the array or object
-     * @param array   $arguments         An array of arguments to pass if the item is an object method
-     * @param string  $type              The type of attribute (@see Twig_Template constants)
-     * @param bool    $isDefinedTest     Whether this is only a defined check
-     * @param bool    $ignoreStrictCheck Whether to ignore the strict attribute check or not
+     * @param mixed  $object            The object or array from where to get the item
+     * @param mixed  $item              The item to get from the array or object
+     * @param array  $arguments         An array of arguments to pass if the item is an object method
+     * @param string $type              The type of attribute (@see Twig_Template constants)
+     * @param bool   $isDefinedTest     Whether this is only a defined check
+     * @param bool   $ignoreStrictCheck Whether to ignore the strict attribute check or not
      *
      * @return mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true
      *
      * @throws Twig_Error_Runtime if the attribute does not exist and Twig is running in strict mode and $isDefinedTest is false
      */
-    protected function getAttribute($object, $item, array $arguments = array(), $type = Twig_Template::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false)
+    protected function getAttribute($object, $item, array $arguments = array(), $type = self::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false)
     {
         // array
-        if (Twig_Template::METHOD_CALL !== $type) {
+        if (self::METHOD_CALL !== $type) {
             $arrayItem = is_bool($item) || is_float($item) ? (int) $item : $item;
 
             if ((is_array($object) && array_key_exists($arrayItem, $object))
@@ -365,7 +469,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
                 return $object[$arrayItem];
             }
 
-            if (Twig_Template::ARRAY_CALL === $type || !is_object($object)) {
+            if (self::ARRAY_CALL === $type || !is_object($object)) {
                 if ($isDefinedTest) {
                     return false;
                 }
@@ -384,8 +488,14 @@ abstract class Twig_Template implements Twig_TemplateInterface
                     } else {
                         $message = sprintf('Key "%s" for array with keys "%s" does not exist', $arrayItem, implode(', ', array_keys($object)));
                     }
-                } elseif (Twig_Template::ARRAY_CALL === $type) {
-                    $message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s")', $item, gettype($object), $object);
+                } elseif (self::ARRAY_CALL === $type) {
+                    if (null === $object) {
+                        $message = sprintf('Impossible to access a key ("%s") on a null variable', $item);
+                    } else {
+                        $message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s")', $item, gettype($object), $object);
+                    }
+                } elseif (null === $object) {
+                    $message = sprintf('Impossible to access an attribute ("%s") on a null variable', $item);
                 } else {
                     $message = sprintf('Impossible to access an attribute ("%s") on a %s variable ("%s")', $item, gettype($object), $object);
                 }
@@ -403,11 +513,17 @@ abstract class Twig_Template implements Twig_TemplateInterface
                 return;
             }
 
-            throw new Twig_Error_Runtime(sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s")', $item, gettype($object), $object), -1, $this->getTemplateName());
+            if (null === $object) {
+                $message = sprintf('Impossible to invoke a method ("%s") on a null variable', $item);
+            } else {
+                $message = sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s")', $item, gettype($object), $object);
+            }
+
+            throw new Twig_Error_Runtime($message, -1, $this->getTemplateName());
         }
 
         // object property
-        if (Twig_Template::METHOD_CALL !== $type) {
+        if (self::METHOD_CALL !== $type && !$object instanceof self) { // Twig_Template does not have public properties, and we don't want to allow access to internal ones
             if (isset($object->$item) || array_key_exists((string) $item, $object)) {
                 if ($isDefinedTest) {
                     return true;
@@ -425,7 +541,24 @@ abstract class Twig_Template implements Twig_TemplateInterface
 
         // object method
         if (!isset(self::$cache[$class]['methods'])) {
-            self::$cache[$class]['methods'] = array_change_key_case(array_flip(get_class_methods($object)));
+            // get_class_methods returns all methods accessible in the scope, but we only want public ones to be accessible in templates
+            if ($object instanceof self) {
+                $ref = new ReflectionClass($class);
+                $methods = array();
+
+                foreach ($ref->getMethods(ReflectionMethod::IS_PUBLIC) as $refMethod) {
+                    $methodName = strtolower($refMethod->name);
+
+                    // Accessing the environment from templates is forbidden to prevent untrusted changes to the environment
+                    if ('getenvironment' !== $methodName) {
+                        $methods[$methodName] = true;
+                    }
+                }
+
+                self::$cache[$class]['methods'] = $methods;
+            } else {
+                self::$cache[$class]['methods'] = array_change_key_case(array_flip(get_class_methods($object)));
+            }
         }
 
         $call = false;
@@ -478,12 +611,4 @@ abstract class Twig_Template implements Twig_TemplateInterface
 
         return $ret;
     }
-
-    /**
-     * This method is only useful when testing Twig. Do not use it.
-     */
-    public static function clearCache()
-    {
-        self::$cache = array();
-    }
 }
diff --git a/vendor/Twig/TemplateInterface.php b/vendor/Twig/TemplateInterface.php
index d178832..3274640 100644
--- a/vendor/Twig/TemplateInterface.php
+++ b/vendor/Twig/TemplateInterface.php
@@ -18,8 +18,8 @@
  */
 interface Twig_TemplateInterface
 {
-    const ANY_CALL    = 'any';
-    const ARRAY_CALL  = 'array';
+    const ANY_CALL = 'any';
+    const ARRAY_CALL = 'array';
     const METHOD_CALL = 'method';
 
     /**
diff --git a/vendor/Twig/Test.php b/vendor/Twig/Test.php
index 3baff88..3c2d859 100644
--- a/vendor/Twig/Test.php
+++ b/vendor/Twig/Test.php
@@ -9,10 +9,13 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Test class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleTest instead.', E_USER_DEPRECATED);
+
 /**
  * Represents a template test.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 abstract class Twig_Test implements Twig_TestInterface, Twig_TestCallableInterface
diff --git a/vendor/Twig/Test/Function.php b/vendor/Twig/Test/Function.php
index 4be6b9b..5e76c71 100644
--- a/vendor/Twig/Test/Function.php
+++ b/vendor/Twig/Test/Function.php
@@ -9,10 +9,13 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Test_Function class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleTest instead.', E_USER_DEPRECATED);
+
 /**
  * Represents a function template test.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 class Twig_Test_Function extends Twig_Test
diff --git a/vendor/Twig/Test/IntegrationTestCase.php b/vendor/Twig/Test/IntegrationTestCase.php
index 724f094..45ca7dc 100644
--- a/vendor/Twig/Test/IntegrationTestCase.php
+++ b/vendor/Twig/Test/IntegrationTestCase.php
@@ -10,17 +10,51 @@
  */
 
 /**
- * Integration test helper
+ * Integration test helper.
  *
  * @author Fabien Potencier <fabien@symfony.com>
  * @author Karma Dordrak <drak@zikula.org>
  */
 abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
 {
-    abstract protected function getExtensions();
+    /**
+     * @return string
+     */
     abstract protected function getFixturesDir();
 
     /**
+     * @return Twig_ExtensionInterface[]
+     */
+    protected function getExtensions()
+    {
+        return array();
+    }
+
+    /**
+     * @return Twig_SimpleFilter[]
+     */
+    protected function getTwigFilters()
+    {
+        return array();
+    }
+
+    /**
+     * @return Twig_SimpleFunction[]
+     */
+    protected function getTwigFunctions()
+    {
+        return array();
+    }
+
+    /**
+     * @return Twig_SimpleTest[]
+     */
+    protected function getTwigTests()
+    {
+        return array();
+    }
+
+    /**
      * @dataProvider getTests
      */
     public function testIntegration($file, $message, $condition, $templates, $exception, $outputs)
@@ -28,7 +62,16 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
         $this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs);
     }
 
-    public function getTests()
+    /**
+     * @dataProvider getLegacyTests
+     * @group legacy
+     */
+    public function testLegacyIntegration($file, $message, $condition, $templates, $exception, $outputs)
+    {
+        $this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs);
+    }
+
+    public function getTests($name, $legacyTests = false)
     {
         $fixturesDir = realpath($this->getFixturesDir());
         $tests = array();
@@ -38,19 +81,22 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
                 continue;
             }
 
+            if ($legacyTests xor false !== strpos($file->getRealpath(), '.legacy.test')) {
+                continue;
+            }
+
             $test = file_get_contents($file->getRealpath());
 
-            if (preg_match('/
-                    --TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)\s*(?:--DATA--\s*(.*))?\s*--EXCEPTION--\s*(.*)/sx', $test, $match)) {
+            if (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)\s*(?:--DATA--\s*(.*))?\s*--EXCEPTION--\s*(.*)/sx', $test, $match)) {
                 $message = $match[1];
                 $condition = $match[2];
-                $templates = $this->parseTemplates($match[3]);
+                $templates = self::parseTemplates($match[3]);
                 $exception = $match[5];
                 $outputs = array(array(null, $match[4], null, ''));
             } elseif (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) {
                 $message = $match[1];
                 $condition = $match[2];
-                $templates = $this->parseTemplates($match[3]);
+                $templates = self::parseTemplates($match[3]);
                 $exception = false;
                 preg_match_all('/--DATA--(.*?)(?:--CONFIG--(.*?))?--EXPECT--(.*?)(?=\-\-DATA\-\-|$)/s', $test, $outputs, PREG_SET_ORDER);
             } else {
@@ -60,9 +106,19 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
             $tests[] = array(str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs);
         }
 
+        if ($legacyTests && empty($tests)) {
+            // add a dummy test to avoid a PHPUnit message
+            return array(array('not', '-', '', array(), '', array()));
+        }
+
         return $tests;
     }
 
+    public function getLegacyTests()
+    {
+        return $this->getTests('testLegacyIntegration', true);
+    }
+
     protected function doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs)
     {
         if ($condition) {
@@ -74,7 +130,7 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
 
         $loader = new Twig_Loader_Array($templates);
 
-        foreach ($outputs as $match) {
+        foreach ($outputs as $i => $match) {
             $config = array_merge(array(
                 'cache' => false,
                 'strict_variables' => true,
@@ -85,11 +141,33 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
                 $twig->addExtension($extension);
             }
 
+            foreach ($this->getTwigFilters() as $filter) {
+                $twig->addFilter($filter);
+            }
+
+            foreach ($this->getTwigTests() as $test) {
+                $twig->addTest($test);
+            }
+
+            foreach ($this->getTwigFunctions() as $function) {
+                $twig->addFunction($function);
+            }
+
+            // avoid using the same PHP class name for different cases
+            // only for PHP 5.2+
+            if (PHP_VERSION_ID >= 50300) {
+                $p = new ReflectionProperty($twig, 'templateClassPrefix');
+                $p->setAccessible(true);
+                $p->setValue($twig, '__TwigTemplate_'.hash('sha256', uniqid(mt_rand(), true), false).'_');
+            }
+
             try {
                 $template = $twig->loadTemplate('index.twig');
             } catch (Exception $e) {
                 if (false !== $exception) {
-                    $this->assertEquals(trim($exception), trim(sprintf('%s: %s', get_class($e), $e->getMessage())));
+                    $message = $e->getMessage();
+                    $this->assertSame(trim($exception), trim(sprintf('%s: %s', get_class($e), $message)));
+                    $this->assertSame('.', substr($message, strlen($message) - 1), $message, 'Exception message must end with a dot.');
 
                     return;
                 }
@@ -107,7 +185,7 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
                 $output = trim($template->render(eval($match[1].';')), "\n ");
             } catch (Exception $e) {
                 if (false !== $exception) {
-                    $this->assertEquals(trim($exception), trim(sprintf('%s: %s', get_class($e), $e->getMessage())));
+                    $this->assertSame(trim($exception), trim(sprintf('%s: %s', get_class($e), $e->getMessage())));
 
                     return;
                 }
@@ -122,14 +200,14 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
             }
 
             if (false !== $exception) {
-                list($class, ) = explode(':', $exception);
-                $this->assertThat(NULL, new PHPUnit_Framework_Constraint_Exception($class));
+                list($class) = explode(':', $exception);
+                $this->assertThat(null, new PHPUnit_Framework_Constraint_Exception($class));
             }
 
             $expected = trim($match[3], "\n ");
 
-            if ($expected != $output) {
-                echo 'Compiled template that failed:';
+            if ($expected !== $output) {
+                printf("Compiled templates that failed on case %d:\n", $i + 1);
 
                 foreach (array_keys($templates) as $name) {
                     echo "Template: $name\n";
diff --git a/vendor/Twig/Test/Method.php b/vendor/Twig/Test/Method.php
index 17c6c04..2779986 100644
--- a/vendor/Twig/Test/Method.php
+++ b/vendor/Twig/Test/Method.php
@@ -9,10 +9,13 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Test_Method class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleTest instead.', E_USER_DEPRECATED);
+
 /**
  * Represents a method template test.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 class Twig_Test_Method extends Twig_Test
diff --git a/vendor/Twig/Test/Node.php b/vendor/Twig/Test/Node.php
index c832a57..baef49c 100644
--- a/vendor/Twig/Test/Node.php
+++ b/vendor/Twig/Test/Node.php
@@ -9,10 +9,13 @@
  * file that was distributed with this source code.
  */
 
+@trigger_error('The Twig_Test_Node class is deprecated since version 1.12 and will be removed in 2.0.', E_USER_DEPRECATED);
+
 /**
  * Represents a template test as a Node.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 class Twig_Test_Node extends Twig_Test
diff --git a/vendor/Twig/Test/NodeTestCase.php b/vendor/Twig/Test/NodeTestCase.php
index b15c85f..e591c1d 100644
--- a/vendor/Twig/Test/NodeTestCase.php
+++ b/vendor/Twig/Test/NodeTestCase.php
@@ -15,17 +15,21 @@ abstract class Twig_Test_NodeTestCase extends PHPUnit_Framework_TestCase
     /**
      * @dataProvider getTests
      */
-    public function testCompile($node, $source, $environment = null)
+    public function testCompile($node, $source, $environment = null, $isPattern = false)
     {
-        $this->assertNodeCompilation($source, $node, $environment);
+        $this->assertNodeCompilation($source, $node, $environment, $isPattern);
     }
 
-    public function assertNodeCompilation($source, Twig_Node $node, Twig_Environment $environment = null)
+    public function assertNodeCompilation($source, Twig_Node $node, Twig_Environment $environment = null, $isPattern = false)
     {
         $compiler = $this->getCompiler($environment);
         $compiler->compile($node);
 
-        $this->assertEquals($source, trim($compiler->getSource()));
+        if ($isPattern) {
+            $this->assertStringMatchesFormat($source, trim($compiler->getSource()));
+        } else {
+            $this->assertEquals($source, trim($compiler->getSource()));
+        }
     }
 
     protected function getCompiler(Twig_Environment $environment = null)
@@ -35,16 +39,18 @@ abstract class Twig_Test_NodeTestCase extends PHPUnit_Framework_TestCase
 
     protected function getEnvironment()
     {
-        return new Twig_Environment();
+        return new Twig_Environment(new Twig_Loader_Array(array()));
     }
 
-    protected function getVariableGetter($name)
+    protected function getVariableGetter($name, $line = false)
     {
-        if (version_compare(phpversion(), '5.4.0RC1', '>=')) {
-            return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name);
+        $line = $line > 0 ? "// line {$line}\n" : '';
+
+        if (PHP_VERSION_ID >= 50400) {
+            return sprintf('%s(isset($context["%s"]) ? $context["%s"] : null)', $line, $name, $name);
         }
 
-        return sprintf('$this->getContext($context, "%s")', $name);
+        return sprintf('%s$this->getContext($context, "%s")', $line, $name);
     }
 
     protected function getAttributeGetter()
diff --git a/vendor/Twig/TestCallableInterface.php b/vendor/Twig/TestCallableInterface.php
index 0db4368..98d3457 100644
--- a/vendor/Twig/TestCallableInterface.php
+++ b/vendor/Twig/TestCallableInterface.php
@@ -13,6 +13,7 @@
  * Represents a callable template test.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 interface Twig_TestCallableInterface
diff --git a/vendor/Twig/TestInterface.php b/vendor/Twig/TestInterface.php
index 30d8a2c..2fa821c 100644
--- a/vendor/Twig/TestInterface.php
+++ b/vendor/Twig/TestInterface.php
@@ -13,6 +13,7 @@
  * Represents a template test.
  *
  * @author Fabien Potencier <fabien@symfony.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 interface Twig_TestInterface
diff --git a/vendor/Twig/Token.php b/vendor/Twig/Token.php
index 599f9f5..a0a029b 100644
--- a/vendor/Twig/Token.php
+++ b/vendor/Twig/Token.php
@@ -21,31 +21,31 @@ class Twig_Token
     protected $type;
     protected $lineno;
 
-    const EOF_TYPE                  = -1;
-    const TEXT_TYPE                 = 0;
-    const BLOCK_START_TYPE          = 1;
-    const VAR_START_TYPE            = 2;
-    const BLOCK_END_TYPE            = 3;
-    const VAR_END_TYPE              = 4;
-    const NAME_TYPE                 = 5;
-    const NUMBER_TYPE               = 6;
-    const STRING_TYPE               = 7;
-    const OPERATOR_TYPE             = 8;
-    const PUNCTUATION_TYPE          = 9;
-    const INTERPOLATION_START_TYPE  = 10;
-    const INTERPOLATION_END_TYPE    = 11;
+    const EOF_TYPE = -1;
+    const TEXT_TYPE = 0;
+    const BLOCK_START_TYPE = 1;
+    const VAR_START_TYPE = 2;
+    const BLOCK_END_TYPE = 3;
+    const VAR_END_TYPE = 4;
+    const NAME_TYPE = 5;
+    const NUMBER_TYPE = 6;
+    const STRING_TYPE = 7;
+    const OPERATOR_TYPE = 8;
+    const PUNCTUATION_TYPE = 9;
+    const INTERPOLATION_START_TYPE = 10;
+    const INTERPOLATION_END_TYPE = 11;
 
     /**
      * Constructor.
      *
-     * @param int     $type   The type of the token
-     * @param string  $value  The token value
-     * @param int     $lineno The line position in the source
+     * @param int    $type   The type of the token
+     * @param string $value  The token value
+     * @param int    $lineno The line position in the source
      */
     public function __construct($type, $value, $lineno)
     {
-        $this->type   = $type;
-        $this->value  = $value;
+        $this->type = $type;
+        $this->value = $value;
         $this->lineno = $lineno;
     }
 
@@ -89,7 +89,7 @@ class Twig_Token
     /**
      * Gets the line.
      *
-     * @return int     The source line
+     * @return int The source line
      */
     public function getLine()
     {
@@ -99,7 +99,7 @@ class Twig_Token
     /**
      * Gets the token type.
      *
-     * @return int     The token type
+     * @return int The token type
      */
     public function getType()
     {
@@ -119,8 +119,8 @@ class Twig_Token
     /**
      * Returns the constant representation (internal) of a given type.
      *
-     * @param int     $type  The type as an integer
-     * @param bool    $short Whether to return a short representation or not
+     * @param int  $type  The type as an integer
+     * @param bool $short Whether to return a short representation or not
      *
      * @return string The string representation
      */
@@ -176,7 +176,7 @@ class Twig_Token
     /**
      * Returns the english representation of a given type.
      *
-     * @param int     $type The type as an integer
+     * @param int $type The type as an integer
      *
      * @return string The string representation
      */
diff --git a/vendor/Twig/TokenParser.php b/vendor/Twig/TokenParser.php
index decebd5..fa9b6d8 100644
--- a/vendor/Twig/TokenParser.php
+++ b/vendor/Twig/TokenParser.php
@@ -22,9 +22,9 @@ abstract class Twig_TokenParser implements Twig_TokenParserInterface
     protected $parser;
 
     /**
-     * Sets the parser associated with this token parser
+     * Sets the parser associated with this token parser.
      *
-     * @param $parser A Twig_Parser instance
+     * @param Twig_Parser $parser A Twig_Parser instance
      */
     public function setParser(Twig_Parser $parser)
     {
diff --git a/vendor/Twig/TokenParser/AutoEscape.php b/vendor/Twig/TokenParser/AutoEscape.php
index 2756028..c753e62 100644
--- a/vendor/Twig/TokenParser/AutoEscape.php
+++ b/vendor/Twig/TokenParser/AutoEscape.php
@@ -29,13 +29,6 @@
  */
 class Twig_TokenParser_AutoEscape extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $lineno = $token->getLine();
@@ -46,7 +39,7 @@ class Twig_TokenParser_AutoEscape extends Twig_TokenParser
         } else {
             $expr = $this->parser->getExpressionParser()->parseExpression();
             if (!$expr instanceof Twig_Node_Expression_Constant) {
-                throw new Twig_Error_Syntax('An escaping strategy must be a string or a Boolean.', $stream->getCurrent()->getLine(), $stream->getFilename());
+                throw new Twig_Error_Syntax('An escaping strategy must be a string or a bool.', $stream->getCurrent()->getLine(), $stream->getFilename());
             }
             $value = $expr->getAttribute('value');
 
@@ -57,6 +50,8 @@ class Twig_TokenParser_AutoEscape extends Twig_TokenParser
             }
 
             if ($compat && $stream->test(Twig_Token::NAME_TYPE)) {
+                @trigger_error('Using the autoescape tag with "true" or "false" before the strategy name is deprecated.', E_USER_DEPRECATED);
+
                 if (false === $value) {
                     throw new Twig_Error_Syntax('Unexpected escaping strategy as you set autoescaping to false.', $stream->getCurrent()->getLine(), $stream->getFilename());
                 }
@@ -77,11 +72,6 @@ class Twig_TokenParser_AutoEscape extends Twig_TokenParser
         return $token->test('endautoescape');
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'autoescape';
diff --git a/vendor/Twig/TokenParser/Block.php b/vendor/Twig/TokenParser/Block.php
index 81e6b1c..4ffafbe 100644
--- a/vendor/Twig/TokenParser/Block.php
+++ b/vendor/Twig/TokenParser/Block.php
@@ -22,20 +22,13 @@
  */
 class Twig_TokenParser_Block extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $lineno = $token->getLine();
         $stream = $this->parser->getStream();
         $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue();
         if ($this->parser->hasBlock($name)) {
-            throw new Twig_Error_Syntax(sprintf("The block '$name' has already been defined line %d", $this->parser->getBlock($name)->getLine()), $stream->getCurrent()->getLine(), $stream->getFilename());
+            throw new Twig_Error_Syntax(sprintf("The block '%s' has already been defined line %d.", $name, $this->parser->getBlock($name)->getLine()), $stream->getCurrent()->getLine(), $stream->getFilename());
         }
         $this->parser->setBlock($name, $block = new Twig_Node_Block($name, new Twig_Node(array()), $lineno));
         $this->parser->pushLocalScope();
@@ -47,7 +40,7 @@ class Twig_TokenParser_Block extends Twig_TokenParser
                 $value = $token->getValue();
 
                 if ($value != $name) {
-                    throw new Twig_Error_Syntax(sprintf("Expected endblock for block '$name' (but %s given)", $value), $stream->getCurrent()->getLine(), $stream->getFilename());
+                    throw new Twig_Error_Syntax(sprintf('Expected endblock for block "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getFilename());
                 }
             }
         } else {
@@ -69,11 +62,6 @@ class Twig_TokenParser_Block extends Twig_TokenParser
         return $token->test('endblock');
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'block';
diff --git a/vendor/Twig/TokenParser/Do.php b/vendor/Twig/TokenParser/Do.php
index f50939d..7adb5a0 100644
--- a/vendor/Twig/TokenParser/Do.php
+++ b/vendor/Twig/TokenParser/Do.php
@@ -14,13 +14,6 @@
  */
 class Twig_TokenParser_Do extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $expr = $this->parser->getExpressionParser()->parseExpression();
@@ -30,11 +23,6 @@ class Twig_TokenParser_Do extends Twig_TokenParser
         return new Twig_Node_Do($expr, $token->getLine(), $this->getTag());
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'do';
diff --git a/vendor/Twig/TokenParser/Embed.php b/vendor/Twig/TokenParser/Embed.php
index 69cb5f3..e685b95 100644
--- a/vendor/Twig/TokenParser/Embed.php
+++ b/vendor/Twig/TokenParser/Embed.php
@@ -14,13 +14,6 @@
  */
 class Twig_TokenParser_Embed extends Twig_TokenParser_Include
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $stream = $this->parser->getStream();
@@ -54,11 +47,6 @@ class Twig_TokenParser_Embed extends Twig_TokenParser_Include
         return $token->test('endembed');
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'embed';
diff --git a/vendor/Twig/TokenParser/Extends.php b/vendor/Twig/TokenParser/Extends.php
index f5ecee2..510417a 100644
--- a/vendor/Twig/TokenParser/Extends.php
+++ b/vendor/Twig/TokenParser/Extends.php
@@ -19,32 +19,20 @@
  */
 class Twig_TokenParser_Extends extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         if (!$this->parser->isMainScope()) {
-            throw new Twig_Error_Syntax('Cannot extend from a block', $token->getLine(), $this->parser->getFilename());
+            throw new Twig_Error_Syntax('Cannot extend from a block.', $token->getLine(), $this->parser->getFilename());
         }
 
         if (null !== $this->parser->getParent()) {
-            throw new Twig_Error_Syntax('Multiple extends tags are forbidden', $token->getLine(), $this->parser->getFilename());
+            throw new Twig_Error_Syntax('Multiple extends tags are forbidden.', $token->getLine(), $this->parser->getFilename());
         }
         $this->parser->setParent($this->parser->getExpressionParser()->parseExpression());
 
         $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'extends';
diff --git a/vendor/Twig/TokenParser/Filter.php b/vendor/Twig/TokenParser/Filter.php
index 2b97475..b20dd5b 100644
--- a/vendor/Twig/TokenParser/Filter.php
+++ b/vendor/Twig/TokenParser/Filter.php
@@ -20,13 +20,6 @@
  */
 class Twig_TokenParser_Filter extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $name = $this->parser->getVarName();
@@ -49,11 +42,6 @@ class Twig_TokenParser_Filter extends Twig_TokenParser
         return $token->test('endfilter');
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'filter';
diff --git a/vendor/Twig/TokenParser/Flush.php b/vendor/Twig/TokenParser/Flush.php
index 4e15e78..f9ce7c3 100644
--- a/vendor/Twig/TokenParser/Flush.php
+++ b/vendor/Twig/TokenParser/Flush.php
@@ -16,13 +16,6 @@
  */
 class Twig_TokenParser_Flush extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
@@ -30,11 +23,6 @@ class Twig_TokenParser_Flush extends Twig_TokenParser
         return new Twig_Node_Flush($token->getLine(), $this->getTag());
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'flush';
diff --git a/vendor/Twig/TokenParser/For.php b/vendor/Twig/TokenParser/For.php
index 5c07d63..3fac511 100644
--- a/vendor/Twig/TokenParser/For.php
+++ b/vendor/Twig/TokenParser/For.php
@@ -23,13 +23,6 @@
  */
 class Twig_TokenParser_For extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $lineno = $token->getLine();
@@ -86,7 +79,7 @@ class Twig_TokenParser_For extends Twig_TokenParser
     protected function checkLoopUsageCondition(Twig_TokenStream $stream, Twig_NodeInterface $node)
     {
         if ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name && 'loop' == $node->getNode('node')->getAttribute('name')) {
-            throw new Twig_Error_Syntax('The "loop" variable cannot be used in a looping condition', $node->getLine(), $stream->getFilename());
+            throw new Twig_Error_Syntax('The "loop" variable cannot be used in a looping condition.', $node->getLine(), $stream->getFilename());
         }
 
         foreach ($node as $n) {
@@ -105,7 +98,7 @@ class Twig_TokenParser_For extends Twig_TokenParser
         if ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name && 'loop' == $node->getNode('node')->getAttribute('name')) {
             $attribute = $node->getNode('attribute');
             if ($attribute instanceof Twig_Node_Expression_Constant && in_array($attribute->getAttribute('value'), array('length', 'revindex0', 'revindex', 'last'))) {
-                throw new Twig_Error_Syntax(sprintf('The "loop.%s" variable is not defined when looping with a condition', $attribute->getAttribute('value')), $node->getLine(), $stream->getFilename());
+                throw new Twig_Error_Syntax(sprintf('The "loop.%s" variable is not defined when looping with a condition.', $attribute->getAttribute('value')), $node->getLine(), $stream->getFilename());
             }
         }
 
@@ -123,11 +116,6 @@ class Twig_TokenParser_For extends Twig_TokenParser
         }
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'for';
diff --git a/vendor/Twig/TokenParser/From.php b/vendor/Twig/TokenParser/From.php
index dd73f99..f7547eb 100644
--- a/vendor/Twig/TokenParser/From.php
+++ b/vendor/Twig/TokenParser/From.php
@@ -18,13 +18,6 @@
  */
 class Twig_TokenParser_From extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $macro = $this->parser->getExpressionParser()->parseExpression();
@@ -52,17 +45,16 @@ class Twig_TokenParser_From extends Twig_TokenParser
         $node = new Twig_Node_Import($macro, new Twig_Node_Expression_AssignName($this->parser->getVarName(), $token->getLine()), $token->getLine(), $this->getTag());
 
         foreach ($targets as $name => $alias) {
+            if ($this->parser->isReservedMacroName($name)) {
+                throw new Twig_Error_Syntax(sprintf('"%s" cannot be an imported macro as it is a reserved keyword.', $name), $token->getLine(), $stream->getFilename());
+            }
+
             $this->parser->addImportedSymbol('function', $alias, 'get'.$name, $node->getNode('var'));
         }
 
         return $node;
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'from';
diff --git a/vendor/Twig/TokenParser/If.php b/vendor/Twig/TokenParser/If.php
index 3d7d1f5..91c0604 100644
--- a/vendor/Twig/TokenParser/If.php
+++ b/vendor/Twig/TokenParser/If.php
@@ -25,13 +25,6 @@
  */
 class Twig_TokenParser_If extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $lineno = $token->getLine();
@@ -63,7 +56,7 @@ class Twig_TokenParser_If extends Twig_TokenParser
                     break;
 
                 default:
-                    throw new Twig_Error_Syntax(sprintf('Unexpected end of template. Twig was looking for the following tags "else", "elseif", or "endif" to close the "if" block started at line %d)', $lineno), $stream->getCurrent()->getLine(), $stream->getFilename());
+                    throw new Twig_Error_Syntax(sprintf('Unexpected end of template. Twig was looking for the following tags "else", "elseif", or "endif" to close the "if" block started at line %d).', $lineno), $stream->getCurrent()->getLine(), $stream->getFilename());
             }
         }
 
@@ -82,11 +75,6 @@ class Twig_TokenParser_If extends Twig_TokenParser
         return $token->test(array('endif'));
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'if';
diff --git a/vendor/Twig/TokenParser/Import.php b/vendor/Twig/TokenParser/Import.php
index e7050c7..85c5c03 100644
--- a/vendor/Twig/TokenParser/Import.php
+++ b/vendor/Twig/TokenParser/Import.php
@@ -18,13 +18,6 @@
  */
 class Twig_TokenParser_Import extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $macro = $this->parser->getExpressionParser()->parseExpression();
@@ -37,11 +30,6 @@ class Twig_TokenParser_Import extends Twig_TokenParser
         return new Twig_Node_Import($macro, $var, $token->getLine(), $this->getTag());
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'import';
diff --git a/vendor/Twig/TokenParser/Include.php b/vendor/Twig/TokenParser/Include.php
index 9c3099a..0e76dae 100644
--- a/vendor/Twig/TokenParser/Include.php
+++ b/vendor/Twig/TokenParser/Include.php
@@ -21,13 +21,6 @@
  */
 class Twig_TokenParser_Include extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $expr = $this->parser->getExpressionParser()->parseExpression();
@@ -63,11 +56,6 @@ class Twig_TokenParser_Include extends Twig_TokenParser
         return array($variables, $only, $ignoreMissing);
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'include';
diff --git a/vendor/Twig/TokenParser/Macro.php b/vendor/Twig/TokenParser/Macro.php
index 87a299d..8a7ebd6 100644
--- a/vendor/Twig/TokenParser/Macro.php
+++ b/vendor/Twig/TokenParser/Macro.php
@@ -20,13 +20,6 @@
  */
 class Twig_TokenParser_Macro extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $lineno = $token->getLine();
@@ -42,7 +35,7 @@ class Twig_TokenParser_Macro extends Twig_TokenParser
             $value = $token->getValue();
 
             if ($value != $name) {
-                throw new Twig_Error_Syntax(sprintf("Expected endmacro for macro '$name' (but %s given)", $value), $stream->getCurrent()->getLine(), $stream->getFilename());
+                throw new Twig_Error_Syntax(sprintf('Expected endmacro for macro "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getFilename());
             }
         }
         $this->parser->popLocalScope();
@@ -56,11 +49,6 @@ class Twig_TokenParser_Macro extends Twig_TokenParser
         return $token->test('endmacro');
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'macro';
diff --git a/vendor/Twig/TokenParser/Sandbox.php b/vendor/Twig/TokenParser/Sandbox.php
index 9457325..1feadd0 100644
--- a/vendor/Twig/TokenParser/Sandbox.php
+++ b/vendor/Twig/TokenParser/Sandbox.php
@@ -22,13 +22,6 @@
  */
 class Twig_TokenParser_Sandbox extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
@@ -43,7 +36,7 @@ class Twig_TokenParser_Sandbox extends Twig_TokenParser
                 }
 
                 if (!$node instanceof Twig_Node_Include) {
-                    throw new Twig_Error_Syntax('Only "include" tags are allowed within a "sandbox" section', $node->getLine(), $this->parser->getFilename());
+                    throw new Twig_Error_Syntax('Only "include" tags are allowed within a "sandbox" section.', $node->getLine(), $this->parser->getFilename());
                 }
             }
         }
@@ -56,11 +49,6 @@ class Twig_TokenParser_Sandbox extends Twig_TokenParser
         return $token->test('endsandbox');
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'sandbox';
diff --git a/vendor/Twig/TokenParser/Set.php b/vendor/Twig/TokenParser/Set.php
index 84f7e94..5ca614b 100644
--- a/vendor/Twig/TokenParser/Set.php
+++ b/vendor/Twig/TokenParser/Set.php
@@ -28,13 +28,6 @@
  */
 class Twig_TokenParser_Set extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $lineno = $token->getLine();
@@ -48,13 +41,13 @@ class Twig_TokenParser_Set extends Twig_TokenParser
             $stream->expect(Twig_Token::BLOCK_END_TYPE);
 
             if (count($names) !== count($values)) {
-                throw new Twig_Error_Syntax("When using set, you must have the same number of variables and assignments.", $stream->getCurrent()->getLine(), $stream->getFilename());
+                throw new Twig_Error_Syntax('When using set, you must have the same number of variables and assignments.', $stream->getCurrent()->getLine(), $stream->getFilename());
             }
         } else {
             $capture = true;
 
             if (count($names) > 1) {
-                throw new Twig_Error_Syntax("When using set with a block, you cannot have a multi-target.", $stream->getCurrent()->getLine(), $stream->getFilename());
+                throw new Twig_Error_Syntax('When using set with a block, you cannot have a multi-target.', $stream->getCurrent()->getLine(), $stream->getFilename());
             }
 
             $stream->expect(Twig_Token::BLOCK_END_TYPE);
@@ -71,11 +64,6 @@ class Twig_TokenParser_Set extends Twig_TokenParser
         return $token->test('endset');
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'set';
diff --git a/vendor/Twig/TokenParser/Spaceless.php b/vendor/Twig/TokenParser/Spaceless.php
index 1e3fa8f..53d906d 100644
--- a/vendor/Twig/TokenParser/Spaceless.php
+++ b/vendor/Twig/TokenParser/Spaceless.php
@@ -24,13 +24,6 @@
  */
 class Twig_TokenParser_Spaceless extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $lineno = $token->getLine();
@@ -47,11 +40,6 @@ class Twig_TokenParser_Spaceless extends Twig_TokenParser
         return $token->test('endspaceless');
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'spaceless';
diff --git a/vendor/Twig/TokenParser/Use.php b/vendor/Twig/TokenParser/Use.php
index 3ea68b1..4945d03 100644
--- a/vendor/Twig/TokenParser/Use.php
+++ b/vendor/Twig/TokenParser/Use.php
@@ -25,13 +25,6 @@
  */
 class Twig_TokenParser_Use extends Twig_TokenParser
 {
-    /**
-     * Parses a token and returns a node.
-     *
-     * @param Twig_Token $token A Twig_Token instance
-     *
-     * @return Twig_NodeInterface A Twig_NodeInterface instance
-     */
     public function parse(Twig_Token $token)
     {
         $template = $this->parser->getExpressionParser()->parseExpression();
@@ -64,11 +57,6 @@ class Twig_TokenParser_Use extends Twig_TokenParser
         $this->parser->addTrait(new Twig_Node(array('template' => $template, 'targets' => new Twig_Node($targets))));
     }
 
-    /**
-     * Gets the tag name associated with this token parser.
-     *
-     * @return string The tag name
-     */
     public function getTag()
     {
         return 'use';
diff --git a/vendor/Twig/TokenParserBroker.php b/vendor/Twig/TokenParserBroker.php
index ec3fba6..d88bb43 100644
--- a/vendor/Twig/TokenParserBroker.php
+++ b/vendor/Twig/TokenParserBroker.php
@@ -14,6 +14,7 @@
  * Default implementation of a token parser broker.
  *
  * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface
@@ -25,20 +26,25 @@ class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface
     /**
      * Constructor.
      *
-     * @param array|Traversable $parsers A Traversable of Twig_TokenParserInterface instances
-     * @param array|Traversable $brokers A Traversable of Twig_TokenParserBrokerInterface instances
+     * @param array|Traversable $parsers                 A Traversable of Twig_TokenParserInterface instances
+     * @param array|Traversable $brokers                 A Traversable of Twig_TokenParserBrokerInterface instances
+     * @param bool              $triggerDeprecationError
      */
-    public function __construct($parsers = array(), $brokers = array())
+    public function __construct($parsers = array(), $brokers = array(), $triggerDeprecationError = true)
     {
+        if ($triggerDeprecationError) {
+            @trigger_error('The '.__CLASS__.' class is deprecated since version 1.12 and will be removed in 2.0.', E_USER_DEPRECATED);
+        }
+
         foreach ($parsers as $parser) {
             if (!$parser instanceof Twig_TokenParserInterface) {
-                throw new LogicException('$parsers must a an array of Twig_TokenParserInterface');
+                throw new LogicException('$parsers must a an array of Twig_TokenParserInterface.');
             }
             $this->parsers[$parser->getTag()] = $parser;
         }
         foreach ($brokers as $broker) {
             if (!$broker instanceof Twig_TokenParserBrokerInterface) {
-                throw new LogicException('$brokers must a an array of Twig_TokenParserBrokerInterface');
+                throw new LogicException('$brokers must a an array of Twig_TokenParserBrokerInterface.');
             }
             $this->brokers[] = $broker;
         }
diff --git a/vendor/Twig/TokenParserBrokerInterface.php b/vendor/Twig/TokenParserBrokerInterface.php
index 3f006e3..3ec2a88 100644
--- a/vendor/Twig/TokenParserBrokerInterface.php
+++ b/vendor/Twig/TokenParserBrokerInterface.php
@@ -16,6 +16,7 @@
  * Token parser brokers allows to implement custom logic in the process of resolving a token parser for a given tag name.
  *
  * @author Arnaud Le Blanc <arnaud.lb@gmail.com>
+ *
  * @deprecated since 1.12 (to be removed in 2.0)
  */
 interface Twig_TokenParserBrokerInterface
diff --git a/vendor/Twig/TokenParserInterface.php b/vendor/Twig/TokenParserInterface.php
index 31e8d5d..12ec396 100644
--- a/vendor/Twig/TokenParserInterface.php
+++ b/vendor/Twig/TokenParserInterface.php
@@ -17,9 +17,9 @@
 interface Twig_TokenParserInterface
 {
     /**
-     * Sets the parser associated with this token parser
+     * Sets the parser associated with this token parser.
      *
-     * @param $parser A Twig_Parser instance
+     * @param Twig_Parser $parser A Twig_Parser instance
      */
     public function setParser(Twig_Parser $parser);
 
diff --git a/vendor/Twig/TokenStream.php b/vendor/Twig/TokenStream.php
index 44440da..016f812 100644
--- a/vendor/Twig/TokenStream.php
+++ b/vendor/Twig/TokenStream.php
@@ -18,7 +18,7 @@
 class Twig_TokenStream
 {
     protected $tokens;
-    protected $current;
+    protected $current = 0;
     protected $filename;
 
     /**
@@ -29,9 +29,8 @@ class Twig_TokenStream
      */
     public function __construct(array $tokens, $filename = null)
     {
-        $this->tokens     = $tokens;
-        $this->current    = 0;
-        $this->filename   = $filename;
+        $this->tokens = $tokens;
+        $this->filename = $filename;
     }
 
     /**
@@ -57,7 +56,7 @@ class Twig_TokenStream
     public function next()
     {
         if (!isset($this->tokens[++$this->current])) {
-            throw new Twig_Error_Syntax('Unexpected end of template', $this->tokens[$this->current - 1]->getLine(), $this->filename);
+            throw new Twig_Error_Syntax('Unexpected end of template.', $this->tokens[$this->current - 1]->getLine(), $this->filename);
         }
 
         return $this->tokens[$this->current - 1];
@@ -85,7 +84,7 @@ class Twig_TokenStream
         $token = $this->tokens[$this->current];
         if (!$token->test($type, $value)) {
             $line = $token->getLine();
-            throw new Twig_Error_Syntax(sprintf('%sUnexpected token "%s" of value "%s" ("%s" expected%s)',
+            throw new Twig_Error_Syntax(sprintf('%sUnexpected token "%s" of value "%s" ("%s" expected%s).',
                 $message ? $message.'. ' : '',
                 Twig_Token::typeToEnglish($token->getType()), $token->getValue(),
                 Twig_Token::typeToEnglish($type), $value ? sprintf(' with value "%s"', $value) : ''),
@@ -101,21 +100,21 @@ class Twig_TokenStream
     /**
      * Looks at the next token.
      *
-     * @param int     $number
+     * @param int $number
      *
      * @return Twig_Token
      */
     public function look($number = 1)
     {
         if (!isset($this->tokens[$this->current + $number])) {
-            throw new Twig_Error_Syntax('Unexpected end of template', $this->tokens[$this->current + $number - 1]->getLine(), $this->filename);
+            throw new Twig_Error_Syntax('Unexpected end of template.', $this->tokens[$this->current + $number - 1]->getLine(), $this->filename);
         }
 
         return $this->tokens[$this->current + $number];
     }
 
     /**
-     * Tests the current token
+     * Tests the current token.
      *
      * @return bool
      */
@@ -125,7 +124,7 @@ class Twig_TokenStream
     }
 
     /**
-     * Checks if end of stream was reached
+     * Checks if end of stream was reached.
      *
      * @return bool
      */
@@ -135,7 +134,7 @@ class Twig_TokenStream
     }
 
     /**
-     * Gets the current token
+     * Gets the current token.
      *
      * @return Twig_Token
      */
@@ -145,7 +144,7 @@ class Twig_TokenStream
     }
 
     /**
-     * Gets the filename associated with this stream
+     * Gets the filename associated with this stream.
      *
      * @return string
      */
diff --git a/vendor/Twig/Util/DeprecationCollector.php b/vendor/Twig/Util/DeprecationCollector.php
new file mode 100644
index 0000000..e406f0a
--- /dev/null
+++ b/vendor/Twig/Util/DeprecationCollector.php
@@ -0,0 +1,82 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_Util_DeprecationCollector
+{
+    private $twig;
+    private $deprecations;
+
+    public function __construct(Twig_Environment $twig)
+    {
+        $this->twig = $twig;
+    }
+
+    /**
+     * Returns deprecations for templates contained in a directory.
+     *
+     * @param string $dir A directory where templates are stored
+     * @param string $ext Limit the loaded templates by extension
+     *
+     * @return array() An array of deprecations
+     */
+    public function collectDir($dir, $ext = '.twig')
+    {
+        $iterator = new RegexIterator(
+            new RecursiveIteratorIterator(
+                new RecursiveDirectoryIterator($dir), RecursiveIteratorIterator::LEAVES_ONLY
+            ), '{'.preg_quote($ext).'$}'
+        );
+
+        return $this->collect(new Twig_Util_TemplateDirIterator($iterator));
+    }
+
+    /**
+     * Returns deprecations for passed templates.
+     *
+     * @param Iterator $iterator An iterator of templates (where keys are template names and values the contents of the template)
+     *
+     * @return array() An array of deprecations
+     */
+    public function collect(Iterator $iterator)
+    {
+        $this->deprecations = array();
+
+        set_error_handler(array($this, 'errorHandler'));
+
+        foreach ($iterator as $name => $contents) {
+            try {
+                $this->twig->parse($this->twig->tokenize($contents, $name));
+            } catch (Twig_Error_Syntax $e) {
+                // ignore templates containing syntax errors
+            }
+        }
+
+        restore_error_handler();
+
+        $deprecations = $this->deprecations;
+        $this->deprecations = array();
+
+        return $deprecations;
+    }
+
+    /**
+     * @internal
+     */
+    public function errorHandler($type, $msg)
+    {
+        if (E_USER_DEPRECATED === $type) {
+            $this->deprecations[] = $msg;
+        }
+    }
+}
diff --git a/vendor/Twig/Util/TemplateDirIterator.php b/vendor/Twig/Util/TemplateDirIterator.php
new file mode 100644
index 0000000..3fb8932
--- /dev/null
+++ b/vendor/Twig/Util/TemplateDirIterator.php
@@ -0,0 +1,26 @@
+<?php
+
+/*
+ * This file is part of Twig.
+ *
+ * (c) Fabien Potencier
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * @author Fabien Potencier <fabien@symfony.com>
+ */
+class Twig_Util_TemplateDirIterator extends IteratorIterator
+{
+    public function current()
+    {
+        return file_get_contents(parent::current());
+    }
+
+    public function key()
+    {
+        return (string) parent::key();
+    }
+}
