Transformer/MappingTransformer.php
protected function configureMappingOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults(
            [
                'code' => null, // Source property
                'constant' => null,
                'set_null' => false, // Because the "null" value cannot be covered by the constant option
                'ignore_missing' => false,
            ]
        );
        $resolver->setAllowedTypes('code', ['NULL', 'string', 'array']);
        $resolver->setAllowedTypes('set_null', ['boolean']);
        $resolver->setAllowedTypes('ignore_missing', ['boolean']);

        $this->configureTransformersOptions($resolver);
    }
protected function configureMappingOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults(
            [
                'code' => null, // Source property
                'constant' => null,
                'set_null' => false, // Because the "null" value cannot be covered by the constant option
                'ignore_missing' => false,
            ]
        );
        $resolver->setAllowedTypes('code', ['NULL', 'string', 'array']);
        $resolver->setAllowedTypes('set_null', ['boolean']);
        $resolver->setAllowedTypes('ignore_missing', ['boolean']);

        $this->configureTransformersOptions($resolver);
    }
@param OptionsResolver $resolver

@throws \Symfony\Component\OptionsResolver\Exception\OptionDefinitionException
@throws \Symfony\Component\OptionsResolver\Exception\NoSuchOptionException
@throws \Symfony\Component\OptionsResolver\Exception\MissingOptionsException
@throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
@throws \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException
@throws \Symfony\Component\OptionsResolver\Exception\AccessException
@throws \CleverAge\ProcessBundle\Exception\MissingTransformerException
@throws \Symfony\Component\OptionsResolver\Exception\ExceptionInterface