Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 220cedf

Browse files
committed
minor #39762 [Form] Update AbstractType.php (DonCallisto)
This PR was merged into the 4.4 branch. Discussion ---------- [Form] Update AbstractType.php Switched from parent type hard-coded FQCN to `::class` keyword. | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- ff13967 Switched from parent type hard-coded FQCN to `::class` keyword.
2 parents 4cba31e + ff13967 commit 220cedf

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Symfony\Component\Form\AbstractType;
2323
use Symfony\Component\Form\ChoiceList\Factory\CachingFactoryDecorator;
2424
use Symfony\Component\Form\Exception\RuntimeException;
25+
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
2526
use Symfony\Component\Form\FormBuilderInterface;
2627
use Symfony\Component\OptionsResolver\Options;
2728
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -274,7 +275,7 @@ abstract public function getLoader(ObjectManager $manager, $queryBuilder, $class
274275

275276
public function getParent()
276277
{
277-
return 'Symfony\Component\Form\Extension\Core\Type\ChoiceType';
278+
return ChoiceType::class;
278279
}
279280

280281
public function reset()

src/Symfony/Component/Form/AbstractType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Form;
1313

14+
use Symfony\Component\Form\Extension\Core\Type\FormType;
1415
use Symfony\Component\Form\Util\StringUtil;
1516
use Symfony\Component\OptionsResolver\OptionsResolver;
1617

@@ -60,6 +61,6 @@ public function getBlockPrefix()
6061
*/
6162
public function getParent()
6263
{
63-
return 'Symfony\Component\Form\Extension\Core\Type\FormType';
64+
return FormType::class;
6465
}
6566
}

src/Symfony/Component/Form/Tests/Fixtures/ChoiceSubType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Form\Tests\Fixtures;
1313

1414
use Symfony\Component\Form\AbstractType;
15+
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
1516
use Symfony\Component\OptionsResolver\OptionsResolver;
1617

1718
/**
@@ -38,6 +39,6 @@ public function configureOptions(OptionsResolver $resolver)
3839
*/
3940
public function getParent(): ?string
4041
{
41-
return 'Symfony\Component\Form\Extension\Core\Type\ChoiceType';
42+
return ChoiceType::class;
4243
}
4344
}

0 commit comments

Comments
 (0)