The class Twig_Environment has been deprecated with message: since Twig 2.7, use "Twig\Environment" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be
removed from the class and what other constant to use instead.
Loading history...
11
{
12
2
public function __construct(string $templateDirectory)
13
{
14
2
$fs = new Filesystem();
15
16
2
if (! $fs->exists($templateDirectory)) {
17
1
$fs->mkdir($templateDirectory);
18
}
19
20
2
$loader = new \Twig_Loader_Filesystem($templateDirectory);
The class Twig_Loader_Filesystem has been deprecated with message: since Twig 2.7, use "Twig\Loader\FilesystemLoader" instead
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be
removed from the class and what other constant to use instead.
Loading history...
21
22
2
parent::__construct($loader);
23
2
}
24
25
2
public static function make(string $templateDirectory): TwigRenderer
26
{
27
2
return new self($templateDirectory);
28
}
29
30
1
public function renderTemplate(string $path, array $variables): string
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.