From 140b6c210155413d6a95f1464107b2a365069afa Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Tue, 5 Jun 2018 09:42:58 +0200 Subject: [PATCH] Add note about changed form processing when using PUT requests See https://github.com/symfony/symfony/issues/8261 --- UPGRADE-3.0.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/UPGRADE-3.0.md b/UPGRADE-3.0.md index f9524e7710..9ec4987b3b 100644 --- a/UPGRADE-3.0.md +++ b/UPGRADE-3.0.md @@ -595,6 +595,24 @@ UPGRADE FROM 2.x to 3.0 } } ``` + + If the form is submitted with a different request method than `POST`, you need to configure this in the form: + + Before: + + ```php + $form = $this->createForm(FormType::class, $entity); + $form->submit($request); + ``` + + After: + + ```php + $form = $this->createForm(FormType::class, $entity, [ + 'method' => 'PUT', + ]); + $form->handleRequest($request); + ``` * The events `PRE_BIND`, `BIND` and `POST_BIND` were renamed to `PRE_SUBMIT`, `SUBMIT` and `POST_SUBMIT`.