Support for DELETE method in forms

This commit is contained in:
Lars Strojny 2012-01-20 01:04:31 +01:00
parent f842739d58
commit 0b7e2e035a
2 changed files with 2 additions and 0 deletions

View File

@ -581,6 +581,7 @@ class Form implements \IteratorAggregate, FormInterface
switch ($request->getMethod()) {
case 'POST':
case 'PUT':
case 'DELETE':
if ('' === $this->getName()) {
$data = array_replace_recursive(
$request->request->all(),

View File

@ -822,6 +822,7 @@ class FormTest extends \PHPUnit_Framework_TestCase
return array(
array('POST'),
array('PUT'),
array('DELETE'),
);
}