Update Twig from 1.35.0 to 1.42.4 (PHP 5.5 is now required!)

This fixes some errors on PHP 7.4 and contains even more fixes
Also bumped PHP version to 5.5 as Twig requires it.
This commit is contained in:
slawkens
2020-02-15 05:41:38 +01:00
parent d9e449b6cf
commit 8021308822
414 changed files with 9276 additions and 5531 deletions

View File

@@ -0,0 +1,52 @@
<?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.
*/
@trigger_error('The Twig_Autoloader class is deprecated since version 1.21 and will be removed in 2.0. Use Composer instead.', E_USER_DEPRECATED);
/**
* Autoloads Twig classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.21 and will be removed in 2.0. Use Composer instead. 2.0.
*/
class Twig_Autoloader
{
/**
* Registers Twig_Autoloader as an SPL autoloader.
*
* @param bool $prepend whether to prepend the autoloader or not
*/
public static function register($prepend = false)
{
@trigger_error('Using Twig_Autoloader is deprecated since version 1.21. Use Composer instead.', E_USER_DEPRECATED);
spl_autoload_register([__CLASS__, 'autoload'], true, $prepend);
}
/**
* Handles autoloading of classes.
*
* @param string $class a class name
*/
public static function autoload($class)
{
if (0 !== strpos($class, 'Twig')) {
return;
}
if (is_file($file = __DIR__.'/../'.str_replace(['_', "\0"], ['/', ''], $class).'.php')) {
require $file;
} elseif (is_file($file = __DIR__.'/../../src/'.str_replace(['Twig\\', '\\', "\0"], ['', '/', ''], $class).'.php')) {
require $file;
}
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\NodeVisitor\AbstractNodeVisitor;
class_exists('Twig\NodeVisitor\AbstractNodeVisitor');
if (\false) {
class Twig_BaseNodeVisitor extends AbstractNodeVisitor
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Cache\FilesystemCache;
class_exists('Twig\Cache\FilesystemCache');
if (\false) {
class Twig_Cache_Filesystem extends FilesystemCache
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Cache\NullCache;
class_exists('Twig\Cache\NullCache');
if (\false) {
class Twig_Cache_Null extends NullCache
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Cache\CacheInterface;
class_exists('Twig\Cache\CacheInterface');
if (\false) {
class Twig_CacheInterface extends CacheInterface
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Compiler;
class_exists('Twig\Compiler');
if (\false) {
class Twig_Compiler extends Compiler
{
}
}

View File

@@ -0,0 +1,34 @@
<?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.
*/
/**
* Interface implemented by compiler classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_CompilerInterface
{
/**
* Compiles a node.
*
* @return $this
*/
public function compile(Twig_NodeInterface $node);
/**
* Gets the current PHP code after compilation.
*
* @return string The PHP code
*/
public function getSource();
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\RuntimeLoader\ContainerRuntimeLoader;
class_exists('Twig\RuntimeLoader\ContainerRuntimeLoader');
if (\false) {
class Twig_ContainerRuntimeLoader extends ContainerRuntimeLoader
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Environment;
class_exists('Twig\Environment');
if (\false) {
class Twig_Environment extends Environment
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Error\Error;
class_exists('Twig\Error\Error');
if (\false) {
class Twig_Error extends Error
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Error\LoaderError;
class_exists('Twig\Error\LoaderError');
if (\false) {
class Twig_Error_Loader extends LoaderError
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Error\RuntimeError;
class_exists('Twig\Error\RuntimeError');
if (\false) {
class Twig_Error_Runtime extends RuntimeError
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Error\SyntaxError;
class_exists('Twig\Error\SyntaxError');
if (\false) {
class Twig_Error_Syntax extends SyntaxError
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Loader\ExistsLoaderInterface;
class_exists('Twig\Loader\ExistsLoaderInterface');
if (\false) {
class Twig_ExistsLoaderInterface extends ExistsLoaderInterface
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\ExpressionParser;
class_exists('Twig\ExpressionParser');
if (\false) {
class Twig_ExpressionParser extends ExpressionParser
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\AbstractExtension;
class_exists('Twig\Extension\AbstractExtension');
if (\false) {
class Twig_Extension extends AbstractExtension
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\CoreExtension;
class_exists('Twig\Extension\CoreExtension');
if (\false) {
class Twig_Extension_Core extends CoreExtension
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\DebugExtension;
class_exists('Twig\Extension\DebugExtension');
if (\false) {
class Twig_Extension_Debug extends DebugExtension
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\EscaperExtension;
class_exists('Twig\Extension\EscaperExtension');
if (\false) {
class Twig_Extension_Escaper extends EscaperExtension
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\GlobalsInterface;
class_exists('Twig\Extension\GlobalsInterface');
if (\false) {
class Twig_Extension_GlobalsInterface extends GlobalsInterface
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\InitRuntimeInterface;
class_exists('Twig\Extension\InitRuntimeInterface');
if (\false) {
class Twig_Extension_InitRuntimeInterface extends InitRuntimeInterface
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\OptimizerExtension;
class_exists('Twig\Extension\OptimizerExtension');
if (\false) {
class Twig_Extension_Optimizer extends OptimizerExtension
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\ProfilerExtension;
class_exists('Twig\Extension\ProfilerExtension');
if (\false) {
class Twig_Extension_Profiler extends ProfilerExtension
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\SandboxExtension;
class_exists('Twig\Extension\SandboxExtension');
if (\false) {
class Twig_Extension_Sandbox extends SandboxExtension
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\StagingExtension;
class_exists('Twig\Extension\StagingExtension');
if (\false) {
class Twig_Extension_Staging extends StagingExtension
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\StringLoaderExtension;
class_exists('Twig\Extension\StringLoaderExtension');
if (\false) {
class Twig_Extension_StringLoader extends StringLoaderExtension
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Extension\ExtensionInterface;
class_exists('Twig\Extension\ExtensionInterface');
if (\false) {
class Twig_ExtensionInterface extends ExtensionInterface
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\RuntimeLoader\FactoryRuntimeLoader;
class_exists('Twig\RuntimeLoader\FactoryRuntimeLoader');
if (\false) {
class Twig_FactoryRuntimeLoader extends FactoryRuntimeLoader
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\FileExtensionEscapingStrategy;
class_exists('Twig\FileExtensionEscapingStrategy');
if (\false) {
class Twig_FileExtensionEscapingStrategy extends FileExtensionEscapingStrategy
{
}
}

View File

@@ -0,0 +1,86 @@
<?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.
*/
use Twig\Node\Node;
@trigger_error('The Twig_Filter class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFilter instead.', E_USER_DEPRECATED);
/**
* Represents a template filter.
*
* Use \Twig\TwigFilter 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
{
protected $options;
protected $arguments = [];
public function __construct(array $options = [])
{
$this->options = array_merge([
'needs_environment' => false,
'needs_context' => false,
'pre_escape' => null,
'preserves_safety' => null,
'callable' => null,
], $options);
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
public function needsEnvironment()
{
return $this->options['needs_environment'];
}
public function needsContext()
{
return $this->options['needs_context'];
}
public function getSafe(Node $filterArgs)
{
if (isset($this->options['is_safe'])) {
return $this->options['is_safe'];
}
if (isset($this->options['is_safe_callback'])) {
return \call_user_func($this->options['is_safe_callback'], $filterArgs);
}
}
public function getPreservesSafety()
{
return $this->options['preserves_safety'];
}
public function getPreEscape()
{
return $this->options['pre_escape'];
}
public function getCallable()
{
return $this->options['callable'];
}
}

View File

@@ -0,0 +1,40 @@
<?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.
*/
@trigger_error('The Twig_Filter_Function class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFilter instead.', E_USER_DEPRECATED);
/**
* Represents a function template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Filter_Function extends Twig_Filter
{
protected $function;
public function __construct($function, array $options = [])
{
$options['callable'] = $function;
parent::__construct($options);
$this->function = $function;
}
public function compile()
{
return $this->function;
}
}

View File

@@ -0,0 +1,44 @@
<?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.
*/
use Twig\Extension\ExtensionInterface;
@trigger_error('The Twig_Filter_Method class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFilter instead.', E_USER_DEPRECATED);
/**
* Represents a method template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Filter_Method extends Twig_Filter
{
protected $extension;
protected $method;
public function __construct(ExtensionInterface $extension, $method, array $options = [])
{
$options['callable'] = [$extension, $method];
parent::__construct($options);
$this->extension = $extension;
$this->method = $method;
}
public function compile()
{
return sprintf('$this->env->getExtension(\'%s\')->%s', \get_class($this->extension), $this->method);
}
}

View File

@@ -0,0 +1,42 @@
<?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.
*/
@trigger_error('The Twig_Filter_Node class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFilter instead.', E_USER_DEPRECATED);
/**
* Represents a template filter as a node.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Filter_Node extends Twig_Filter
{
protected $class;
public function __construct($class, array $options = [])
{
parent::__construct($options);
$this->class = $class;
}
public function getClass()
{
return $this->class;
}
public function compile()
{
}
}

View File

@@ -0,0 +1,24 @@
<?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.
*/
/**
* Represents a callable template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FilterCallableInterface
{
public function getCallable();
}

View File

@@ -0,0 +1,45 @@
<?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.
*/
use Twig\Node\Node;
/**
* Represents a template filter.
*
* Use \Twig\TwigFilter instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FilterInterface
{
/**
* Compiles a filter.
*
* @return string The PHP code for the filter
*/
public function compile();
public function needsEnvironment();
public function needsContext();
public function getSafe(Node $filterArgs);
public function getPreservesSafety();
public function getPreEscape();
public function setArguments($arguments);
public function getArguments();
}

View File

@@ -0,0 +1,76 @@
<?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.
*/
use Twig\Node\Node;
@trigger_error('The Twig_Function class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFunction instead.', E_USER_DEPRECATED);
/**
* Represents a template function.
*
* Use \Twig\TwigFunction 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
{
protected $options;
protected $arguments = [];
public function __construct(array $options = [])
{
$this->options = array_merge([
'needs_environment' => false,
'needs_context' => false,
'callable' => null,
], $options);
}
public function setArguments($arguments)
{
$this->arguments = $arguments;
}
public function getArguments()
{
return $this->arguments;
}
public function needsEnvironment()
{
return $this->options['needs_environment'];
}
public function needsContext()
{
return $this->options['needs_context'];
}
public function getSafe(Node $functionArgs)
{
if (isset($this->options['is_safe'])) {
return $this->options['is_safe'];
}
if (isset($this->options['is_safe_callback'])) {
return \call_user_func($this->options['is_safe_callback'], $functionArgs);
}
return [];
}
public function getCallable()
{
return $this->options['callable'];
}
}

View File

@@ -0,0 +1,41 @@
<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* 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\TwigFunction instead.', E_USER_DEPRECATED);
/**
* Represents a function template function.
*
* Use \Twig\TwigFunction 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
{
protected $function;
public function __construct($function, array $options = [])
{
$options['callable'] = $function;
parent::__construct($options);
$this->function = $function;
}
public function compile()
{
return $this->function;
}
}

View File

@@ -0,0 +1,45 @@
<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Extension\ExtensionInterface;
@trigger_error('The Twig_Function_Method class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFunction instead.', E_USER_DEPRECATED);
/**
* Represents a method template function.
*
* Use \Twig\TwigFunction 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
{
protected $extension;
protected $method;
public function __construct(ExtensionInterface $extension, $method, array $options = [])
{
$options['callable'] = [$extension, $method];
parent::__construct($options);
$this->extension = $extension;
$this->method = $method;
}
public function compile()
{
return sprintf('$this->env->getExtension(\'%s\')->%s', \get_class($this->extension), $this->method);
}
}

View File

@@ -0,0 +1,42 @@
<?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.
*/
@trigger_error('The Twig_Function_Node class is deprecated since version 1.12 and will be removed in 2.0. Use \Twig\TwigFunction instead.', E_USER_DEPRECATED);
/**
* Represents a template function as a node.
*
* Use \Twig\TwigFunction instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
class Twig_Function_Node extends Twig_Function
{
protected $class;
public function __construct($class, array $options = [])
{
parent::__construct($options);
$this->class = $class;
}
public function getClass()
{
return $this->class;
}
public function compile()
{
}
}

View File

@@ -0,0 +1,24 @@
<?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.
*/
/**
* Represents a callable template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FunctionCallableInterface
{
public function getCallable();
}

View File

@@ -0,0 +1,42 @@
<?php
/*
* This file is part of Twig.
*
* (c) Fabien Potencier
* (c) Arnaud Le Blanc
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Twig\Node\Node;
/**
* Represents a template function.
*
* Use \Twig\TwigFunction instead.
*
* @author Arnaud Le Blanc <arnaud.lb@gmail.com>
*
* @deprecated since 1.12 (to be removed in 2.0)
*/
interface Twig_FunctionInterface
{
/**
* Compiles a function.
*
* @return string The PHP code for the function
*/
public function compile();
public function needsEnvironment();
public function needsContext();
public function getSafe(Node $filterArgs);
public function setArguments($arguments);
public function getArguments();
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Lexer;
class_exists('Twig\Lexer');
if (\false) {
class Twig_Lexer extends Lexer
{
}
}

View File

@@ -0,0 +1,36 @@
<?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.
*/
use Twig\Error\SyntaxError;
use Twig\Source;
use Twig\TokenStream;
/**
* Interface implemented by lexer classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.12 (to be removed in 3.0)
*/
interface Twig_LexerInterface
{
/**
* Tokenizes a source code.
*
* @param string|Source $code The source code
* @param string $name A unique identifier for the source code
*
* @return TokenStream
*
* @throws SyntaxError When the code is syntactically wrong
*/
public function tokenize($code, $name = null);
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Loader\ArrayLoader;
class_exists('Twig\Loader\ArrayLoader');
if (\false) {
class Twig_Loader_Array extends ArrayLoader
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Loader\ChainLoader;
class_exists('Twig\Loader\ChainLoader');
if (\false) {
class Twig_Loader_Chain extends ChainLoader
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Loader\FilesystemLoader;
class_exists('Twig\Loader\FilesystemLoader');
if (\false) {
class Twig_Loader_Filesystem extends FilesystemLoader
{
}
}

View File

@@ -0,0 +1,63 @@
<?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.
*/
use Twig\Loader\ExistsLoaderInterface;
use Twig\Loader\LoaderInterface;
use Twig\Loader\SourceContextLoaderInterface;
use Twig\Source;
@trigger_error('The Twig_Loader_String class is deprecated since version 1.18.1 and will be removed in 2.0. Use "Twig\Loader\ArrayLoader" instead or "Twig\Environment::createTemplate()".', E_USER_DEPRECATED);
/**
* Loads a template from a string.
*
* This loader should NEVER be used. It only exists for Twig internal purposes.
*
* When using this loader with a cache mechanism, you should know that a new cache
* key is generated each time a template content "changes" (the cache key being the
* 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 LoaderInterface, ExistsLoaderInterface, SourceContextLoaderInterface
{
public function getSource($name)
{
@trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', \get_class($this)), E_USER_DEPRECATED);
return $name;
}
public function getSourceContext($name)
{
return new Source($name, $name);
}
public function exists($name)
{
return true;
}
public function getCacheKey($name)
{
return $name;
}
public function isFresh($name, $time)
{
return true;
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Loader\LoaderInterface;
class_exists('Twig\Loader\LoaderInterface');
if (\false) {
class Twig_LoaderInterface extends LoaderInterface
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Markup;
class_exists('Twig\Markup');
if (\false) {
class Twig_Markup extends Markup
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Node;
class_exists('Twig\Node\Node');
if (\false) {
class Twig_Node extends Node
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\AutoEscapeNode;
class_exists('Twig\Node\AutoEscapeNode');
if (\false) {
class Twig_Node_AutoEscape extends AutoEscapeNode
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\BlockNode;
class_exists('Twig\Node\BlockNode');
if (\false) {
class Twig_Node_Block extends BlockNode
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\BlockReferenceNode;
class_exists('Twig\Node\BlockReferenceNode');
if (\false) {
class Twig_Node_BlockReference extends BlockReferenceNode
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\BodyNode;
class_exists('Twig\Node\BodyNode');
if (\false) {
class Twig_Node_Body extends BodyNode
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\CheckSecurityNode;
class_exists('Twig\Node\CheckSecurityNode');
if (\false) {
class Twig_Node_CheckSecurity extends CheckSecurityNode
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\DeprecatedNode;
class_exists('Twig\Node\DeprecatedNode');
if (\false) {
class Twig_Node_Deprecated extends DeprecatedNode
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\DoNode;
class_exists('Twig\Node\DoNode');
if (\false) {
class Twig_Node_Do extends DoNode
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\EmbedNode;
class_exists('Twig\Node\EmbedNode');
if (\false) {
class Twig_Node_Embed extends EmbedNode
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\AbstractExpression;
class_exists('Twig\Node\Expression\AbstractExpression');
if (\false) {
class Twig_Node_Expression extends AbstractExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\ArrayExpression;
class_exists('Twig\Node\Expression\ArrayExpression');
if (\false) {
class Twig_Node_Expression_Array extends ArrayExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\AssignNameExpression;
class_exists('Twig\Node\Expression\AssignNameExpression');
if (\false) {
class Twig_Node_Expression_AssignName extends AssignNameExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\AbstractBinary;
class_exists('Twig\Node\Expression\Binary\AbstractBinary');
if (\false) {
class Twig_Node_Expression_Binary extends AbstractBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\AddBinary;
class_exists('Twig\Node\Expression\Binary\AddBinary');
if (\false) {
class Twig_Node_Expression_Binary_Add extends AddBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\AndBinary;
class_exists('Twig\Node\Expression\Binary\AndBinary');
if (\false) {
class Twig_Node_Expression_Binary_And extends AndBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\BitwiseAndBinary;
class_exists('Twig\Node\Expression\Binary\BitwiseAndBinary');
if (\false) {
class Twig_Node_Expression_Binary_BitwiseAnd extends BitwiseAndBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\BitwiseOrBinary;
class_exists('Twig\Node\Expression\Binary\BitwiseOrBinary');
if (\false) {
class Twig_Node_Expression_Binary_BitwiseOr extends BitwiseOrBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\BitwiseXorBinary;
class_exists('Twig\Node\Expression\Binary\BitwiseXorBinary');
if (\false) {
class Twig_Node_Expression_Binary_BitwiseXor extends BitwiseXorBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\ConcatBinary;
class_exists('Twig\Node\Expression\Binary\ConcatBinary');
if (\false) {
class Twig_Node_Expression_Binary_Concat extends ConcatBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\DivBinary;
class_exists('Twig\Node\Expression\Binary\DivBinary');
if (\false) {
class Twig_Node_Expression_Binary_Div extends DivBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\EndsWithBinary;
class_exists('Twig\Node\Expression\Binary\EndsWithBinary');
if (\false) {
class Twig_Node_Expression_Binary_EndsWith extends EndsWithBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\EqualBinary;
class_exists('Twig\Node\Expression\Binary\EqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_Equal extends EqualBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\FloorDivBinary;
class_exists('Twig\Node\Expression\Binary\FloorDivBinary');
if (\false) {
class Twig_Node_Expression_Binary_FloorDiv extends FloorDivBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\GreaterBinary;
class_exists('Twig\Node\Expression\Binary\GreaterBinary');
if (\false) {
class Twig_Node_Expression_Binary_Greater extends GreaterBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\GreaterEqualBinary;
class_exists('Twig\Node\Expression\Binary\GreaterEqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_GreaterEqual extends GreaterEqualBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\InBinary;
class_exists('Twig\Node\Expression\Binary\InBinary');
if (\false) {
class Twig_Node_Expression_Binary_In extends InBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\LessBinary;
class_exists('Twig\Node\Expression\Binary\LessBinary');
if (\false) {
class Twig_Node_Expression_Binary_Less extends LessBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\LessEqualBinary;
class_exists('Twig\Node\Expression\Binary\LessEqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_LessEqual extends LessEqualBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\MatchesBinary;
class_exists('Twig\Node\Expression\Binary\MatchesBinary');
if (\false) {
class Twig_Node_Expression_Binary_Matches extends MatchesBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\ModBinary;
class_exists('Twig\Node\Expression\Binary\ModBinary');
if (\false) {
class Twig_Node_Expression_Binary_Mod extends ModBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\MulBinary;
class_exists('Twig\Node\Expression\Binary\MulBinary');
if (\false) {
class Twig_Node_Expression_Binary_Mul extends MulBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\NotEqualBinary;
class_exists('Twig\Node\Expression\Binary\NotEqualBinary');
if (\false) {
class Twig_Node_Expression_Binary_NotEqual extends NotEqualBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\NotInBinary;
class_exists('Twig\Node\Expression\Binary\NotInBinary');
if (\false) {
class Twig_Node_Expression_Binary_NotIn extends NotInBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\OrBinary;
class_exists('Twig\Node\Expression\Binary\OrBinary');
if (\false) {
class Twig_Node_Expression_Binary_Or extends OrBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\PowerBinary;
class_exists('Twig\Node\Expression\Binary\PowerBinary');
if (\false) {
class Twig_Node_Expression_Binary_Power extends PowerBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\RangeBinary;
class_exists('Twig\Node\Expression\Binary\RangeBinary');
if (\false) {
class Twig_Node_Expression_Binary_Range extends RangeBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\StartsWithBinary;
class_exists('Twig\Node\Expression\Binary\StartsWithBinary');
if (\false) {
class Twig_Node_Expression_Binary_StartsWith extends StartsWithBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Binary\SubBinary;
class_exists('Twig\Node\Expression\Binary\SubBinary');
if (\false) {
class Twig_Node_Expression_Binary_Sub extends SubBinary
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\BlockReferenceExpression;
class_exists('Twig\Node\Expression\BlockReferenceExpression');
if (\false) {
class Twig_Node_Expression_BlockReference extends BlockReferenceExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\CallExpression;
class_exists('Twig\Node\Expression\CallExpression');
if (\false) {
class Twig_Node_Expression_Call extends CallExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\ConditionalExpression;
class_exists('Twig\Node\Expression\ConditionalExpression');
if (\false) {
class Twig_Node_Expression_Conditional extends ConditionalExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\ConstantExpression;
class_exists('Twig\Node\Expression\ConstantExpression');
if (\false) {
class Twig_Node_Expression_Constant extends ConstantExpression
{
}
}

View File

@@ -0,0 +1,35 @@
<?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.
*/
use Twig\Compiler;
use Twig\Node\Expression\AbstractExpression;
@trigger_error('The Twig_Node_Expression_ExtensionReference class is deprecated since version 1.23 and will be removed in 2.0.', E_USER_DEPRECATED);
/**
* Represents an extension call node.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @deprecated since 1.23 and will be removed in 2.0.
*/
class Twig_Node_Expression_ExtensionReference extends AbstractExpression
{
public function __construct($name, $lineno, $tag = null)
{
parent::__construct([], ['name' => $name], $lineno, $tag);
}
public function compile(Compiler $compiler)
{
$compiler->raw(sprintf("\$this->env->getExtension('%s')", $this->getAttribute('name')));
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\FilterExpression;
class_exists('Twig\Node\Expression\FilterExpression');
if (\false) {
class Twig_Node_Expression_Filter extends FilterExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\Filter\DefaultFilter;
class_exists('Twig\Node\Expression\Filter\DefaultFilter');
if (\false) {
class Twig_Node_Expression_Filter_Default extends DefaultFilter
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\FunctionExpression;
class_exists('Twig\Node\Expression\FunctionExpression');
if (\false) {
class Twig_Node_Expression_Function extends FunctionExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\GetAttrExpression;
class_exists('Twig\Node\Expression\GetAttrExpression');
if (\false) {
class Twig_Node_Expression_GetAttr extends GetAttrExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\MethodCallExpression;
class_exists('Twig\Node\Expression\MethodCallExpression');
if (\false) {
class Twig_Node_Expression_MethodCall extends MethodCallExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\NameExpression;
class_exists('Twig\Node\Expression\NameExpression');
if (\false) {
class Twig_Node_Expression_Name extends NameExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\NullCoalesceExpression;
class_exists('Twig\Node\Expression\NullCoalesceExpression');
if (\false) {
class Twig_Node_Expression_NullCoalesce extends NullCoalesceExpression
{
}
}

View File

@@ -0,0 +1,11 @@
<?php
use Twig\Node\Expression\ParentExpression;
class_exists('Twig\Node\Expression\ParentExpression');
if (\false) {
class Twig_Node_Expression_Parent extends ParentExpression
{
}
}

Some files were not shown because too many files have changed in this diff Show More