mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 06:14:23 +00:00
fix deprecations: use fqcn
This commit is contained in:
parent
654f7b4d26
commit
00bbbd32d6
@ -30,6 +30,7 @@ use Symfony\Bundle\TwigBundle\TwigEngine;
|
|||||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||||
@ -122,7 +123,7 @@ class CustomFieldText extends AbstractCustomField
|
|||||||
public function buildOptionsForm(FormBuilderInterface $builder)
|
public function buildOptionsForm(FormBuilderInterface $builder)
|
||||||
{
|
{
|
||||||
return $builder
|
return $builder
|
||||||
->add(self::MAX_LENGTH, 'integer', array('empty_data' => 256))
|
->add(self::MAX_LENGTH, IntegerType::class, array('empty_data' => 256))
|
||||||
->add(self::MULTIPLE_CF_INLINE, ChoiceType::class, array(
|
->add(self::MULTIPLE_CF_INLINE, ChoiceType::class, array(
|
||||||
'choices' => array(
|
'choices' => array(
|
||||||
'Multiple boxes on the line' => '1',
|
'Multiple boxes on the line' => '1',
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
namespace Chill\CustomFields\Tests\Form\Extension;
|
namespace Chill\CustomFields\Tests\Form\Extension;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the post-text extension
|
* Test the post-text extension
|
||||||
@ -46,7 +47,7 @@ class PostTextIntegerExtensionTest extends KernelTestCase
|
|||||||
|
|
||||||
public function testCreateView()
|
public function testCreateView()
|
||||||
{
|
{
|
||||||
$form = $this->formBuilder->add('test', 'integer', array(
|
$form = $this->formBuilder->add('test', IntegerType::class, array(
|
||||||
'post_text' => 'my text'
|
'post_text' => 'my text'
|
||||||
))->getForm();
|
))->getForm();
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
namespace Chill\CustomFields\Tests\Form\Extension;
|
namespace Chill\CustomFields\Tests\Form\Extension;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test the post-text extension
|
* Test the post-text extension
|
||||||
@ -46,7 +47,7 @@ class PostTextNumberExtensionTest extends KernelTestCase
|
|||||||
|
|
||||||
public function testCreateView()
|
public function testCreateView()
|
||||||
{
|
{
|
||||||
$form = $this->formBuilder->add('test', 'number', array(
|
$form = $this->formBuilder->add('test', NumberType::class, array(
|
||||||
'post_text' => 'my text'
|
'post_text' => 'my text'
|
||||||
))->getForm();
|
))->getForm();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user