Support for DELETE method in forms
This commit is contained in:
parent
f842739d58
commit
0b7e2e035a
@ -581,6 +581,7 @@ class Form implements \IteratorAggregate, FormInterface
|
|||||||
switch ($request->getMethod()) {
|
switch ($request->getMethod()) {
|
||||||
case 'POST':
|
case 'POST':
|
||||||
case 'PUT':
|
case 'PUT':
|
||||||
|
case 'DELETE':
|
||||||
if ('' === $this->getName()) {
|
if ('' === $this->getName()) {
|
||||||
$data = array_replace_recursive(
|
$data = array_replace_recursive(
|
||||||
$request->request->all(),
|
$request->request->all(),
|
||||||
|
@ -822,6 +822,7 @@ class FormTest extends \PHPUnit_Framework_TestCase
|
|||||||
return array(
|
return array(
|
||||||
array('POST'),
|
array('POST'),
|
||||||
array('PUT'),
|
array('PUT'),
|
||||||
|
array('DELETE'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user