“Argument 1 passed to ApiPlatform\Core\Bridge\Doctrine\Orm\Metadata\Property\DoctrineOrmPropertyMetadataFactory::__construct() must be an instance…”

后端 未结 1 853
天命终不由人
天命终不由人 2021-01-21 17:45

While attempting to install Api-Platform (or run composer update on an existing Api-Platform installation, I get an error like this:

Uncaught Er

1条回答
  •  无人及你
    2021-01-21 18:01

    Until a new version of Api-Platform is released (which will probably be relatively soon), you can sidestep the issue by adding this to your composer.json:

    "conflict": {
        "doctrine/common": ">= 3.0",
        "doctrine/persistence": "^1.0"
    }
    

    (Since you are likely to already have a conflict key, just add the one line to your existing conflict rules).

    A new version ofdoctrine/common was released, and the current version of Api-Platform is not compatible with it.

    Sometime in the near future you'll be able to remove that line, once a new version of Api-Platform is released.

    Here is an issue where you can keep an eye on the discussion, and hopefully track when the issue is resolved at this bundle's level.


    This is no longer necessary. You can update to the latest Doctrine packages with the latest Api-Platform package, and every works fine together.

    0 讨论(0)
提交回复
热议问题