force loading class aliases used in typehints

This commit is contained in:
Christophe Coevoet
2019-03-12 15:24:00 +01:00
parent 47297c2ae9
commit 65c0559125
6 changed files with 19 additions and 0 deletions
+3
View File
@@ -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.
*
+3
View File
@@ -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.
*
+3
View File
@@ -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.
*
+4
View File
@@ -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.
*
+3
View File
@@ -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.
*
+3
View File
@@ -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.
*