Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Update deleteAction method in CRUDController #1176

wants to merge 1 commit into from

3 participants

Vincent Touzet dylan oliver Thomas
Vincent Touzet

Change method from DELETE to POST in deleteAction.

Vincent Touzet vincenttouzet Update Controller/CRUDController.php
Change method from DELETE to POST in deleteAction
dylan oliver

Unnecessary, delete and put are still valid if you enable with new static method on Request class (see docs)

Vincent Touzet

Then why not requiring a PUT method for the createAction ?


The issue is only for Symfony2.2. And there is a new static method on the Request object to check if we have to deal with a POST or a PUT.

For now, the master branch is for symfony2.1

Vincent Touzet

Ok so this pull request is not necessary


you can create a PR to handle the case where Request::getHttpMethodParameterOverride is enabled or not on the develop branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 16, 2013
  1. Vincent Touzet

    Update Controller/CRUDController.php

    vincenttouzet authored
    Change method from DELETE to POST in deleteAction
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  Controller/CRUDController.php
2  Controller/CRUDController.php
@@ -211,7 +211,7 @@ public function deleteAction($id)
throw new AccessDeniedException();
- if ($this->getRequest()->getMethod() == 'DELETE') {
+ if ($this->getRequest()->getMethod() == 'POST') {
try {
$this->get('session')->setFlash('sonata_flash_success', 'flash_delete_success');
Something went wrong with that request. Please try again.