Skip to content

Invalid constructor arguments with ES document normalizer and default serializer context #5483

Open
@dannyvw

Description

@dannyvw

API Platform version(s) affected: 3.1.2

Description
When configure a default context for the serializer inside the Symfony framework configuration the following error occurred.

Invalid constructor argument 8 for service "api_platform.elasticsearch.normalizer.document": argument 7 must be defined before. Check your service definition.

How to reproduce
Enable ES and add default_context configuration

framework:
    serializer:
        default_context:
            datetime_format: 'Y-m-d'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions