fix deprecations: use fqcn

This commit is contained in:
nobohan 2018-04-05 12:36:58 +02:00
parent bc6716a5fd
commit d4d14d1a06
2 changed files with 5 additions and 4 deletions

View File

@ -186,7 +186,7 @@ class ReportController extends Controller
} }
$form = $this->get('form.factory') $form = $this->get('form.factory')
->createNamedBuilder(null, 'form', null, array( ->createNamedBuilder(null, FormType::class, null, array(
'method' => 'GET', 'method' => 'GET',
'csrf_protection' => false 'csrf_protection' => false
)) ))
@ -345,7 +345,7 @@ class ReportController extends Controller
*/ */
private function createCreateForm(Report $entity, Person $person, $cFGroup) private function createCreateForm(Report $entity, Person $person, $cFGroup)
{ {
$form = $this->createForm('chill_reportbundle_report', $entity, array( $form = $this->createForm(ReportType::class, $entity, array(
'action' => $this->generateUrl('report_create', 'action' => $this->generateUrl('report_create',
array('person_id' => $person->getId(), array('person_id' => $person->getId(),
'cf_group_id' => $cFGroup->getId())), 'cf_group_id' => $cFGroup->getId())),
@ -430,7 +430,7 @@ class ReportController extends Controller
*/ */
private function createEditForm(Report $entity) private function createEditForm(Report $entity)
{ {
$form = $this->createForm('chill_reportbundle_report', $entity, array( $form = $this->createForm(ReportType::class, $entity, array(
'action' => $this->generateUrl('report_update', 'action' => $this->generateUrl('report_update',
array('person_id' => $entity->getPerson()->getId(), array('person_id' => $entity->getPerson()->getId(),
'report_id' => $entity->getId())), 'report_id' => $entity->getId())),

View File

@ -27,6 +27,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Chill\MainBundle\Form\Type\AppendScopeChoiceTypeTrait; use Chill\MainBundle\Form\Type\AppendScopeChoiceTypeTrait;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper; use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\MainBundle\Templating\TranslatableStringHelper;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\Common\Persistence\ObjectManager;
use Chill\CustomFieldsBundle\Form\Type\CustomFieldType; use Chill\CustomFieldsBundle\Form\Type\CustomFieldType;
@ -78,7 +79,7 @@ class ReportType extends AbstractType
{ {
$builder $builder
->add('user') ->add('user')
->add('date', 'date', ->add('date', DateType::class,
array('required' => true, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy')) array('required' => true, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy'))
->add('cFData', CustomFieldType::class, ->add('cFData', CustomFieldType::class,
array('attr' => array('class' => 'cf-fields'), array('attr' => array('class' => 'cf-fields'),