Skip to content

Commit 4b05895

Browse files
committed
minor #9670 Fix controller references in ESI docs (danrot)
This PR was merged into the 4.0 branch. Discussion ---------- Fix controller references in ESI docs I have been playing around with ESI for a university course, and while checking the docs I realized that the controller references were wrong. The backslash was not escaped. Commits ------- b796c61 Fix controller references in ESI docs
2 parents c458d34 + b796c61 commit 4b05895

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

http_cache/esi.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags:
127127
{# templates/static/about.html.twig #}
128128
129129
{# you can use a controller reference #}
130-
{{ render_esi(controller('App\Controller\NewsController::latest', { 'maxPerPage': 5 })) }}
130+
{{ render_esi(controller('App\\Controller\\NewsController::latest', { 'maxPerPage': 5 })) }}
131131
132132
{# ... or a URL #}
133133
{{ render_esi(url('latest_news', { 'maxPerPage': 5 })) }}
@@ -139,7 +139,7 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags:
139139
<!-- you can use a controller reference -->
140140
<?php echo $view['actions']->render(
141141
new Symfony\Component\HttpKernel\Controller\ControllerReference(
142-
'App\Controller\NewsController::latest',
142+
'App\\Controller\\NewsController::latest',
143143
array('maxPerPage' => 5)
144144
),
145145
array('strategy' => 'esi')

0 commit comments

Comments
 (0)