8000 minor #50080 [HttpFoundation] Add note on Request::getPayload() (ro0NL) · symfony/symfony@5ef2cd5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5ef2cd5

Browse files
committed
minor #50080 [HttpFoundation] Add note on Request::getPayload() (ro0NL)
This PR was merged into the 6.3 branch. Discussion ---------- [HttpFoundation] Add note on Request::getPayload() | Q | A | ------------- | --- | Branch? | ![image](https://user-images.githubusercontent.com/1047696/233428976-ff899d51-e5a9-4023-9559-4a7470e08ae7.png) | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> <!-- Replace this notice by a short README for your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> i'd like to add a note on newly added getPayload in #49614 i hope this helps migrating to uniform access across the board, so we can deprecate these + get() somewhere in the future Commits ------- c97a551 Update Request.php
2 parents cb1f853 + c97a551 commit 5ef2cd5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ class Request
8989
/**
9090
* Request body parameters ($_POST).
9191
*
92+
* @see getPayload() for portability between content types
93+
*
9294
* @var InputBag
9395
*/
9496
public $request;
@@ -1515,6 +1517,8 @@ public function getPayload(): InputBag
15151517
/**
15161518
* Gets the request body decoded as array, typically from a JSON payload.
15171519
*
1520+
* @see getPayload() for portability between content types
1521+
*
15181522
* @throws JsonException When the body cannot be decoded to an array
15191523
*/
15201524
public function toArray(): array

0 commit comments

Comments
 (0)
0