diff --git a/bundle/DependencyInjection/Compiler/TwigRuntimePass.php b/bundle/DependencyInjection/Compiler/TwigRuntimePass.php
index <HASH>..<HASH> 100644
--- a/bundle/DependencyInjection/Compiler/TwigRuntimePass.php
+++ b/bundle/DependencyInjection/Compiler/TwigRuntimePass.php
@@ -10,6 +10,10 @@ class TwigRuntimePass implements CompilerPassInterface
 {
     public function process(ContainerBuilder $container)
     {
+        if (!$container->has('twig')) {
+            return;
+        }
+
         if ($container->has('twig.runtime_loader')) {
             // If official Twig runtime loader exists,
             // we skip using our custom runtime loader
Do not run TwigRuntimePass if Twig is not available