Skip to content

Commit

Permalink
changed twig version ^2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhaqq committed Aug 5, 2019
1 parent 5aa9ced commit cfd37a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"require": {
"php": ">=5.6",
"twig/twig": "~2.3.0"
"twig/twig": "^2.3"
},
"require-dev": {
"fastd/http": "^3.0"
Expand Down
8 changes: 4 additions & 4 deletions src/Viewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

use FastD\Container\Container;
use FastD\Container\ServiceProviderInterface;
use Twig_Environment;
use Twig_Loader_Filesystem;
use Twig\Environment;
use Twig\Loader\FilesystemLoader;

/**
* Class ViewServiceProvider
Expand All @@ -27,8 +27,8 @@ class Viewer implements ServiceProviderInterface
public function register(Container $container)
{
$config = config()->get('viewer', []);
$loader = new Twig_Loader_Filesystem(isset($config['path']) ? $config['path'] : app()->getPath().'/src/Views');
$twig = new Twig_Environment($loader, isset($config['options']) ? $config['options'] : []);
$loader = new FilesystemLoader(isset($config['path']) ? $config['path'] : app()->getPath().'/src/Views');
$twig = new Environment($loader, isset($config['options']) ? $config['options'] : []);

$container->add('view', $twig);
}
Expand Down

0 comments on commit cfd37a5

Please sign in to comment.