Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0cda0d5

Browse filesBrowse files
hkdobrevjaviereguiluz
authored andcommitted
Rename missing allowCustomResponseCode to correct allowCustomResponseCode
Introduced in 5f0becf The functionality was introduced in symfony/symfony#19822. The method got renamed during code review, but was not updated in the docs. symfony/symfony#19822 (comment)
1 parent 3498aa9 commit 0cda0d5
Copy full SHA for 0cda0d5

File tree

1 file changed

+3
-3
lines changed
Filter options

1 file changed

+3
-3
lines changed

‎reference/events.rst

Copy file name to clipboardExpand all lines: reference/events.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,15 @@ response:
236236

237237
If you want to overwrite the status code of the exception response, which
238238
you should not without a good reason, call
239-
``GetResponseForExceptionEvent::allowSuccessfulResponse()`` first and then
239+
``GetResponseForExceptionEvent::allowCustomResponseCode()`` first and then
240240
set the status code on the response::
241241

242-
$event->allowSuccessfulResponse();
242+
$event->allowCustomResponseCode();
243243
$response = new Response('No Content', 204);
244244
$event->setResponse($response);
245245

246246
The status code sent to the client in the above example will be ``204``. If
247-
``$event->allowSuccessfulResponse()`` is omitted, then the kernel will set
247+
``$event->allowCustomResponseCode()`` is omitted, then the kernel will set
248248
an appropriate status code based on the type of exception thrown.
249249

250250
.. seealso::

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.