Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #19552 [HttpFoundation] Add named constructor on JsonResponse…
… (tyx) This PR was merged into the 3.2-dev branch. Discussion ---------- [HttpFoundation] Add named constructor on JsonResponse | Q | A | ------------- | --- | Branch? | "master" | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | To make easier construction with raw json. It is a simple addition but having something like : ```php return new JsonResponse($content, Response::HTTP_OK, [], true); ``` and ```php return new JsonResponse($content, Response::HTTP_OK, []); ``` is not very obvious to get the difference without going to read the JsonResponse constructor. Commits ------- 6d5a65d Add named constructor on JsonResponse
- Loading branch information