Task/File/Csv/CsvWriterTask.php
protected function configureOptions(OptionsResolver $resolver)
    {
        parent::configureOptions($resolver);
        $resolver->setDefaults(
            [
                'mode' => 'wb',
                'split_character' => '|',
                'write_headers' => true,
            ]
        );

        $resolver->setNormalizer(
            'file_path',
            function (Options $options, $value) {
                $value = strtr(
                    $value,
                    [
                        '{date}' => date('Ymd'),
                        '{date_time}' => date('Ymd_His'),
                        '{unique_token}' => uniqid(),
                    ]
                );

                return $value;
            }
        );
    }
protected function configureOptions(OptionsResolver $resolver)
    {
        parent::configureOptions($resolver);
        $resolver->setDefaults(
            [
                'mode' => 'wb',
                'split_character' => '|',
                'write_headers' => true,
            ]
        );

        $resolver->setNormalizer(
            'file_path',
            function (Options $options, $value) {
                $value = strtr(
                    $value,
                    [
                        '{date}' => date('Ymd'),
                        '{date_time}' => date('Ymd_His'),
                        '{unique_token}' => uniqid(),
                    ]
                );

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

@throws \Symfony\Component\OptionsResolver\Exception\AccessException
@throws \Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException