Skip to content
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.

Commit

Permalink
Update HttpFragmentServiceProvider.php
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mihailov-vf committed May 19, 2017
1 parent 541d590 commit c6bbc48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Silex/Provider/HttpFragmentServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c6bbc48

Please sign in to comment.