Skip to content

Commit a78ad76

Browse files
Update choice_loader.rst.inc
Hello, A small suggestion: Isn't it 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.
1 parent 33e17b0 commit a78ad76

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
@@ -34,13 +34,13 @@ better performance::
3434

3535
use App\Form\ChoiceList\CustomChoiceLoader;
3636
use App\StaticClass;
37-
use Symfony\Component\Form\AbstractType;
37+
use Symfony\Component\Form\AbstractTypeExtension;
3838
use Symfony\Component\Form\ChoiceList\ChoiceList;
3939
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
4040
use Symfony\Component\OptionsResolver\Options;
4141
use Symfony\Component\OptionsResolver\OptionsResolver;
4242

43-
class ConstantsType extends AbstractType
43+
class ConstantsType extends AbstractTypeExtension
4444
{
4545
public static function getExtendedTypes(): iterable
4646
{

0 commit comments

Comments
 (0)