Skip to content

How to register custom Hydration strategies? #732

@MatthiasKuehneEllerhold

Description

@MatthiasKuehneEllerhold

I'd like to use php8.1 built in enums in doctrine backed entities.
According to https://www.doctrine-project.org/projects/doctrine-laminas-hydrator/en/3.3/enum-strategy.html#using-enums-with-php-8-1 I need to create and register a custom hydration strategy for each enum I want to use.

Is there any configuration key where I can easily register them or do I have to use a Delegator on the DoctrineHydrator?

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions