вторник, 9 ноября 2021 г.

[Symfony] Cannot read index 'email' from object of type App\Entity\User because it doesn't implement \ArrayAccess

 Its because PropertyAccessor thinks form is an array. To change it, set form data_class. For example in your form Type:

public function configureOptions(OptionsResolver $resolver)

    {

        $resolver

            ->setDefaults([

                'data_class' => User::class,

...


Комментариев нет:

Отправить комментарий