Skip to content

3.0 breaks if doctrine is not installed #4984

Description

@welcoMattic

API Platform version(s) affected: 3.0.0

Description
After following the upgrade documentation to 2.7/3.0, and upgrade to 3.0 with no remaining deprecation in my Symfony application, I catch this error:

The service "ApiPlatform\State\CreateProvider" has a dependency on a non-existent service "api_platform.state.item_provider".

Note: I do not have Doctrine installed on my project (not needed).

How to reproduce
Initiate a Symfony project, with ApiPlatform 3.0, without doctrine. Add one simple ApiResource, try to reach the API.

Possible Solution
Detect doctrine presence to load or not the ApiPlatform\State\CreateProvider service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions