fix deprecations: use fqcn for form creations in controllers

This commit is contained in:
nobohan
2018-04-03 17:29:26 +02:00
parent 7922f8f181
commit 5e577c3272
4 changed files with 9 additions and 8 deletions

View File

@@ -73,7 +73,7 @@ class UserController extends Controller
*/
private function createCreateForm(User $entity)
{
$form = $this->createForm(new UserType(), $entity, array(
$form = $this->createForm(UserType::class, $entity, array(
'action' => $this->generateUrl('admin_user_create'),
'method' => 'POST',
'is_creation' => true
@@ -177,7 +177,7 @@ class UserController extends Controller
*/
private function createEditPasswordForm(User $user)
{
return $this->createForm(new UserPasswordType(), $user, array(
return $this->createForm(UserPasswordType::class, $user, array(
'action' =>
$this->generateUrl('admin_user_update_password', array('id' => $user->getId())),
'method' => 'PUT'
@@ -292,7 +292,7 @@ class UserController extends Controller
*/
private function createEditForm(User $user)
{
$form = $this->createForm(new UserType(), $user, array(
$form = $this->createForm(UserType::class, $user, array(
'action' => $this->generateUrl('admin_user_update', array('id' => $user->getId())),
'method' => 'PUT',
));