From 9d15f1c0e880c2114e72bf461e16129dfee251b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=BChauf?= Date: Thu, 30 Nov 2023 12:18:40 +0100 Subject: [PATCH] fix type of `$response->headers->set()` The signature of the function `set` on `\Symfony\Component\HttpFoundation\ResponseHeaderBag` has changed with the release of Symfony 6.0 --- profiler.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/profiler.rst b/profiler.rst index e8b587eb9c1..9ea77a2485d 100644 --- a/profiler.rst +++ b/profiler.rst @@ -213,10 +213,10 @@ pages from a server. By default, the debug toolbar displays the information of the initial page load and doesn't refresh after each AJAX request. However, you can set the -``Symfony-Debug-Toolbar-Replace`` header to a value of ``1`` in the response to +``Symfony-Debug-Toolbar-Replace`` header to a value of ``'1'`` in the response to the AJAX request to force the refresh of the toolbar:: - $response->headers->set('Symfony-Debug-Toolbar-Replace', 1); + $response->headers->set('Symfony-Debug-Toolbar-Replace', '1'); Ideally this header should only be set during development and not for production. To do that, create an :doc:`event subscriber ` @@ -251,7 +251,7 @@ event:: } $response = $event->getResponse(); - $response->headers->set('Symfony-Debug-Toolbar-Replace', 1); + $response->headers->set('Symfony-Debug-Toolbar-Replace', '1'); } }