Form/Type/KeyValueCollectionType.php
public function configureOptions(OptionsResolver $resolver)
    {
        $resolver
            ->setDefaults([
                'type'                 => 'ekyna_key_value',
                'value_type'           => 'text',
                'value_options'        => [],
                'allowed_keys'         => null,
                'use_container_object' => false,
                'options'              => function (Options $options) {
                    return [
                        'value_type'    => $options['value_type'],
                        'value_options' => $options['value_options'],
                        'allowed_keys'  => $options['allowed_keys']
                    ];
                },
            ])
            ->setRequired(['value_type'])
            ->setAllowedTypes('allowed_keys', ['null', 'array'])
        ;
    }
public function configureOptions(OptionsResolver $resolver)
    {
        $resolver
            ->setDefaults([
                'type'                 => 'ekyna_key_value',
                'value_type'           => 'text',
                'value_options'        => [],
                'allowed_keys'         => null,
                'use_container_object' => false,
                'options'              => function (Options $options) {
                    return [
                        'value_type'    => $options['value_type'],
                        'value_options' => $options['value_options'],
                        'allowed_keys'  => $options['allowed_keys']
                    ];
                },
            ])
            ->setRequired(['value_type'])
            ->setAllowedTypes('allowed_keys', ['null', 'array'])
        ;
    }
{@inheritdoc}