Type/BaseStoreType.php
public function configureOptions(OptionsResolver $resolver): void
    {
        $resolver
            ->setRequired('class')
            ->setDefault('default', static function (Options $options): callable {
                $class = $options['class'];

                return static function () use ($class) {
                    return new $class();
                };
            })
            ->setAllowedTypes('class', 'string')
            ->setAllowedTypes('default', ['null', 'object', 'callable'])
            ->setNormalizer('default', static function (Options $options, $default): callable {
                if (\is_callable($default)) {
                    return $default;
                }

                return static function () use ($default) {
                    return $default;
                };
            });
    }
public function configureOptions(OptionsResolver $resolver): void
    {
        $resolver
            ->setRequired('class')
            ->setDefault('default', static function (Options $options): callable {
                $class = $options['class'];

                return static function () use ($class) {
                    return new $class();
                };
            })
            ->setAllowedTypes('class', 'string')
            ->setAllowedTypes('default', ['null', 'object', 'callable'])
            ->setNormalizer('default', static function (Options $options, $default): callable {
                if (\is_callable($default)) {
                    return $default;
                }

                return static function () use ($default) {
                    return $default;
                };
            });
    }
{@inheritdoc}