From c6bbc48b7ca802fedc70135ccb4702da4265cc4e Mon Sep 17 00:00:00 2001 From: Mihailov Vasilievic Filho Date: Fri, 19 May 2017 17:22:14 -0300 Subject: [PATCH] Update HttpFragmentServiceProvider.php Trying to use twig functions "controller" and "render_esi" like [Symfony esi reference](http://symfony.com/doc/current/http_cache/esi.html) , i've noticed the following error: An exception has been thrown during the rendering of a template ("You must use a URI when using the ESI rendering strategy or set a URL signer."). It's the lack of a UriSigner on the constructor. --- src/Silex/Provider/HttpFragmentServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Silex/Provider/HttpFragmentServiceProvider.php b/src/Silex/Provider/HttpFragmentServiceProvider.php index 9a641f40b..fb1f4990a 100644 --- a/src/Silex/Provider/HttpFragmentServiceProvider.php +++ b/src/Silex/Provider/HttpFragmentServiceProvider.php @@ -51,7 +51,7 @@ public function register(Container $app) }; $app['fragment.renderer.esi'] = function ($app) { - $renderer = new EsiFragmentRenderer($app['http_cache.esi'], $app['fragment.renderer.inline']); + $renderer = new EsiFragmentRenderer($app['http_cache.esi'], $app['fragment.renderer.inline'], $app['uri_signer']); $renderer->setFragmentPath($app['fragment.path']); return $renderer;