fix deprecations: add 'choices_as_values=true' to ChoiceType elements

This commit is contained in:
nobohan 2018-04-05 07:34:52 +02:00
parent 7637954a8d
commit 6bf4f68f0d

View File

@ -23,10 +23,13 @@ namespace Chill\ReportBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Security\Core\Role\Role;
use Chill\PersonBundle\Entity\Person;
use Chill\ReportBundle\Entity\Report;
use Chill\ReportBundle\Form\ReportType;
use Symfony\Component\Security\Core\Role\Role;
/**
* Report controller.
@ -133,8 +136,9 @@ class ReportController extends Controller
'method' => 'GET',
'csrf_protection' => false
))
->add('cFGroup', 'choice', array(
'choices' => $cFGroupsChoice
->add('cFGroup', ChoiceType::class, array(
'choices' => $cFGroupsChoice,
'choices_as_values' => true
))
->getForm();
@ -185,8 +189,9 @@ class ReportController extends Controller
'method' => 'GET',
'csrf_protection' => false
))
->add('cFGroup', 'choice', array(
'choices' => $cFGroupsChoice
->add('cFGroup', ChoiceType::class, array(
'choices' => $cFGroupsChoice,
'choices_as_values' => true
))
->getForm();