Fix example for PSR-15 FormBuilder handling
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 12 Dec 2022 09:16:15 +0000 (10:16 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 12 Dec 2022 09:16:15 +0000 (10:16 +0100)
docs/migration/wsc55/php.md

index 3438f8f8624788ea016e0cbf209918b8f8455359..5a81519a91fa79b8ee8de418e7cc0d05c707bc0b 100644 (file)
@@ -237,14 +237,14 @@ If validation succeeded, the controller must perform the resulting action and re
 
 ```php
 if ($request->getMethod() === 'GET') {
-    return $dialogForm->toJsonResponse();
+    return $dialogForm->toResponse();
 } elseif ($request->getMethod() === 'POST') {
-    $response = $dialogForm->validatePsr7Request($request);
+    $response = $dialogForm->validateRequest($request);
     if ($response !== null) {
         return $response;
     }
 
-    $data = $form->getData();
+    $data = $dialogForm->getData();
 
     // Use $data.