mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-31 16:15:47 +00:00
force loading class aliases used in typehints
This commit is contained in:
@@ -18,6 +18,9 @@ use Twig\TwigFilter;
|
||||
use Twig\TwigFunction;
|
||||
use Twig\TwigTest;
|
||||
|
||||
// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name.
|
||||
class_exists('Twig\Environment');
|
||||
|
||||
/**
|
||||
* Interface implemented by extension classes.
|
||||
*
|
||||
|
||||
@@ -14,6 +14,9 @@ namespace Twig\Node;
|
||||
|
||||
use Twig\Compiler;
|
||||
|
||||
// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name.
|
||||
class_exists('Twig\Compiler');
|
||||
|
||||
/**
|
||||
* Represents a node in the AST.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,9 @@ namespace Twig\NodeVisitor;
|
||||
|
||||
use Twig\Environment;
|
||||
|
||||
// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name.
|
||||
class_exists('Twig\Environment');
|
||||
|
||||
/**
|
||||
* Interface for node visitor classes.
|
||||
*
|
||||
|
||||
@@ -15,6 +15,10 @@ use Twig\Error\SyntaxError;
|
||||
use Twig\Parser;
|
||||
use Twig\Token;
|
||||
|
||||
// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name.
|
||||
class_exists('Twig\Token');
|
||||
class_exists('Twig\Parser');
|
||||
|
||||
/**
|
||||
* Interface implemented by token parsers.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,9 @@ namespace Twig;
|
||||
|
||||
use Twig\Node\Node;
|
||||
|
||||
// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name.
|
||||
class_exists('Twig\Node\Node');
|
||||
|
||||
/**
|
||||
* Represents a template filter.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,9 @@ namespace Twig;
|
||||
|
||||
use Twig\Node\Node;
|
||||
|
||||
// Ensure that the aliased name is loaded to keep BC for classes implementing the typehint with the old aliased name.
|
||||
class_exists('Twig\Node\Node');
|
||||
|
||||
/**
|
||||
* Represents a template function.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user