From 7d337de7456ef9fd83d73059c66b4ab9ec16e7a3 Mon Sep 17 00:00:00 2001 From: Adam Averay Date: Thu, 28 Nov 2019 08:33:10 +1000 Subject: [PATCH 1/2] Support installing Twig 3 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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": { From 917f58f40050cc3aa3224d0e2aacf4742e9fa0d3 Mon Sep 17 00:00:00 2001 From: Adam Averay Date: Thu, 28 Nov 2019 08:41:07 +1000 Subject: [PATCH 2/2] Replace internal method call with public API --- src/Twig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } /**