$resolver->
setDefaults([ 'data_class' => Customer::
class,
'allow_extra_fields' => true,
]);
} public function buildForm(FormBuilderInterface
$builder, array
$options) { if ($this->config->
get('accountPasswordCheck'
)) { $builder->
add('currentPassword', PasswordType::
class,
[ 'mapped' => false,
'constraints' =>
[new CurrentPassword()],
]);
} $builder->
add('password', PasswordType::
class,
[ 'constraints' =>
[new Password()],
]);
$builder->
add('passwordConfirmation', PasswordType::
class,
[ 'mapped' => false,
]);