Add note about changed form processing when using PUT requests

See https://github.com/symfony/symfony/issues/8261
This commit is contained in:
Felix Nagel 2018-06-05 09:42:58 +02:00 committed by Felix Nagel
parent efe9beb186
commit 140b6c2101

View File

@ -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`.