8000 fix type of `$response->headers->set()` by mfruehauf · Pull Request #19200 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

fix type of $response->headers->set() #19200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
  • Loading branch information
mfruehauf authored and Markus Fruehauf committed Nov 30, 2023
commit 9d15f1c0e880c2114e72bf461e16129dfee251b2
6 changes: 3 additions & 3 deletions profiler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 </event_dispatcher>`
Expand Down Expand Up @@ -251,7 +251,7 @@ event::
}

$response = $event->getResponse();
$response->headers->set('Symfony-Debug-Toolbar-Replace', 1);
$response->headers->set('Symfony-Debug-Toolbar-Replace', '1');
}
}

Expand Down
0