Commit d4d14d1a authored by Julien Minet's avatar Julien Minet
Browse files

fix deprecations: use fqcn

parent bc6716a5
Pipeline #46102 failed with stages
in 1 minute and 19 seconds
......@@ -186,7 +186,7 @@ class ReportController extends Controller
}
$form = $this->get('form.factory')
->createNamedBuilder(null, 'form', null, array(
->createNamedBuilder(null, FormType::class, null, array(
'method' => 'GET',
'csrf_protection' => false
))
......@@ -345,7 +345,7 @@ class ReportController extends Controller
*/
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',
array('person_id' => $person->getId(),
'cf_group_id' => $cFGroup->getId())),
......@@ -430,7 +430,7 @@ class ReportController extends Controller
*/
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',
array('person_id' => $entity->getPerson()->getId(),
'report_id' => $entity->getId())),
......
......@@ -27,6 +27,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Chill\MainBundle\Form\Type\AppendScopeChoiceTypeTrait;
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Chill\MainBundle\Templating\TranslatableStringHelper;
use Doctrine\Common\Persistence\ObjectManager;
use Chill\CustomFieldsBundle\Form\Type\CustomFieldType;
......@@ -78,7 +79,7 @@ class ReportType extends AbstractType
{
$builder
->add('user')
->add('date', 'date',
->add('date', DateType::class,
array('required' => true, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy'))
->add('cFData', CustomFieldType::class,
array('attr' => array('class' => 'cf-fields'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment