Skip to content

Commit 66cea26

Browse files
committed
swap request and form
1 parent adbbfda commit 66cea26

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ protected function stream(string $view, array $parameters = [], StreamedResponse
300300
* @param callable(FormInterface): Response $onSuccess
301301
* @param callable(FormInterface): Response $render
302302
*/
303-
public function handleForm(Request $request, FormInterface $form, callable $onSuccess, callable $render): Response
303+
public function handleForm(FormInterface $form, Request $request, callable $onSuccess, callable $render): Response
304304
{
305305
$form->handleRequest($request);
306306

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,8 @@ public function testHandleFormNotSubmitted()
431431

432432
$controller = $this->createController();
433433
$response = $controller->handleForm(
434-
Request::create('https://example.com'),
435434
$form,
435+
Request::create('https://example.com'),
436436
function (FormInterface $form): Response {
437437
return new RedirectResponse('https://example.com/redir', Response::HTTP_SEE_OTHER);
438438
},
@@ -453,8 +453,8 @@ public function testHandleFormInvalid()
453453

454454
$controller = $this->createController();
455455
$response = $controller->handleForm(
456-
Request::create('https://example.com'),
457456
$form,
457+
Request::create('https://example.com'),
458458
function (FormInterface $form): Response {
459459
return new RedirectResponse('https://example.com/redir', Response::HTTP_SEE_OTHER);
460460
},
@@ -475,8 +475,8 @@ public function testHandleFormValid()
475475

476476
$controller = $this->createController();
477477
$response = $controller->handleForm(
478-
Request::create('https://example.com'),
479478
$form,
479+
Request::create('https://example.com'),
480480
function (FormInterface $form): Response {
481481
return new RedirectResponse('https://example.com/redir', Response::HTTP_SEE_OTHER);
482482
},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy