Transformer/CallbackTransformer.php
public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setRequired(
            [
                'callback',
            ]
        );
        $resolver->setAllowedTypes('callback', ['string', 'array']);
        /** @noinspection PhpUnusedParameterInspection */
        $resolver->setNormalizer(
            'callback',
            function (Options $options, $value) {
                if (!\is_callable($value)) {
                    throw new InvalidOptionsException(
                        'Callback option must be callable'
                    );
                }

                return $value;
            }
        );
        $resolver->setDefaults(
            [
                'left_parameters' => [],
                'right_parameters' => [],
                'additional_parameters' => [],
            ]
        );
        $resolver->setAllowedTypes('left_parameters', ['array']);
        $resolver->setAllowedTypes('right_parameters', ['array']);
        $resolver->setAllowedTypes('additional_parameters', ['array']);

        /** @noinspection PhpUnusedParameterInspection */
        $resolver->setNormalizer(
            'additional_parameters',
            function (Options $options, $value) {
                if ($value) {
                    @trigger_error('The "additional_parameters" option is deprecated. Use "right_parameters" instead.', E_USER_DEPRECATED);
                }

                return $value;
            }
        );
    }
public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setRequired(
            [
                'callback',
            ]
        );
        $resolver->setAllowedTypes('callback', ['string', 'array']);
        /** @noinspection PhpUnusedParameterInspection */
        $resolver->setNormalizer(
            'callback',
            function (Options $options, $value) {
                if (!\is_callable($value)) {
                    throw new InvalidOptionsException(
                        'Callback option must be callable'
                    );
                }

                return $value;
            }
        );
        $resolver->setDefaults(
            [
                'left_parameters' => [],
                'right_parameters' => [],
                'additional_parameters' => [],
            ]
        );
        $resolver->setAllowedTypes('left_parameters', ['array']);
        $resolver->setAllowedTypes('right_parameters', ['array']);
        $resolver->setAllowedTypes('additional_parameters', ['array']);

        /** @noinspection PhpUnusedParameterInspection */
        $resolver->setNormalizer(
            'additional_parameters',
            function (Options $options, $value) {
                if ($value) {
                    @trigger_error('The "additional_parameters" option is deprecated. Use "right_parameters" instead.', E_USER_DEPRECATED);
                }

                return $value;
            }
        );
    }
@param OptionsResolver $resolver

@throws \Symfony\Component\OptionsResolver\Exception\ExceptionInterface