Skip to content

Commit c72b075

Browse files
authored
Merge pull request #6 from wireboxes/master
Fixed Twig Environment loading issue
2 parents 39232b4 + 6920a87 commit c72b075

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/config.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
use function DI\create;
44
use SuperBlog\Model\ArticleRepository;
55
use SuperBlog\Persistence\InMemoryArticleRepository;
6+
use Twig\Environment;
7+
use Twig\Loader\FilesystemLoader;
68

79
return [
810
// Bind an interface to an implementation
911
ArticleRepository::class => create(InMemoryArticleRepository::class),
1012

1113
// Configure Twig
12-
Twig_Environment::class => function () {
13-
$loader = new Twig_Loader_Filesystem(__DIR__ . '/../src/SuperBlog/Views');
14-
return new Twig_Environment($loader);
14+
Environment::class => function () {
15+
$loader = new FilesystemLoader(__DIR__ . '/../src/SuperBlog/Views');
16+
return new Environment($loader);
1517
},
1618
];

0 commit comments

Comments
 (0)