Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

forms

php

symfony

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.

like image 338
Harold Avatar asked Sep 11 '13 12:09

Harold


1 Answers

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 )

like image 196
Nicolai Fröhlich Avatar answered Nov 13 '22 15:11

Nicolai Fröhlich