1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-22 21:40:43 +01:00

Moved off of deprecated Twig classes

This commit is contained in:
Deltik 2019-03-29 10:14:27 -05:00
parent 024287d821
commit ddb88c726d
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637
3 changed files with 8 additions and 5 deletions

2
e107

@ -1 +1 @@
Subproject commit a8d1541b9d059437d7a98cf1c3b652b879ebb7ca
Subproject commit c060d5ace25abd5dd1cc701937c6aedb0078a058

@ -1 +1 @@
Subproject commit c7868a07e4d9fef5878d988501c05ee808b11e51
Subproject commit f1c73d69027b8d6b2bf3aa1c3d66ab51e693ce11

View File

@ -6,6 +6,9 @@ include_once(codecept_root_dir() . "lib/preparers/PreparerFactory.php");
// all public methods declared in helper class will be available in $I
use Codeception\Lib\ModuleContainer;
use PreparerFactory;
use Twig\Environment;
use Twig\Loader\ArrayLoader;
abstract class E107Base extends Base
{
@ -16,7 +19,7 @@ abstract class E107Base extends Base
public function __construct(ModuleContainer $moduleContainer, $config = null)
{
parent::__construct($moduleContainer, $config);
$this->preparer = \PreparerFactory::create();
$this->preparer = PreparerFactory::create();
}
public function _beforeSuite($settings = array())
@ -37,10 +40,10 @@ abstract class E107Base extends Base
protected function writeLocalE107Config()
{
$twig_loader = new \Twig_Loader_Array([
$twig_loader = new ArrayLoader([
'e107_config.php' => file_get_contents(codecept_data_dir()."/e107_config.php.sample")
]);
$twig = new \Twig_Environment($twig_loader);
$twig = new Environment($twig_loader);
$db = $this->getModule('\Helper\DelayedDb');