Transformer/CallbackTransformer.php
public function transform($value, array $options = [])
    {
        $resolver = new OptionsResolver();
        $this->configureOptions($resolver);
        $options = $resolver->resolve($options);

        if (count($options['additional_parameters'])
            && !count($options['right_parameters'])) {
            $options['right_parameters'] = $options['additional_parameters'];
        }

        $parameters = $options['left_parameters'];
        array_push($parameters, $value, ...$options['right_parameters']);

        return \call_user_func_array($options['callback'], $parameters);
    }
public function transform($value, array $options = [])
    {
        $resolver = new OptionsResolver();
        $this->configureOptions($resolver);
        $options = $resolver->resolve($options);

        if (count($options['additional_parameters'])
            && !count($options['right_parameters'])) {
            $options['right_parameters'] = $options['additional_parameters'];
        }

        $parameters = $options['left_parameters'];
        array_push($parameters, $value, ...$options['right_parameters']);

        return \call_user_func_array($options['callback'], $parameters);
    }
Must return the transformed $value

@param mixed $value
@param array $options

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

@return mixed $value