diff --git a/composer.json b/composer.json index 1653ff3..61c507f 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ ], "require": { "php": ">=5.5.0", - "twig/twig": "^1.38|^2.7", + "twig/twig": "^1.38|^2.7|^3.0", "psr/http-message": "^1.0" }, "require-dev": { diff --git a/src/Twig.php b/src/Twig.php index b0ffd90..22a6b49 100644 --- a/src/Twig.php +++ b/src/Twig.php @@ -105,7 +105,7 @@ public function fetchBlock($template, $block, $data = []) { $data = array_merge($this->defaultVariables, $data); - return $this->environment->loadTemplate($template)->renderBlock($block, $data); + return $this->environment->load($template)->renderBlock($block, $data); } /**