diff --git a/composer.json b/composer.json index 15883cb..7697df8 100644 --- a/composer.json +++ b/composer.json @@ -12,10 +12,14 @@ { "name": "Pablo Díez", "email": "pablodip@gmail.com" + }, + { + "name": "Ádám Bálint", + "email": "adam.balint@srg.hu" } ], "require": { - "php": "^5.6.0", + "php": "^5.6", "twig/twig": "^1.2" }, "autoload": { diff --git a/src/Mandango/Mondator/ClassExtension.php b/src/Mandango/Mondator/ClassExtension.php index dc9647a..815e235 100644 --- a/src/Mandango/Mondator/ClassExtension.php +++ b/src/Mandango/Mondator/ClassExtension.php @@ -409,7 +409,7 @@ public function getTwig() throw new \RuntimeException('Twig is required to use templates.'); } - $loader = new StringLoader(); + $loader = new \Twig_Loader_String(); $twig = new \Twig_Environment($loader, array( 'autoescape' => false, 'strict_variables' => true, diff --git a/src/Mandango/Mondator/StringLoader.php b/src/Mandango/Mondator/StringLoader.php deleted file mode 100644 index 57c00ee..0000000 --- a/src/Mandango/Mondator/StringLoader.php +++ /dev/null @@ -1,61 +0,0 @@ - - */ -class StringLoader implements \Twig_LoaderInterface -{ - /** - * {@inheritdoc} - */ - public function getSource($name) - { - return $name; - } - - /** - * {@inheritdoc} - */ - public function exists($name) - { - return true; - } - - /** - * {@inheritdoc} - */ - public function getCacheKey($name) - { - return $name; - } - - /** - * {@inheritdoc} - */ - public function isFresh($name, $time) - { - return true; - } -}