I solved the issue with modifying the containerazied approach shown on twig-view
's readme:
$container->set('view', function() {
$twig = Twig::create('../templates', ['debug' => true]);
$twig->addExtension(new \Twig\Extension\DebugExtension());
return $twig;
});