Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit70360ee

Browse files
committed
minor#9336 Rename allowSuccessfulResponse to correct allowCustomResponseCode (hkdobrev)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes#9336).Discussion----------Rename allowSuccessfulResponse to correct allowCustomResponseCodeIntroduced in5f0becfThe functionality was introduced insymfony/symfony#19822.The method got renamed during code review, but was not updated in the docs.symfony/symfony#19822 (comment)Commits-------0cda0d5 Rename missing allowCustomResponseCode to correct allowCustomResponseCode
2 parents3498aa9 +0cda0d5 commit70360ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎reference/events.rst‎

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp