form handling: "bind" is deprecated in symfony 2.3 - "submit" doesn't work either

10,029

Passing the Request directly to submit() still works, but is deprecated and will be removed in Symfony 3.0. You should use the method handleRequest() instead.

( documentation )

Share:
10,029

Related videos on Youtube

Harold
Author by

Harold

My about me is currently blank.

Updated on June 13, 2022

Comments

  • Harold
    Harold almost 2 years

    In symfony 2.3 binding a Request to a form with bind() is deprecated:

    $form->bind($this->getRequest());
    

    Now I tried using the submit() method instead (as described in the documentation):

    $form->submit($request->request->get($form->getName()));
    

    ...but it doesn't work.

    The form did not change the object that I added to it upon creation.

Related