Skip to content

Commit b2cd454

Browse files
committed
minor #47026 Explain status codes in comments (alexislefebvre)
This PR was merged into the 6.2 branch. Discussion ---------- Explain status codes in comments | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | These comments will help users to understand the usage of each status code by being explicit about the code and the message. So that developers who don't remember what `200` and `302` mean can understand it directly. I took some inspiration from this line: https://github.com/symfony/symfony/blob/7463344ecdac6fdd6e6a1d86d344b93ddf7cdda9/src/Symfony/Component/HttpFoundation/RedirectResponse.php#L28 Replace #47025 Commits ------- 8734d222b4 Explain status codes in comments
2 parents e2e1373 + 29e8fb4 commit b2cd454

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HttpUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __construct(UrlGeneratorInterface $urlGenerator = null, UrlMatch
4949
* Creates a redirect Response.
5050
*
5151
* @param string $path A path (an absolute path (/foo), an absolute URL (http://...), or a route name (foo))
52-
* @param int $status The status code
52+
* @param int $status The HTTP status code (302 "Found" by default)
5353
*/
5454
public function createRedirectResponse(Request $request, string $path, int $status = 302): RedirectResponse
5555
{

0 commit comments

Comments
 (0)