Skip to content

Commit d10e121

Browse files
committed
minor #16500 [Form] Update choice_loader.rst.inc (issamkhadiri1989)
This PR was submitted for the 6.0 branch but it was squashed and merged into the 5.4 branch instead. Discussion ---------- [Form] Update choice_loader.rst.inc Hello, I think it is better to extend the class `ConstantsType` from the `Form\AbstractTypeExtension` instead. As we're using the function `getExtendedTypes` i think it might be better. This method is available in the `AbstractTypeExtension` class and not in the `AbstractType` class. I might be wrong but here we're about to create a type extension from the ChoiceType. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- dab392b [Form] Update choice_loader.rst.inc
2 parents f3d8337 + dab392b commit d10e121

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reference/forms/types/options/choice_loader.rst.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ better performance::
4242

4343
class ConstantsType extends AbstractType
4444
{
45-
public static function getExtendedTypes(): iterable
45+
public function getParent(): string
4646
{
47-
return [ChoiceType::class];
47+
return ChoiceType::class;
4848
}
4949

5050
public function configureOptions(OptionsResolver $resolver)

0 commit comments

Comments
 (0)