Skip to content

Add EnumTypeCaster to hydrator configuration #71

@vjik

Description

@vjik

It seems to me that this order will be good:

FormHydrator::class => [
        '__construct()' => [
            'hydrator' => DynamicReference::to([
                'class' => Hydrator::class,
                '__construct()' => [
                    'typeCaster' => new CompositeTypeCaster(
                        new NullTypeCaster(emptyString: true),
                        new PhpNativeTypeCaster(),
                        new NonArrayTypeCaster(),
                        new \Yiisoft\Hydrator\TypeCaster\EnumTypeCaster(),
                        new HydratorTypeCaster(),
                    ),
                ],
            ]),
        ],
    ],

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions